MCPcopy
hub / github.com/nonebot/nonebot2 / __init__

Method __init__

nonebot/plugin/manager.py:43–55  ·  view source on GitHub ↗
(
        self,
        plugins: Iterable[str] | None = None,
        search_path: Iterable[str] | None = None,
    )

Source from the content-addressed store, hash-verified

41 """
42
43 def __init__(
44 self,
45 plugins: Iterable[str] | None = None,
46 search_path: Iterable[str] | None = None,
47 ):
48 # simple plugin not in search path
49 self.plugins: set[str] = set(plugins or [])
50 self.search_path: set[str] = set(search_path or [])
51
52 # cache plugins
53 self._third_party_plugin_ids: dict[str, str] = {}
54 self._searched_plugin_ids: dict[str, str] = {}
55 self._prepare_plugins()
56
57 def __repr__(self) -> str:
58 return f"PluginManager(available_plugins={self.controlled_modules})"

Callers

nothing calls this directly

Calls 1

_prepare_pluginsMethod · 0.95

Tested by

no test coverage detected