diff --git a/tests/query/highlights/python/decorators.py b/tests/query/highlights/python/decorators.py new file mode 100644 index 000000000..278e4e311 --- /dev/null +++ b/tests/query/highlights/python/decorators.py @@ -0,0 +1,22 @@ +from dataclasses import dataclass + + +@dataclass +#^^^^^^^^^ @attribute +class Data: + _foo: str + + @property +# ^ @attribute +# ^^^^^^^^ @attribute.builtin + def foo(self) -> str: + return self._foo + + +@pytest.mark.filterwarnings("ignore::DeprecationWarning") +#^^^^^^ @variable +# ^^^^ @variable.member +# ^^^^^^^^^^^^^^ @attribute +def test_func(): + pass + diff --git a/tests/query/highlights/python/functions.py b/tests/query/highlights/python/functions.py index 2c2e7b1b3..6d3028433 100644 --- a/tests/query/highlights/python/functions.py +++ b/tests/query/highlights/python/functions.py @@ -11,10 +11,3 @@ class Foo: Foo().method() # ^^^^^^ @function.method.call - -@pytest.mark.filterwarnings("ignore::DeprecationWarning") -#^^^^^^ @variable -# ^^^^ @variable.member -# ^^^^^^^^^^^^^^ @function.method.call -def test_func(): - pass