mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 21:54:54 +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.
|
Returns the number of tree nodes that were copied.
|
||||||
"""
|
"""
|
||||||
i = 0
|
if tree_nodes[0].type in ('error_leaf', 'error_node'):
|
||||||
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'):
|
|
||||||
# Avoid copying errors in the beginning. Can lead to a lot of
|
# Avoid copying errors in the beginning. Can lead to a lot of
|
||||||
# issues.
|
# issues.
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user