Skip to content

Commit 1d3b6bd

Browse files
committed
update var
1 parent e9c9ec7 commit 1d3b6bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backend/plugin/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ def get_plugins() -> list[str]:
4545
plugin_packages = []
4646

4747
# 遍历插件目录
48-
for d in os.listdir(PLUGIN_DIR):
49-
if not os.path.isdir(os.path.join(PLUGIN_DIR, d)) and d == '__pycache__':
48+
for item in os.listdir(PLUGIN_DIR):
49+
if not os.path.isdir(os.path.join(PLUGIN_DIR, item)) and item == '__pycache__':
5050
continue
5151

52-
item_path = os.path.join(PLUGIN_DIR, d)
52+
item_path = os.path.join(PLUGIN_DIR, item)
5353

5454
# 检查是否为目录且包含 __init__.py 文件
5555
if os.path.isdir(item_path) and '__init__.py' in os.listdir(item_path):
56-
plugin_packages.append(d)
56+
plugin_packages.append(item)
5757

5858
return plugin_packages
5959

0 commit comments

Comments
 (0)