aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/highlights.scm12
1 files changed, 2 insertions, 10 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 18ed5162f..780e2a5c0 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -134,6 +134,8 @@
[(true) (false)] @boolean
((identifier) @variable.builtin
(#eq? @variable.builtin "self"))
+((identifier) @variable.builtin
+ (#eq? @variable.builtin "cls"))
(integer) @number
(float) @float
@@ -288,15 +290,5 @@
name: (identifier) @constructor)))
(#any-of? @constructor "__new__" "__init__"))
-; First parameter of a classmethod is cls.
-((class_definition
- body: (block
- (decorated_definition
- (decorator (identifier) @_decorator)
- definition: (function_definition
- parameters: (parameters . (identifier) @variable.builtin)))))
- (#eq? @variable.builtin "cls")
- (#eq? @_decorator "classmethod"))
-
;; Error
(ERROR) @error