We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9c9ec7 commit 1d3b6bdCopy full SHA for 1d3b6bd
backend/plugin/tools.py
@@ -45,15 +45,15 @@ def get_plugins() -> list[str]:
45
plugin_packages = []
46
47
# 遍历插件目录
48
- for d in os.listdir(PLUGIN_DIR):
49
- if not os.path.isdir(os.path.join(PLUGIN_DIR, d)) and d == '__pycache__':
+ for item in os.listdir(PLUGIN_DIR):
+ if not os.path.isdir(os.path.join(PLUGIN_DIR, item)) and item == '__pycache__':
50
continue
51
52
- item_path = os.path.join(PLUGIN_DIR, d)
+ item_path = os.path.join(PLUGIN_DIR, item)
53
54
# 检查是否为目录且包含 __init__.py 文件
55
if os.path.isdir(item_path) and '__init__.py' in os.listdir(item_path):
56
- plugin_packages.append(d)
+ plugin_packages.append(item)
57
58
return plugin_packages
59
0 commit comments