From f8709852e37630c4eef174aaa307c8157af79080 Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Thu, 21 May 2020 20:35:13 +0300 Subject: [PATCH] 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 --- parso/python/errors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parso/python/errors.py b/parso/python/errors.py index eba4181..4908ffe 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -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])