mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Enable ruff RUF100 rule (#11337)
This commit is contained in:
@ -85,7 +85,7 @@ class BinaryTree:
|
||||
"""
|
||||
return self._depth(self.root)
|
||||
|
||||
def _depth(self, node: Node | None) -> int: # noqa: UP007
|
||||
def _depth(self, node: Node | None) -> int:
|
||||
if not node:
|
||||
return 0
|
||||
return 1 + max(self._depth(node.left), self._depth(node.right))
|
||||
|
Reference in New Issue
Block a user