mirror of
https://github.com/davidhalter/parso.git
synced 2026-08-13 03:21:02 +08:00
Python 3.8.2 was released and an error message changed, fixes #103
This commit is contained in:
@@ -976,9 +976,7 @@ class _CheckAssignmentRule(SyntaxRule):
|
|||||||
|
|
||||||
if error is not None:
|
if error is not None:
|
||||||
if is_namedexpr:
|
if is_namedexpr:
|
||||||
# c.f. CPython bpo-39176, should be changed in next release
|
message = 'cannot use assignment expressions with %s' % error
|
||||||
# message = 'cannot use assignment expressions with %s' % error
|
|
||||||
message = 'cannot use named assignment with %s' % error
|
|
||||||
else:
|
else:
|
||||||
cannot = "can't" if self._normalizer.version < (3, 8) else "cannot"
|
cannot = "can't" if self._normalizer.version < (3, 8) else "cannot"
|
||||||
message = ' '.join([cannot, "delete" if is_deletion else "assign to", error])
|
message = ' '.join([cannot, "delete" if is_deletion else "assign to", error])
|
||||||
|
|||||||
Reference in New Issue
Block a user