(self, name: str, plugin)
return plugin
Add a new plugin ``plugin`` with name ``name`` to the active plugins.
Add a new plugin ``plugin`` with name ``name`` to the active plugins.
Add a new plugin plugin with name name to the active plugins .
def register_plugin(self, name: str, plugin):
        """
        Add a new plugin ``plugin`` with name ``name`` to the active plugins.
        """
        if self.has_plugin(name):
            self.release_plugin(name)
        self._active_plugins[name] = plugin
        setattr(self, name, plugin)
        return plugin
def register_plugin ( self , name : str , plugin ) : if self . has_plugin ( name ) : self . release_plugin ( name ) self . _active_plugins [ name ] = plugin setattr ( self , name , plugin ) return plugin