]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix merge error (bug#71093).
authorkobarity <kobarity@gmail.com>
Sun, 26 May 2024 00:56:29 +0000 (09:56 +0900)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 May 2024 09:04:42 +0000 (11:04 +0200)
(cherry picked from commit 9ca89cb4834a20bc7d38289046d4d05e2212ba50)

lisp/progmodes/python.el

index 79e383a1c1a018ecf9ea6347997efa4a03d06b7c..fea52b2f7d6f32336c80b00396cfdcfa87bdd32c 100644 (file)
@@ -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,