From 01ae01a38262854567fdcb97c4a51a88bf4ec0d4 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 23 Jan 2019 23:28:18 +0100 Subject: [PATCH] Remove dead code --- parso/python/diff.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/parso/python/diff.py b/parso/python/diff.py index c88b9c9..453ba52 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -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 []