Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
format codes
Browse files Browse the repository at this point in the history
  • Loading branch information
smahmed776 committed Aug 8, 2023
1 parent 9ca2471 commit 80c3ef1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions flojoy/node_utils/generate_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def sort_order(element):
except ValueError:
return len(ORDERING)

def generate_manifest(out_path:str):

def generate_manifest(out_path: str):
nodes_map = browse_directories(NODES_PATH.__str__())
nodes_map["children"].sort(key=sort_order) # type: ignore
print(
Expand All @@ -135,5 +136,5 @@ def generate_manifest(out_path:str):
f"⚠️ {__failed_nodes.__len__()} nodes require upgrading to align with the new API!"
)
with open(out_path, "w") as f:
f.write(json.dumps(nodes_map, indent=3))
f.close()
f.write(json.dumps(nodes_map, indent=3))
f.close()
4 changes: 3 additions & 1 deletion flojoy/node_utils/nodes_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ def create_map():
# map file name to file path
if file.endswith(".py"):
mapping[file[:-3]] = "flojoy." + (
os.path.join(root[root.find("nodes"):], file[:-3]).replace("/", ".").replace("\\", ".")
os.path.join(root[root.find("nodes") :], file[:-3])
.replace("/", ".")
.replace("\\", ".")
)

0 comments on commit 80c3ef1

Please sign in to comment.