mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Enable ruff RUF005 rule (#11344)
This commit is contained in:
@ -336,7 +336,7 @@ def inorder(curr_node: Node | None) -> list[Node]:
|
||||
"""
|
||||
node_list = []
|
||||
if curr_node is not None:
|
||||
node_list = inorder(curr_node.left) + [curr_node] + inorder(curr_node.right)
|
||||
node_list = [*inorder(curr_node.left), curr_node, *inorder(curr_node.right)]
|
||||
return node_list
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user