|
92 | 92 |
|
93 | 93 | (assignment left: [(identifier) @variable |
94 | 94 | (_ attribute: _ @member_variable)]) |
95 | | -(class_definition (_ (_ (assignment left: (identifier) @member_variable)))) |
| 95 | +(class_definition (_ (assignment left: (identifier) @member_variable))) |
96 | 96 |
|
97 | 97 | (assignment left: (identifier) @type |
98 | 98 | (#match? @type "^[A-Z]")) |
99 | 99 | ([(assignment left: (_ attribute: _ @member_type)) |
100 | | - (class_definition (_ (_ (assignment left: (identifier) @member_type))))] |
| 100 | + (class_definition (_ (assignment left: (identifier) @member_type)))] |
101 | 101 | (#match? @member_type "^[A-Z]")) |
102 | 102 |
|
103 | 103 | (assignment |
104 | 104 | left: (identifier) @constant |
105 | 105 | (#match? @constant "^[A-Z_0-9]*$")) |
106 | 106 | ([(assignment left: (_ attribute: _ @member_constant)) |
107 | | - (class_definition (_ (_ (assignment left: (identifier) @member_constant))))] |
| 107 | + (class_definition (_ (assignment left: (identifier) @member_constant)))] |
108 | 108 | (#match? @member_constant "^[A-Z_0-9]*$")) |
109 | 109 |
|
110 | 110 | (function_definition name: _ @function) |
111 | 111 | (class_definition |
112 | | - (_ (_ |
113 | | - [(function_definition name: _ @member_function) |
114 | | - (decorated_definition (function_definition name: _ @member_function))]))) |
| 112 | + (_ |
| 113 | + [(function_definition name: _ @member_function) |
| 114 | + (decorated_definition (function_definition name: _ @member_function))])) |
115 | 115 | (assignment |
116 | 116 | left: [(identifier) @function |
117 | 117 | (_ attribute: _ @member_function)] |
|
122 | 122 |
|
123 | 123 | (class_definition name: _ @type) |
124 | 124 | (class_definition |
125 | | - (_ (_ |
126 | | - [(class_definition name: _ @member_type) |
127 | | - (decorated_definition (class_definition name: _ @member_type))]))) |
| 125 | + (_ |
| 126 | + [(class_definition name: _ @member_type) |
| 127 | + (decorated_definition (class_definition name: _ @member_type))])) |
128 | 128 |
|
129 | 129 | (parameter name: _ @function_parameter) |
130 | 130 | (keyword_argument name: _ @function_parameter) |
|
140 | 140 | "__loader__" "__name__" "__package__" "__path__" "__spec__")) |
141 | 141 |
|
142 | 142 | ([(member_identifier) @special_member_variable |
143 | | - (class_definition (_ (_ (assignment left: (identifier) @special_member_variable))))] |
| 143 | + (class_definition (_ (assignment left: (identifier) @special_member_variable)))] |
144 | 144 | (#any-of? @special_member_variable "__dict__" "__doc__" "__match_args__" |
145 | 145 | "__metaclass__" "__objclass__" "__slots__" "__weakref__")) |
146 | 146 |
|
147 | 147 | ([(member_identifier) @special_member_constant |
148 | | - (class_definition (_ (_ (assignment left: (identifier) @special_member_constant))))] |
| 148 | + (class_definition (_ (assignment left: (identifier) @special_member_constant)))] |
149 | 149 | (#any-of? @special_member_constant "__annotations__" "__bases__" "__cached__" |
150 | 150 | "__class__" "__classcell__" "__closure__" "__code__" "__defaults__" "__file__" |
151 | 151 | "__firstlineno__" "__func__" "__globals__" "__kwdefaults__" "__loader__" |
152 | 152 | "__module__" "__mro__" "__name__" "__package__" "__path__" "__qualname__" |
153 | 153 | "__self__" "__spec__" "__static_attributes__" "__type_params__")) |
154 | 154 |
|
155 | 155 | ([(member_identifier) @_name @special_member_function |
156 | | - (class_definition (_ (_ [(assignment left: (identifier) @_name @special_member_function) |
157 | | - (function_definition name: _ @_name @special_member_function)]))) |
| 156 | + (class_definition (_ [(assignment left: (identifier) @_name @special_member_function) |
| 157 | + (function_definition name: _ @_name @special_member_function)])) |
158 | 158 | (module (function_definition name: _ @_name @special_function))] |
159 | 159 | (#any-of? @_name "__abs__" "__add__" "__aenter__" "__aexit__" "__aiter__" |
160 | 160 | "__and__" "__anext__" "__await__" "__bool__" "__buffer__" "__bytes__" |
|
0 commit comments