mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
fix for an issue with commas in statements
This commit is contained in:
@@ -1128,7 +1128,7 @@ isinstance(c, (tokenize.Token, Operator)) else unicode(c)
|
||||
elif tok_str == '.':
|
||||
if result and isinstance(result[-1], StatementElement):
|
||||
is_chain = True
|
||||
elif tok_str == ',': # implies a tuple
|
||||
elif tok_str == ',' and result: # implies a tuple
|
||||
# expression is now an array not a statement anymore
|
||||
stmt = Statement(self._sub_module, result, result[0].start_pos,
|
||||
tok.end_pos, self.parent, set_name_parents=False)
|
||||
|
||||
@@ -168,7 +168,11 @@ invalid = .call
|
||||
#? str()
|
||||
invalid
|
||||
|
||||
call = ''
|
||||
invalid = call?.call
|
||||
#? str()
|
||||
invalid
|
||||
|
||||
# comma
|
||||
invalid = ,call
|
||||
#? str()
|
||||
invalid
|
||||
|
||||
Reference in New Issue
Block a user