def only_ocaml(func):

    @functools.wraps(func)
    def wrapper(self, view, *args, **kwargs):
        if is_ocaml(view):
            return func(self, view, *args, **kwargs)

    return wrapper
Execute the given function if we are in an OCaml source code only.
dataset/ETHPy150Open cynddl/sublime-text-merlin/merlin/helpers.py/only_ocaml