MCPcopy Index your code
hub / github.com/nonebot/nonebot2 / _module_name_to_plugin_id

Function _module_name_to_plugin_id

nonebot/plugin/__init__.py:87–93  ·  view source on GitHub ↗
(
    module_name: str, controlled_modules: dict[str, str] | None = None
)

Source from the content-addressed store, hash-verified

85
86
87def _module_name_to_plugin_id(
88 module_name: str, controlled_modules: dict[str, str] | None = None
89) -> str:
90 plugin_name = _module_name_to_plugin_name(module_name)
91 if parent_plugin_id := _find_parent_plugin_id(module_name, controlled_modules):
92 return f"{parent_plugin_id}:{plugin_name}"
93 return plugin_name
94
95
96def _new_plugin(

Callers 4

_new_pluginFunction · 0.85
requireFunction · 0.85
_prepare_pluginsMethod · 0.85

Calls 2

_find_parent_plugin_idFunction · 0.85

Tested by

no test coverage detected