forked from VimPlug/jedi
clean up parse_dot_name and other small things
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user