mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-21 21:58:04 +00:00
✨ 支持以软件包的方式导入插件
This commit is contained in:
parent
45dc8f9df7
commit
d76fdc8a73
@ -34,6 +34,10 @@ class PluginsManager:
|
||||
for plugin_path in plugin_paths:
|
||||
if plugin_path.startswith('__'):
|
||||
continue
|
||||
if os.path.isdir(plugin_path):
|
||||
plugin_path = os.path.basename(plugin_path)
|
||||
self.plugin_list.append(plugin_path)
|
||||
continue
|
||||
module_name = path.basename(path.normpath(plugin_path))
|
||||
root, ext = os.path.splitext(module_name)
|
||||
if ext == ".py":
|
||||
|
Loading…
Reference in New Issue
Block a user