Refactor __init__.py by removing unused variables

Removed WEB_DIRECTORY and load_javascript function from __init__.py. Updated __all__ to exclude removed items.
This commit is contained in:
AI Lab
2025-11-11 18:06:58 -08:00
committed by GitHub
parent 1ddb1dc657
commit 84f02e107f
+5 -8
View File
@@ -8,6 +8,7 @@ sys.path.insert(0, current_dir)
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
WEB_DIRECTORY = "./web"
def load_modules_from_directory(directory):
for file in os.listdir(directory):
@@ -34,11 +35,7 @@ load_modules_from_directory(current_dir)
NODE_CLASS_MAPPINGS = dict(sorted(NODE_CLASS_MAPPINGS.items(), key=lambda x: NODE_DISPLAY_NAME_MAPPINGS.get(x[0], x[0])))
NODE_DISPLAY_NAME_MAPPINGS = dict(sorted(NODE_DISPLAY_NAME_MAPPINGS.items(), key=lambda x: x[1]))
WEB_DIRECTORY = "./web"
def load_javascript(web_directory):
return [
{"path": "refreshNode.js"}
]
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY", "load_javascript"]
__all__ = [
"NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS"
]