forked from VimPlug/jedi
indentation reduced with iterator (see previous commit)
This commit is contained in:
@@ -1615,8 +1615,7 @@ class PyFuzzyParser(object):
|
||||
#debug.dbg('main: tok=[%s] type=[%s] indent=[%s]'\
|
||||
# % (tok, tokenize.tok_name[token_type], start_position[0]))
|
||||
|
||||
while token_type == tokenize.DEDENT \
|
||||
and self.scope != self.module:
|
||||
while token_type == tokenize.DEDENT and self.scope != self.module:
|
||||
token_type, tok = self.next()
|
||||
if self.start_pos[1] <= self.scope.start_pos[1]:
|
||||
self.scope.end_pos = self.start_pos
|
||||
@@ -1644,8 +1643,7 @@ class PyFuzzyParser(object):
|
||||
elif tok == 'class':
|
||||
cls = self._parseclass()
|
||||
if cls is None:
|
||||
debug.warning("class: syntax error@%s" %
|
||||
self.start_pos[0])
|
||||
debug.warning("class: syntax error@%s" % self.start_pos[0])
|
||||
continue
|
||||
self.freshscope = True
|
||||
self.scope = self.scope.add_scope(cls, decorators)
|
||||
@@ -1678,8 +1676,7 @@ class PyFuzzyParser(object):
|
||||
tok = 'import'
|
||||
mod = None
|
||||
if not mod and not relative_count or tok != "import":
|
||||
debug.warning("from: syntax error@%s" %
|
||||
self.start_pos[0])
|
||||
debug.warning("from: syntax error@%s" % self.start_pos[0])
|
||||
defunct = True
|
||||
if tok != 'import':
|
||||
self.gen.push_back(self._current_full)
|
||||
|
||||
Reference in New Issue
Block a user