diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a44d4215d7c..e2f614f52c2 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1117,7 +1117,7 @@ fontified." | |||
| 1117 | 1117 | ||
| 1118 | (defun python--treesit-fontify-union-types (node override start end &optional type-regex &rest _) | 1118 | (defun python--treesit-fontify-union-types (node override start end &optional type-regex &rest _) |
| 1119 | "Fontify nested union types in the type hints. | 1119 | "Fontify nested union types in the type hints. |
| 1120 | For examlpe, Lvl1 | Lvl2[Lvl3[Lvl4[Lvl5 | None]], Lvl2]. This | 1120 | For example, Lvl1 | Lvl2[Lvl3[Lvl4[Lvl5 | None]], Lvl2]. This |
| 1121 | structure is represented via nesting binary_operator and | 1121 | structure is represented via nesting binary_operator and |
| 1122 | subscript nodes. This function iterates over all levels and | 1122 | subscript nodes. This function iterates over all levels and |
| 1123 | highlight identifier nodes. If TYPE-REGEX is not nil fontify type | 1123 | highlight identifier nodes. If TYPE-REGEX is not nil fontify type |
| @@ -1275,7 +1275,7 @@ fontified." | |||
| 1275 | (subscript (identifier) @font-lock-type-face) | 1275 | (subscript (identifier) @font-lock-type-face) |
| 1276 | (subscript (attribute attribute: (identifier) @font-lock-type-face))])) | 1276 | (subscript (attribute attribute: (identifier) @font-lock-type-face))])) |
| 1277 | 1277 | ||
| 1278 | ;; Patern matching: case [str(), pack0.Type0()]. Take only the | 1278 | ;; Pattern matching: case [str(), pack0.Type0()]. Take only the |
| 1279 | ;; last identifier. | 1279 | ;; last identifier. |
| 1280 | (class_pattern (dotted_name (identifier) @font-lock-type-face :anchor)) | 1280 | (class_pattern (dotted_name (identifier) @font-lock-type-face :anchor)) |
| 1281 | 1281 | ||