mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-10 05:22:44 +08:00
Fix trailing comma error
This commit is contained in:
committed by
Dave Halter
parent
ee2995c110
commit
e496b07b63
@@ -586,7 +586,7 @@ class _TrailingImportComma(SyntaxRule):
|
||||
message = "trailing comma not allowed without surrounding parentheses"
|
||||
|
||||
def is_issue(self, node):
|
||||
if node.children[-1] == ',':
|
||||
if node.children[-1] == ',' and node.parent.children[-1] != ')':
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user