Skip to content

Commit

Permalink
rename func
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrilvallez committed Oct 29, 2024
1 parent 4805dec commit cd2e0c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/modular_model_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ def compute_relative_order(self, missing_dependencies: set) -> dict[str, int]:
return relative_order


def add_class_node(
def get_class_node_and_dependencies(
modular_mapper: ModularFileMapper, class_name: str, node: cst.CSTNode, files: dict[str, dict]
) -> tuple[dict, str]:
"""Return a single class node (and all its dependency nodes), to be added to the `files`. It creates the new
Expand Down Expand Up @@ -1239,7 +1239,7 @@ def create_modules(modular_mapper: ModularFileMapper) -> dict[str, cst.Module]:

# For each class defined in modular, potentially replace the node and add it with its dependencies
for class_name, node in modular_mapper.classes.items():
nodes_to_add, file_type = add_class_node(modular_mapper, class_name, node, files)
nodes_to_add, file_type = get_class_node_and_dependencies(modular_mapper, class_name, node, files)
# Sort the nodes according to their relative order
nodes_to_add = sorted(nodes_to_add.items(), key=lambda x: x[1][0])
# Write all nodes to file
Expand Down

0 comments on commit cd2e0c9

Please sign in to comment.