forked from pool/python-parso
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parso?expand=0&rev=25
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
From 0234a70e95199d4b9bb257d9ea7a5fcb8baa8c91 Mon Sep 17 00:00:00 2001
|
|
From: Dave Halter <davidhalter88@gmail.com>
|
|
Date: Fri, 28 Feb 2020 00:31:50 +0100
|
|
Subject: [PATCH] Python 3.8.2 was released and an error message changed, fixes
|
|
#103
|
|
|
|
---
|
|
parso/python/errors.py | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
diff --git a/parso/python/errors.py b/parso/python/errors.py
|
|
index a6f3ae9..eba4181 100644
|
|
--- a/parso/python/errors.py
|
|
+++ b/parso/python/errors.py
|
|
@@ -976,9 +976,7 @@ def _check_assignment(self, node, is_deletion=False, is_namedexpr=False):
|
|
|
|
if error is not None:
|
|
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 named assignment with %s' % error
|
|
+ message = 'cannot use assignment expressions with %s' % error
|
|
else:
|
|
cannot = "can't" if self._normalizer.version < (3, 8) else "cannot"
|
|
message = ' '.join([cannot, "delete" if is_deletion else "assign to", error])
|