mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-02 01:23:41 +08:00
Adapt Python3.9 errors on multiple star target
In Python3.9, the message "two starred expression in ..." changed to "multiple starred expression in ...", with python/cpython#19168
This commit is contained in:
committed by
Dave Halter
parent
2dcc0d3770
commit
f8709852e3
@@ -684,7 +684,10 @@ class _StarExprParentRule(SyntaxRule):
|
||||
args = [c for c in node.children if c != ',']
|
||||
starred = [c for c in args if c.type == 'star_expr']
|
||||
if len(starred) > 1:
|
||||
message = "two starred expressions in assignment"
|
||||
if self._normalizer.version < (3, 9):
|
||||
message = "two starred expressions in assignment"
|
||||
else:
|
||||
message = "multiple starred expressions in assignment"
|
||||
self.add_issue(starred[1], message=message)
|
||||
elif starred:
|
||||
count = args.index(starred[0])
|
||||
|
||||
Reference in New Issue
Block a user