@@ -42,7 +42,7 @@ pytest-cov = "*"
42
42
43
43
[tool .poetry .group .linter .dependencies ]
44
44
# pythonバージョンを指定している理由:lintは開発環境と同じPythonバージョンで実行するため。また古いPythonバージョンにサポートしていないライブラリのバージョンがあるため
45
- ruff = {version =" ^0.8 " , python = " >=3.12" }
45
+ ruff = {version =" ^0.9 " , python = " >=3.12" }
46
46
mypy = {version =" ^1" , python = " >=3.12" }
47
47
pylint = {version =" ^3" , python = " >=3.12" }
48
48
@@ -84,10 +84,13 @@ target-version = "py39"
84
84
line-length = 150
85
85
exclude = [
86
86
" annofabapi/__init__.py" ,
87
- " annofabapi/pydantic_models/" , # 自動生成したファイルはチェックしない
88
87
]
89
88
90
89
[tool .ruff .lint ]
90
+ exclude = [
91
+ ' annofabapi/pydantic_models/.*\.py' ,
92
+ ]
93
+
91
94
ignore = [
92
95
" FA100" , # `future-rewritable-type-annotation` : Python3.8をサポートしている間は無視する。
93
96
" PD002" , # すでにpandasで`inplace=True`はいろんなところで使っているため
@@ -143,6 +146,7 @@ select = [
143
146
" PLC2401" , # non-ascii-name, メソッド名に日本語を利用するため
144
147
]
145
148
149
+
146
150
# 以下のファイルは自動生成されるので、いくかのルールを無視する
147
151
"annofabapi/generated*.py" = [
148
152
" A002" , # builtin-argument-shadowing
@@ -159,7 +163,24 @@ select = [
159
163
" W291" , # trailing-whitespace
160
164
]
161
165
166
+ # "annofabapi/pydantic_models/*.py" = ["ALL"]
162
167
168
+ "annofabapi/pydantic_models/*.py" = [
169
+ " A" , # flake8-builtins
170
+ " E501" , # line-too-long
171
+ # "W293", # blank-line-with-whitespace
172
+ # "W291", # trailing-whitespace
173
+ " UP007" , # non-pep604-annotation-union
174
+ " UP006" , # non-pep585-annotation
175
+ " UP035" , # deprecated-import
176
+ " E402" , # module-level-imports
177
+ " C4" , # nnecessary-literal-set
178
+ " F841" ,
179
+ " ANN" , # flake8-annotations
180
+ " PLR" , # Pylint Refactor
181
+ " PERF" , # Perflint
182
+ " F811" , # redefined-while-unused
183
+ ]
163
184
164
185
[tool .ruff .lint .pydocstyle ]
165
186
convention = " google"
0 commit comments