1
0
forked from VimPlug/jedi

keyword statement not includes globals

This commit is contained in:
Dave Halter
2014-03-05 00:44:19 +01:00
parent f4b235a35d
commit 2322edff8f
3 changed files with 12 additions and 18 deletions

View File

@@ -913,9 +913,8 @@ isinstance(c, (tokenize.Token, Operator)) else unicode(c)
return self._set_vars + self.as_names
def is_global(self):
# first keyword of the first token is global -> must be a global
tok = self._token_list[0]
return isinstance(tok, Name) and str(tok) == "global"
p = self.parent
return isinstance(p, KeywordStatement) and p.name == 'global'
@property
def assignment_details(self):