clean up parse_dot_name and other small things
This commit is contained in:
1 parent
1f7e4ca637
commit
66a488b911
3 files changed
+7
-16
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user