aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorkobarity2024-05-26 09:56:29 +0900
committerEli Zaretskii2024-05-26 11:21:07 +0300
commit9ca89cb4834a20bc7d38289046d4d05e2212ba50 (patch)
treee3ffa70ec14577ca6fc5cdacafd1b08222da150e /lisp/progmodes/python.el
parent06541762d7d994bedf0c0bd20601047d43de25d5 (diff)
downloademacs-9ca89cb4834a20bc7d38289046d4d05e2212ba50.tar.gz
emacs-9ca89cb4834a20bc7d38289046d4d05e2212ba50.zip
; Fix merge error (bug#71093).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el14
1 files changed, 1 insertions, 13 deletions
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."
800 ;; c: Collection = {1, 2, 3} 800 ;; c: Collection = {1, 2, 3}
801 ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'} 801 ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'}
802 (,(python-font-lock-assignment-matcher 802 (,(python-font-lock-assignment-matcher
803 (python-rx (or line-start ?\;) (* space) 803 (python-rx grouped-assignment-target (* space)
804 grouped-assignment-target (* space)
805 (? ?: (* space) (group (+ not-simple-operator)) (* space)) 804 (? ?: (* space) (group (+ not-simple-operator)) (* space))
806 (group assignment-operator))) 805 (group assignment-operator)))
807 (1 font-lock-variable-name-face) 806 (1 font-lock-variable-name-face)
@@ -845,17 +844,6 @@ sign in chained assignment."
845 (match-beginning 2)) ; limit the search until the assignment 844 (match-beginning 2)) ; limit the search until the assignment
846 nil 845 nil
847 (1 font-lock-variable-name-face))) 846 (1 font-lock-variable-name-face)))
848 ;; single assignment with type hints, e.g.
849 ;; a: int = 5
850 ;; b: Tuple[Optional[int], Union[Sequence[str], str]] = (None, 'foo')
851 ;; c: Collection = {1, 2, 3}
852 ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'}
853 (,(python-font-lock-assignment-matcher
854 (python-rx grouped-assignment-target (* space)
855 (? ?: (* space) (+ not-simple-operator) (* space))
856 (group assignment-operator)))
857 (1 font-lock-variable-name-face)
858 (2 'font-lock-operator-face))
859 ;; special cases 847 ;; special cases
860 ;; (a) = 5 848 ;; (a) = 5
861 ;; [a] = 5, 849 ;; [a] = 5,