Enable ruff RUF100 rule (#11337)

This commit is contained in:
Maxim Smolskiy
2024-04-01 22:36:41 +03:00
committed by GitHub
parent c328b000ec
commit 39daaf8248
14 changed files with 23 additions and 24 deletions

View File

@ -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))