mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
fixing ruff EM102
This commit is contained in:
parent
4a13d5d118
commit
2791958f9a
@ -180,7 +180,8 @@ class BinarySearchTree:
|
||||
# Look for the node with that label
|
||||
node = self.search(value)
|
||||
if node is None:
|
||||
raise ValueError(f"Value {value} not found")
|
||||
msg = f"Value {value} not found"
|
||||
raise ValueError(msg)
|
||||
|
||||
if node.left is None and node.right is None: # If it has no children
|
||||
self.__reassign_nodes(node, None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user