Skip to content

Commit a837dd3

Browse files
committed
無視すべきルールを追加
1 parent bb149da commit a837dd3

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

pyproject.toml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pytest-cov = "*"
4242

4343
[tool.poetry.group.linter.dependencies]
4444
# pythonバージョンを指定している理由:lintは開発環境と同じPythonバージョンで実行するため。また古いPythonバージョンにサポートしていないライブラリのバージョンがあるため
45-
ruff = {version="^0.8", python = ">=3.12"}
45+
ruff = {version="^0.9", python = ">=3.12"}
4646
mypy = {version="^1", python = ">=3.12"}
4747
pylint = {version="^3", python = ">=3.12"}
4848

@@ -84,10 +84,13 @@ target-version = "py39"
8484
line-length = 150
8585
exclude = [
8686
"annofabapi/__init__.py",
87-
"annofabapi/pydantic_models/", # 自動生成したファイルはチェックしない
8887
]
8988

9089
[tool.ruff.lint]
90+
exclude = [
91+
'annofabapi/pydantic_models/.*\.py',
92+
]
93+
9194
ignore = [
9295
"FA100", # `future-rewritable-type-annotation` : Python3.8をサポートしている間は無視する。
9396
"PD002", #すでにpandasで`inplace=True`はいろんなところで使っているため
@@ -143,6 +146,7 @@ select = [
143146
"PLC2401", # non-ascii-name, メソッド名に日本語を利用するため
144147
]
145148

149+
146150
# 以下のファイルは自動生成されるので、いくかのルールを無視する
147151
"annofabapi/generated*.py" = [
148152
"A002", # builtin-argument-shadowing
@@ -159,7 +163,24 @@ select = [
159163
"W291", # trailing-whitespace
160164
]
161165

166+
# "annofabapi/pydantic_models/*.py" = ["ALL"]
162167

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+
]
163184

164185
[tool.ruff.lint.pydocstyle]
165186
convention = "google"

0 commit comments

Comments
 (0)