]> git.eshelyaron.com Git - emacs.git/commitdiff
Update special attributes for Python 3.13
authorStefan Kangas <stefankangas@gmail.com>
Fri, 8 Nov 2024 13:21:12 +0000 (14:21 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Nov 2024 15:47:29 +0000 (16:47 +0100)
* lisp/progmodes/python.el (python-font-lock-keywords-level-2)
(python--treesit-special-attributes): Update special attributes,
making it current for Python 3.13.

(cherry picked from commit 11954a3a0ac67d02c18441658c1f250c9ced75de)

lisp/progmodes/python.el

index 5025455f0de9141fd2dc44f75fd10a80d84f4af4..802be01bcb6ed2baf6dd96eb5625c69a4e28b4fa 100644 (file)
@@ -718,10 +718,11 @@ class declarations.")
            "aiter" "anext" "ascii" "breakpoint" "bytearray" "bytes" "exec"
            ;; Special attributes:
            ;; https://docs.python.org/3/reference/datamodel.html
-           "__annotations__" "__closure__" "__code__"
-           "__defaults__" "__dict__" "__doc__" "__globals__"
-           "__kwdefaults__" "__name__" "__module__" "__package__"
-           "__qualname__"
+           "__annotations__" "__bases__" "__closure__" "__code__"
+           "__defaults__" "__dict__" "__doc__" "__firstlineno__"
+           "__globals__" "__kwdefaults__" "__name__" "__module__"
+           "__mro__" "__package__" "__qualname__"
+           "__static_attributes__" "__type_params__"
            ;; Extras:
            "__all__")
           symbol-end) . font-lock-builtin-face))
@@ -1034,10 +1035,12 @@ It makes underscores and dots word constituent chars.")
     ">>" ">>=" "|" "|=" "~" "@" "@="))
 
 (defvar python--treesit-special-attributes
-  '("__annotations__" "__closure__" "__code__"
-    "__defaults__" "__dict__" "__doc__" "__globals__"
-    "__kwdefaults__" "__name__" "__module__" "__package__"
-    "__qualname__" "__all__"))
+  '("__annotations__" "__bases__" "__closure__" "__code__"
+    "__defaults__" "__dict__" "__doc__" "__firstlineno__"
+    "__globals__" "__kwdefaults__" "__name__" "__module__"
+    "__mro__" "__package__" "__qualname__"
+    "__static_attributes__" "__type_params__"
+    "__all__"))
 
 (defvar python--treesit-exceptions
   '(;; Python 2 and 3: