1
0
forked from VimPlug/jedi

clean up parse_dot_name and other small things

This commit is contained in:
Dave Halter
2014-03-05 22:46:11 +01:00
parent 1f7e4ca637
commit 66a488b911
3 changed files with 7 additions and 16 deletions
+1 -7
View File
@@ -108,15 +108,9 @@ class Parser(object):
self.module.temp_used_names.append(el[0])
names = []
if pre_used_token is None:
tok = next(self._gen)
if tok.type != tokenize.NAME and tok.string != '*':
return [], tok # TODO the fuck, why []?
else:
tok = pre_used_token
tok = next(self._gen) if pre_used_token is None else pre_used_token
if tok.type != tokenize.NAME and tok.string != '*':
# token maybe a name or star
return None, tok
first_pos = tok.start_pos