aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/python/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/query/highlights/python/fields.py')
-rw-r--r--tests/query/highlights/python/fields.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/query/highlights/python/fields.py b/tests/query/highlights/python/fields.py
index cea9eccb7..cbe80cdc2 100644
--- a/tests/query/highlights/python/fields.py
+++ b/tests/query/highlights/python/fields.py
@@ -2,12 +2,15 @@ class Fields:
type: str
# ^^^^ @variable.member
- def __init__(self, fields: list[int]) -> None:
-# ^^^ @type.builtin
-# ^^^^ @constant.builtin
+ def __init__(self, type: str, fields: list[int]) -> None:
+# ^^^^ @variable.builtin
+# ^^^^ @variable.parameter
+# ^^^^^^ @variable.parameter
+# ^^^ @type.builtin
+# ^^^^ @constant.builtin
self.fields = fields
# ^^^^^^ @variable.member
- self.type = "foo"
+ self.type = type # this cannot be highlighted correctly by Treesitter
# ^^^^ @variable.member
self.__dunderfield__ = None
# ^^^^^^^^^^^^^^^ @variable.member
@@ -15,3 +18,7 @@ class Fields:
# ^^^^^^^^^^^ @variable.member
self.NOT_A_FIELD = "IM NOT A FIELD"
# ^^^^^^^^^^^ @constant
+
+Fields(type="schema", fields=[0, 1])
+# ^^^^ @variable.parameter
+# ^^^^^^ @variable.parameter