From: kobarity Date: Sun, 26 May 2024 00:56:29 +0000 (+0900) Subject: ; Fix merge error (bug#71093). X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f8c8246dc8010695c3bb96b59ae2f9e24238c54;p=emacs.git ; Fix merge error (bug#71093). (cherry picked from commit 9ca89cb4834a20bc7d38289046d4d05e2212ba50) --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 79e383a1c1a..fea52b2f7d6 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -800,8 +800,7 @@ sign in chained assignment." ;; c: Collection = {1, 2, 3} ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'} (,(python-font-lock-assignment-matcher - (python-rx (or line-start ?\;) (* space) - grouped-assignment-target (* space) + (python-rx grouped-assignment-target (* space) (? ?: (* space) (group (+ not-simple-operator)) (* space)) (group assignment-operator))) (1 font-lock-variable-name-face) @@ -845,17 +844,6 @@ sign in chained assignment." (match-beginning 2)) ; limit the search until the assignment nil (1 font-lock-variable-name-face))) - ;; single assignment with type hints, e.g. - ;; a: int = 5 - ;; b: Tuple[Optional[int], Union[Sequence[str], str]] = (None, 'foo') - ;; c: Collection = {1, 2, 3} - ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'} - (,(python-font-lock-assignment-matcher - (python-rx grouped-assignment-target (* space) - (? ?: (* space) (+ not-simple-operator) (* space)) - (group assignment-operator))) - (1 font-lock-variable-name-face) - (2 'font-lock-operator-face)) ;; special cases ;; (a) = 5 ;; [a] = 5,