Skip to content

Commit e6a7847

Browse files
committed
Minor update to doctests, to meet ruff requirements
1 parent e127161 commit e6a7847

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphs/eulerian_path_and_circuit_for_undirected_graph.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def dfs(u, graph, visited_edge, path=None):
2121
>>> visited_edge = [[False] * 11 for _ in range(11)]
2222
>>> dfs(1, {1: [2, 3], 2: [1, 3], 3: [1, 2]}, visited_edge)
2323
[1, 2, 3, 1]
24-
>>> dfs(5, {1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [4]}, visited_edge)
24+
>>> dfs(5, {1: [2, 3, 4], 2: [1, 3], 3: [1], 4: [1, 5], 5: [4]}, visited_edge)
2525
[5, 4, 1]
2626
>>> dfs(1, {1: [], 2: [], 3: [1, 2]}, visited_edge)
2727
[1]
@@ -52,9 +52,9 @@ def check_circuit_or_path(graph, max_node):
5252
Example:
5353
>>> check_circuit_or_path({1: [2, 3], 2: [1, 3], 3: [1, 2]}, 10)
5454
(1, -1)
55-
>>> check_circuit_or_path({1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [4]}, 10)
55+
>>> check_circuit_or_path({1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [], 5: [4]}, 10)
5656
(2, 5)
57-
>>> check_circuit_or_path({1: [2, 3, 1], 2: [2, 3, 4], 3: [1, 3], 4: [1], 5: []}, 10)
57+
>>> check_circuit_or_path({1: [2, 3, 1], 2: [2], 3: [1, 3], 4: [1], 5: []}, 10)
5858
(3, 4)
5959
>>> check_circuit_or_path({1: [], 2: [], 3: [1, 2]}, 10)
6060
(1, -1)

0 commit comments

Comments
 (0)