File tree Expand file tree Collapse file tree 5 files changed +13
-0
lines changed Expand file tree Collapse file tree 5 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1010 - Fixed ` max-public-methods ` linter check disabling (#222 )
1111 - Default regex for names of constants now allows underscore as a prefix to denote private contants (#223 )
1212 - Fixed parsing of files without newline at the end of file ending with comment (#237 )
13+ - Fixed linter support for docstrings (#233 )
1314
1415## [ 4.1.0] 2023-07-06
1516
Original file line number Diff line number Diff line change 6161 "tools" ,
6262 "classnames" ,
6363 "extends" ,
64+ "docstrings" ,
6465 "signals" ,
6566 "enums" ,
6667 "consts" ,
Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ def _map_statement_to_section(statement: Statement) -> str:
141141 return "others"
142142 if statement .kind == "static_func_def" :
143143 return "others"
144+ if statement .kind == "docstr_stmt" :
145+ return "docstrings"
144146 raise NotImplementedError
145147
146148
Original file line number Diff line number Diff line change @@ -9,3 +9,8 @@ def test_newlineless_code():
99 code = """func foo():
1010 pass"""
1111 lint_code (code )
12+
13+
14+ def test_docstring ():
15+ code = '"""\n hello world!\n """'
16+ lint_code (code )
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ def test_private_method_call_nok(code):
3636pass
3737class_name Foo
3838extends Node
39+ "docstring"
3940signal s
4041enum { A, B, C }
4142const X = 1
@@ -90,6 +91,9 @@ class X: var x;extends Node
9091"""static func foo(): pass
9192var x
9293""" ,
94+ """'docstring'
95+ extends Node
96+ """ ,
9397])
9498def test_class_definitions_order_nok (code ):
9599 simple_nok_check (code , 'class-definitions-order' )
You can’t perform that action at this time.
0 commit comments