Skip to content

Commit 81feaf3

Browse files
committed
Ignore class definitions within 'class_definitions_order' linter check
1 parent 06e1364 commit 81feaf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gdtoolkit/linter/class_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def _is_statement_irrelevant(statement: Statement) -> bool:
105105
return True
106106
if statement.kind == "annotation":
107107
return Annotation(statement.lark_node).name != "tool"
108+
if statement.kind == "class_def":
109+
return True
108110
return False
109111

110112

@@ -135,8 +137,6 @@ def _map_statement_to_section(statement: Statement) -> str:
135137
and Annotation(statement.lark_node).name == "tool"
136138
):
137139
return "tools"
138-
if statement.kind == "class_def":
139-
return "others"
140140
if statement.kind == "func_def":
141141
return "others"
142142
if statement.kind == "static_func_def":

0 commit comments

Comments
 (0)