mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -215,11 +215,11 @@ def del_node(root: MyNode, data: Any) -> MyNode | None:
|
||||
return root
|
||||
else:
|
||||
root.set_left(del_node(left_child, data))
|
||||
else: # root.get_data() < data
|
||||
if right_child is None:
|
||||
return root
|
||||
else:
|
||||
root.set_right(del_node(right_child, data))
|
||||
# root.get_data() < data
|
||||
elif right_child is None:
|
||||
return root
|
||||
else:
|
||||
root.set_right(del_node(right_child, data))
|
||||
|
||||
if get_height(right_child) - get_height(left_child) == 2:
|
||||
assert right_child is not None
|
||||
|
Reference in New Issue
Block a user