Skip to content

Commit 493f3d5

Browse files
committed
refactor: update ruff configuration and improve linting rules
1 parent db9bf72 commit 493f3d5

1 file changed

Lines changed: 76 additions & 18 deletions

File tree

pyproject.toml

Lines changed: 76 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,42 +32,100 @@ dependencies = [
3232
[tool.hatch.build.targets.wheel]
3333
packages = ["src/project", "src"]
3434

35+
[tool.uv]
36+
default-groups = ["dev"]
37+
3538
[tool.ruff]
36-
line-length = 119
3739
target-version = "py313"
38-
exclude = [".git", ".venv", "__pycache__", "data", "dist", "misc", "notebooks", "prof", "tmp", "workspacea", ".tox"]
39-
40-
[tool.ruff.format]
41-
quote-style = "single"
42-
indent-style = "space"
43-
skip-magic-trailing-comma = false
44-
line-ending = "auto"
40+
line-length = 119
41+
indent-width = 4
42+
exclude = [
43+
".bzr",
44+
".direnv",
45+
".eggs",
46+
".git",
47+
".git-rewrite",
48+
".hg",
49+
".ipynb_checkpoints",
50+
".mypy_cache",
51+
".nox",
52+
".pants.d",
53+
".pyenv",
54+
".pytest_cache",
55+
".pytype",
56+
".ruff_cache",
57+
".svn",
58+
".tox",
59+
".venv",
60+
".vscode",
61+
"__pypackages__",
62+
"_build",
63+
"buck-out",
64+
"build",
65+
"dist",
66+
"node_modules",
67+
"site-packages",
68+
"venv",
69+
]
4570

4671
[tool.ruff.lint]
47-
extend-select = [
48-
"I", # isort
72+
select = ["ALL"]
73+
ignore = [
74+
"D100",
75+
"D101",
76+
"D102",
77+
"D103",
78+
"D104",
79+
"D105",
80+
"D106",
81+
"D107",
82+
"D203",
83+
"D213",
84+
"G004",
85+
"Q000",
86+
"Q003",
87+
"EM101",
88+
"EM102",
89+
"COM812",
90+
"FBT001",
91+
"FBT002",
92+
"TRY003",
93+
"INP001",
94+
]
95+
fixable = ["ALL"]
96+
unfixable = []
97+
98+
[tool.ruff.lint.per-file-ignores]
99+
"tests/**/*.py" = [
100+
"S101",
101+
"PLR2004",
49102
]
50-
# ignores
51-
ignore = ["E501"]
52103

53104
[tool.ruff.lint.isort]
54-
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
105+
section-order = [
106+
"future",
107+
"standard-library",
108+
"third-party",
109+
"first-party",
110+
"local-folder",
111+
]
55112
split-on-trailing-comma = true
56113

57-
[tool.ruff.lint.pyupgrade]
58-
# Python3.8互換のための設定
59-
keep-runtime-typing = true
114+
[tool.ruff.format]
115+
quote-style = "single"
116+
indent-style = "space"
117+
skip-magic-trailing-comma = false
118+
line-ending = "auto"
60119

61120
[tool.mypy]
62121
python_version="3.13"
63122
files = "src"
64123
ignore_missing_imports = true
65124
disallow_untyped_defs = true
66125
no_implicit_optional = true
67-
allow_redefinition = true
126+
allow_redefinition = false
68127
show_error_codes = true
69128
pretty = true
70-
allow_untyped_globals = true
71129

72130
[tool.pytest.ini_options]
73131
filterwarnings = ["ignore::DeprecationWarning",]

0 commit comments

Comments
 (0)