Ruff fixes (#8913) · foo123/The-Algorithms-Python@5cf34d9 · GitHub
Skip to content

Commit 5cf34d9

Browse files
tianyizheng02github-actions
andauthored
Ruff fixes (TheAlgorithms#8913)
* updating DIRECTORY.md * Fix ruff error in eulerian_path_and_circuit_for_undirected_graph.py * Fix ruff error in newtons_second_law_of_motion.py --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 90a8e6e commit 5cf34d9

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

DIRECTORY.md

Lines changed: 1 addition & 1 deletion

graphs/eulerian_path_and_circuit_for_undirected_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def check_circuit_or_path(graph, max_node):
2020
odd_degree_nodes = 0
2121
odd_node = -1
2222
for i in range(max_node):
23-
if i not in graph.keys():
23+
if i not in graph:
2424
continue
2525
if len(graph[i]) % 2 == 1:
2626
odd_degree_nodes += 1

physics/newtons_second_law_of_motion.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)