mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-26 04:07:14 +08:00
dict literals are now working (at least the parser)
This commit is contained in:
@@ -43,7 +43,7 @@ class CompiledObject(Base):
|
||||
self.doc = inspect.getdoc(obj)
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s: %s>' % (type(self).__name__, self.obj)
|
||||
return '<%s: %s>' % (type(self).__name__, repr(self.obj))
|
||||
|
||||
def get_parent_until(self, *args, **kwargs):
|
||||
# compiled modules only use functions and classes/methods (2 levels)
|
||||
|
||||
@@ -1058,13 +1058,12 @@ isinstance(c, (tokenize.Token, Operator)) else unicode(c)
|
||||
names_are_set_vars=False):
|
||||
stmt, tok = parse_stmt(token_iterator, allow_comma=True,
|
||||
added_breaks=added_breaks)
|
||||
if not stmt:
|
||||
return None, tok
|
||||
|
||||
for t in stmt._token_list:
|
||||
if isinstance(t, Name):
|
||||
t.parent = stmt
|
||||
stmt._names_are_set_vars = names_are_set_vars
|
||||
if stmt is not None:
|
||||
for t in stmt._token_list:
|
||||
if isinstance(t, Name):
|
||||
t.parent = stmt
|
||||
stmt._names_are_set_vars = names_are_set_vars
|
||||
return stmt, tok
|
||||
|
||||
st = Statement(self._sub_module, token_list, start_pos,
|
||||
|
||||
Reference in New Issue
Block a user