methods_differ_from_baseclass_table

glotaran.plugin_system.base_registry.methods_differ_from_baseclass_table(method_names: str | Sequence[str], plugin_registry_keys: str | Sequence[str], get_plugin_function: Callable[[str], GenericPluginInstance | type[GenericPluginInstance]], base_class: type[GenericPluginInstance], plugin_names: bool = False) Generator[list[str | bool], None, None][source]

Create table of which plugins methods differ from their baseclass.

This uses the assumption that all plugins have the same base_class.

The main purpose of this function is to show the user which plugin implements which methods differently than its baseclass.

Based on the assumption that base_class didn’t implement the methods (e.g. DataIoInterface or ProjectIoInterface), this can be used to to create a ‘supported methods’ table.

Parameters:
  • method_names (str | list[str]) – Name|s of the method|s.

  • plugin_registry_keys (str | list[str]) – Keys the plugins are registered under (e.g. return value of the implementation of func:registered_plugins)

  • get_plugin_function (Callable[[str], GenericPluginInstance | type[GenericPluginInstance]]) – Function to get plugin from plugin registry.

  • base_class (type[GenericPluginInstance]) – Base class the plugin inherited from.

  • plugin_names (bool) – Whether or not to add the names of the plugins to the lists.

Yields:

list[str | bool] – Row with the first value being the plugin_registry_key and the others whether or not a plugins method differs from base_class.