🔇 Feature: 调整日志输出格式与等级 (#1233)

This commit is contained in:
Ju4tCode
2022-09-09 11:52:57 +08:00
committed by GitHub
parent 179d7105c9
commit 8c42490a7e
29 changed files with 261 additions and 165 deletions

View File

@ -159,11 +159,10 @@ def require(name: str) -> ModuleType:
"""
plugin = get_plugin(_module_name_to_plugin_name(name))
if not plugin:
manager = _find_manager_by_name(name)
if manager:
if manager := _find_manager_by_name(name):
plugin = manager.load_plugin(name)
else:
plugin = load_plugin(name)
if not plugin:
raise RuntimeError(f'Cannot load plugin "{name}"!')
if not plugin:
raise RuntimeError(f'Cannot load plugin "{name}"!')
return plugin.module