get_method_from_plugin

glotaran.plugin_system.base_registry.get_method_from_plugin(plugin: object | type[object], method_name: str) Callable[..., Any][source]

Retrieve a method callabe from an class or instance plugin.

Parameters:
  • plugin (object | type[object],) – Plugin instance or class.

  • method_name (str) – Method name, e.g. load_megacomplex.

Returns:

Method callable.

Return type:

Callable[…, Any]

Raises:
  • ValueError – If plugin has an attribute with that name but it isn’t callable.

  • ValueError – If plugin misses the attribute.