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
+1
View File
@@ -1473,6 +1473,7 @@ class Operator(Base):
__slots__ = ('string', '_line', '_column')
def __init__(self, string, start_pos):
# TODO needs module param
self.string = string
self._line = start_pos[0]
self._column = start_pos[1]