Skip to content

Commit 5cf34d9

Browse files
tianyizheng02github-actions
and
github-actions
authored
Ruff fixes (#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

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

DIRECTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@
236236
* [Double Ended Queue](data_structures/queue/double_ended_queue.py)
237237
* [Linked Queue](data_structures/queue/linked_queue.py)
238238
* [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py)
239+
* [Queue By List](data_structures/queue/queue_by_list.py)
239240
* [Queue By Two Stacks](data_structures/queue/queue_by_two_stacks.py)
240-
* [Queue On List](data_structures/queue/queue_on_list.py)
241241
* [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py)
242242
* Stacks
243243
* [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py)

graphs/eulerian_path_and_circuit_for_undirected_graph.py

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def newtons_second_law_of_motion(mass: float, acceleration: float) -> float:
6060
>>> newtons_second_law_of_motion(2.0, 1)
6161
2.0
6262
"""
63-
force = float()
63+
force = 0.0
6464
try:
6565
force = mass * acceleration
6666
except Exception:

0 commit comments

Comments
 (0)