python: Fix highlighting for forward references (#20766)

[PEP484](https://peps.python.org/pep-0484/) defines "Forward references"
for undefined types. This PR treats such annotations as types rather
than strings.
Release Notes:

- Added Python syntax highlighting for forward references.
This commit is contained in:
Jaagup Averin authored and GitHub committed 2024-11-28 09:59:10 +01:00
1 parent 3313a44ee6
commit 572b2deee2
1 file changed
+6
@@ -18,6 +18,12 @@
(tuple (identifier) @type)
)
; Forward references
(type
(string) @type
)
; Function calls
(decorator