From cf0eabc16cf32d69f7612d0e023ef210d84cdde6 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Tue, 11 Mar 2025 08:48:33 +0100 Subject: fix(python): don't highlight attribute name as builtin (#7712) * fix(python): don't highlight attribute name as builtin * fix(python): highlight `@variable.member` correctly for member access context * test: add test * test: expand test * docs: update comment * refactor: change order, remove priority override * style: remove extra newline --- tests/query/highlights/python/fields.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/query/highlights') diff --git a/tests/query/highlights/python/fields.py b/tests/query/highlights/python/fields.py index deb280622..cea9eccb7 100644 --- a/tests/query/highlights/python/fields.py +++ b/tests/query/highlights/python/fields.py @@ -1,9 +1,14 @@ class Fields: + type: str +# ^^^^ @variable.member + def __init__(self, fields: list[int]) -> None: # ^^^ @type.builtin # ^^^^ @constant.builtin self.fields = fields # ^^^^^^ @variable.member + self.type = "foo" +# ^^^^ @variable.member self.__dunderfield__ = None # ^^^^^^^^^^^^^^^ @variable.member self._FunKyFielD = 0 -- cgit v1.2.3-70-g09d2