From a7308fa51d2a1442fb9011a50e207a8307b591ab Mon Sep 17 00:00:00 2001 From: David Halter Date: Sat, 20 Apr 2013 14:11:46 +0430 Subject: [PATCH] removed more unused code --- jedi/common.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/jedi/common.py b/jedi/common.py index 04d17a5d..960d71d3 100644 --- a/jedi/common.py +++ b/jedi/common.py @@ -5,7 +5,6 @@ import functools import tokenizer as tokenize from jedi._compatibility import next, reraise -from jedi import debug from jedi import settings @@ -101,28 +100,7 @@ class NoErrorTokenizer(object): def __next__(self): if self.closed: raise MultiLevelStopIteration() - try: - self.current = next(self.gen) - except tokenize.TokenError: - # We just ignore this error, I try to handle it earlier - as - # good as possible - debug.warning('parentheses not closed error') - return self.__next__() - except IndentationError: - # This is an error, that tokenize may produce, because the code - # is not indented as it should. Here it just ignores this line - # and restarts the parser. - # (This is a rather unlikely error message, for normal code, - # tokenize seems to be pretty tolerant) - debug.warning('indentation error on line %s, ignoring it' % - self.current[2][0]) - # add the starting line of the last position - self.offset = (self.offset[0] + self.current[2][0], - self.current[2][1]) - self.gen = PushBackIterator(tokenize.generate_tokens( - self.readline)) - return self.__next__() - + self.current = next(self.gen) c = list(self.current) # stop if a new class or definition is started at position zero.