mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 21:34:32 +08:00
Remove dead code
This commit is contained in:
@@ -578,12 +578,7 @@ class _NodesTree(object):
|
||||
|
||||
Returns the number of tree nodes that were copied.
|
||||
"""
|
||||
i = 0
|
||||
for i, n in enumerate(tree_nodes):
|
||||
if tree_nodes[0].type not in ('INDENT', 'DEDENT'):
|
||||
break
|
||||
|
||||
if tree_nodes[i].type in ('error_leaf', 'error_node'):
|
||||
if tree_nodes[0].type in ('error_leaf', 'error_node'):
|
||||
# Avoid copying errors in the beginning. Can lead to a lot of
|
||||
# issues.
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user