Skip to content

Commit 7b987a0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 502953a commit 7b987a0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

data_structures/heap/fibonacci_heap.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,7 @@ def _cascading_cut(self, node_to_cut):
355355
Args:
356356
node_to_cut (FibonacciHeapNode): The node to be cut recursively.
357357
"""
358-
temp_parent = node_to_cut.parent
359-
if temp_parent:
358+
if temp_parent := node_to_cut.parent:
360359
if not node_to_cut.mark:
361360
node_to_cut.mark = True
362361
else:

0 commit comments

Comments
 (0)