wrap_func_as_method

glotaran.model.util.wrap_func_as_method(cls: Any, name: Optional[str] = None, annotations: Optional[str] = None, doc: Optional[str] = None)Callable[source]

A decorator to wrap a function as class method.

Notes

Only for internal use.

Parameters
  • cls – The class in which the function will be wrapped.

  • name – The name of method. If None, the original function’s name is used.

  • annotations – The annotations of the method. If None, the original function’s annotations are used.

  • doc – The documentation of the method. If None, the original function’s documentation is used.