mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
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>
This commit is contained in:
parent
90a8e6e0d2
commit
5cf34d901e
|
@ -236,8 +236,8 @@
|
||||||
* [Double Ended Queue](data_structures/queue/double_ended_queue.py)
|
* [Double Ended Queue](data_structures/queue/double_ended_queue.py)
|
||||||
* [Linked Queue](data_structures/queue/linked_queue.py)
|
* [Linked Queue](data_structures/queue/linked_queue.py)
|
||||||
* [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py)
|
* [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py)
|
||||||
|
* [Queue By List](data_structures/queue/queue_by_list.py)
|
||||||
* [Queue By Two Stacks](data_structures/queue/queue_by_two_stacks.py)
|
* [Queue By Two Stacks](data_structures/queue/queue_by_two_stacks.py)
|
||||||
* [Queue On List](data_structures/queue/queue_on_list.py)
|
|
||||||
* [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py)
|
* [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py)
|
||||||
* Stacks
|
* Stacks
|
||||||
* [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py)
|
* [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py)
|
||||||
|
|
|
@ -20,7 +20,7 @@ def check_circuit_or_path(graph, max_node):
|
||||||
odd_degree_nodes = 0
|
odd_degree_nodes = 0
|
||||||
odd_node = -1
|
odd_node = -1
|
||||||
for i in range(max_node):
|
for i in range(max_node):
|
||||||
if i not in graph.keys():
|
if i not in graph:
|
||||||
continue
|
continue
|
||||||
if len(graph[i]) % 2 == 1:
|
if len(graph[i]) % 2 == 1:
|
||||||
odd_degree_nodes += 1
|
odd_degree_nodes += 1
|
||||||
|
|
|
@ -60,7 +60,7 @@ def newtons_second_law_of_motion(mass: float, acceleration: float) -> float:
|
||||||
>>> newtons_second_law_of_motion(2.0, 1)
|
>>> newtons_second_law_of_motion(2.0, 1)
|
||||||
2.0
|
2.0
|
||||||
"""
|
"""
|
||||||
force = float()
|
force = 0.0
|
||||||
try:
|
try:
|
||||||
force = mass * acceleration
|
force = mass * acceleration
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user