Skip to content

Commit 2b47bd4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 54e0eed commit 2b47bd4

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sorts/topological_sort.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ def topological_sort(graph: dict[str, list[str]]) -> list[str]:
7171
result = []
7272

7373
def visit(node: str) -> None:
74-
7574
is_being_visited.add(node)
7675

7776
for neighbor in graph.get(node, []):
78-
7977
if neighbor in visited:
8078
continue
8179

@@ -103,7 +101,6 @@ def visit(node: str) -> None:
103101

104102

105103
if __name__ == "__main__":
106-
107104
graph: dict[str, list[str]] = {
108105
"A": ["B", "C"],
109106
"B": ["D", "E"],

0 commit comments

Comments
 (0)