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:
+5
-8
@@ -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"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user