Add pyupgrade to pre-commit (#5638)

* Add pyupgrade to pre-commit

* Remove unused imports

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2021-10-28 16:45:59 +02:00
committed by GitHub
parent 70368a757e
commit 477cc3fe59
4 changed files with 12 additions and 5 deletions

View File

@ -7,8 +7,6 @@ will be used as the node of new tree.
"""
from __future__ import annotations
from typing import Optional
class Node:
"""
@ -21,7 +19,7 @@ class Node:
self.right: Node | None = None
def merge_two_binary_trees(tree1: Node | None, tree2: Node | None) -> Optional[Node]:
def merge_two_binary_trees(tree1: Node | None, tree2: Node | None) -> Node | None:
"""
Returns root node of the merged tree.