napari_plugin_engine/hooks.py
def index(self, value: Union[str, HookImplementation]) -> int:
        """Return index of plugin_name or a HookImplementation in self._nonwrappers"""
        if isinstance(value, HookImplementation):
            return self._nonwrappers.index(value)
        elif isinstance(value, str):
            plugin_names = [imp.plugin_name for imp in self._nonwrappers]
            return plugin_names.index(value)
        else:
            raise TypeError(
                "argument provided to index must either be the "
                "(string) name of a plugin, or a HookImplementation instance"
            )
Return index of plugin_name or a HookImplementation in self._nonwrappers
Return index of plugin_name or a HookImplementation in self._nonwrappers
Return index of plugin_name or a HookImplementation in self . _nonwrappers
def index(self, value: Union[str, HookImplementation]) -> int:
        if isinstance(value, HookImplementation):
            return self._nonwrappers.index(value)
        elif isinstance(value, str):
            plugin_names = [imp.plugin_name for imp in self._nonwrappers]
            return plugin_names.index(value)
        else:
            raise TypeError(
                "argument provided to index must either be the "
                "(string) name of a plugin, or a HookImplementation instance"
            )
def index ( self , value : Union [ str , HookImplementation ] ) -> int : if isinstance ( value , HookImplementation ) : return self . _nonwrappers . index ( value ) elif isinstance ( value , str ) : plugin_names = [ imp . plugin_name for imp in self . _nonwrappers ] return plugin_names . index ( value ) else : raise TypeError ( "argument provided to index must either be the " "(string) name of a plugin, or a HookImplementation instance" )
Return index of plugin_name or a HookImplementation in self._nonwrappers
Return index of plugin_name or a HookImplementation in self . _nonwrappers
"""Return index of plugin_name or a HookImplementation in self._nonwrappers"""
self
value
Union[str, HookImplementation]