From beec6a1a324d24f73ee6a84c3c591d46bf299a09 Mon Sep 17 00:00:00 2001 From: youben11 Date: Fri, 15 Nov 2019 11:13:04 +0100 Subject: [PATCH] fix range --- pyls/plugins/importmagic_lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyls/plugins/importmagic_lint.py b/pyls/plugins/importmagic_lint.py index e64da234..0672c9e8 100644 --- a/pyls/plugins/importmagic_lint.py +++ b/pyls/plugins/importmagic_lint.py @@ -103,7 +103,7 @@ def _search_symbol(source, symbol): symbol_len = len(symbol_tokens) locations = [] - for i in len(source_tokens): + for i in range(len(source_tokens)) - symbol_len + 1: if source_tokens_str[i:i+symbol_len] == symbol_tokens_str: location_range = { 'start': {