1
0
forked from VimPlug/jedi

Fix most flake8 issues (fixes #205)

This commit is contained in:
Danilo Bargen
2013-04-27 15:40:36 +02:00
parent 406e70d51a
commit 86d775324b
11 changed files with 75 additions and 52 deletions

View File

@@ -401,10 +401,10 @@ class Parser(object):
with common.ignored(IndexError, AttributeError):
# If string literal is being parsed
first_tok = stmt.token_list[0]
if (not stmt.set_vars and
not stmt.used_vars and
len(stmt.token_list) == 1 and
first_tok[0] == tokenize.STRING):
if (not stmt.set_vars
and not stmt.used_vars
and len(stmt.token_list) == 1
and first_tok[0] == tokenize.STRING):
# ... then set it as a docstring
self.scope.statements[-1].add_docstr(first_tok[1])
@@ -434,7 +434,7 @@ class Parser(object):
if self.user_position and (self.start_pos[0] == self.user_position[0]
or self.user_scope is None
and self.start_pos[0] >= self.user_position[0]):
debug.dbg('user scope found [%s] = %s' % \
debug.dbg('user scope found [%s] = %s' %
(self.parserline.replace('\n', ''), repr(self.scope)))
self.user_scope = self.scope
self.last_token = self.current