Skip to content

Commit 8cae7f5

Browse files
Dev-iLclaude
andcommitted
Migrate ruff/mypy config to current conventions
Root pyproject.toml: - Move [tool.ruff.per-file-ignores] and [tool.ruff.pydocstyle] under [tool.ruff.lint.*] — top-level placement was deprecated in ruff 0.2 - Add [dependency-groups] for uv-native dev/lint/test groups psqlpy-stress/pyproject.toml: - Same ruff lint-namespace migration; also move isort under [tool.ruff.lint.isort] - Add COM812 to ignore list (conflicts with ruff-format's trailing-comma style) - Extend [tool.mypy] with ignore_missing_imports, allow_subclassing_any, allow_untyped_calls/decorators, and warn_*=false — psqlpy-stress depends on several untyped third-party packages (sqlalchemy, piccolo, psqlpy, asyncpg) that lack stubs; strict mode needs these flags to stay actionable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3a2d032 commit 8cae7f5

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

psqlpy-stress/pyproject.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ requires = ["poetry-core"]
3535
build-backend = "poetry.core.masonry.api"
3636

3737
[tool.ruff]
38+
line-length = 89
39+
40+
[tool.ruff.lint]
3841
ignore = [
3942
"ANN401",
43+
"COM812",
4044
"SLF001",
4145
"TRY003",
4246
"PLR0913",
@@ -47,13 +51,18 @@ ignore = [
4751
"D",
4852
"T201",
4953
]
50-
line-length = 89
5154
select = ["ALL"]
5255
fixable = ["ALL"]
5356

54-
[tool.ruff.isort]
57+
[tool.ruff.lint.isort]
5558
lines-after-imports = 2
5659
no-lines-before = ["standard-library", "local-folder"]
5760

5861
[tool.mypy]
5962
strict = true
63+
ignore_missing_imports = true
64+
allow_subclassing_any = true
65+
allow_untyped_calls = true
66+
allow_untyped_decorators = true
67+
warn_return_any = false
68+
warn_unused_ignores = false

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ maintainers = [{ name = "Kiselev Aleksandr", email = "askiselev00@gmail.com" }]
3939
description = "Async PostgreSQL driver for Python written in Rust"
4040
dynamic = ["version"]
4141

42+
[dependency-groups]
43+
dev = [
44+
{include-group = "lint"},
45+
{include-group = "test"}
46+
]
47+
lint = [
48+
"ruff"
49+
]
50+
test = [
51+
"pytest"
52+
]
53+
4254
[tool.maturin]
4355
python-source = "python"
4456
module-name = "psqlpy._internal"
@@ -89,7 +101,7 @@ ignore = [
89101
"S311",
90102
]
91103

92-
[tool.ruff.per-file-ignores]
104+
[tool.ruff.lint.per-file-ignores]
93105
"python/psqlpy/*" = ["PYI021"]
94106
"python/tests/*" = [
95107
"S101", # Use of assert detected
@@ -104,7 +116,7 @@ ignore = [
104116
"./psqlpy-stress/psqlpy_stress/migrations/env.py" = ["INP001"]
105117
"examples/*" = ["INP001"]
106118

107-
[tool.ruff.pydocstyle]
119+
[tool.ruff.lint.pydocstyle]
108120
convention = "pep257"
109121
ignore-decorators = ["typing.overload"]
110122

0 commit comments

Comments
 (0)