Skip to content

Commit

Permalink
refactor: make Dag._node_to_operation private
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulFarault committed Nov 20, 2024
1 parent 6cb062f commit 7bdb058
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tdp/core/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def graph(self) -> nx.DiGraph:
"""DAG graph."""
return self._graph

def node_to_operation(
def _node_to_operation(
self, node: str, restart: bool = False, stop: bool = False
) -> Operation:
# ? Restart operations are now stored in collections.operations they can be
Expand Down Expand Up @@ -152,7 +152,7 @@ def topological_sort(
"""
return list(
map(
lambda node: self.node_to_operation(node, restart=restart, stop=stop),
lambda node: self._node_to_operation(node, restart=restart, stop=stop),
self.topological_sort_key(nodes),
)
)
Expand Down Expand Up @@ -234,7 +234,7 @@ def get_operation_descendants(
nodes_filtered = filter(lambda node: node not in nodes, nodes_set)
return list(
map(
lambda node: self.node_to_operation(node, restart=restart, stop=stop),
lambda node: self._node_to_operation(node, restart=restart, stop=stop),
nodes_filtered,
)
)
Expand Down

0 comments on commit 7bdb058

Please sign in to comment.