Skip to content

Commit 2735bb2

Browse files
committed
Update ruff configuration to fix deprecation warnings.
ruff has deprecated top-level lint settings, instead they must be moved into a dedicated `lint` section. Additionally, the CLI now needs to be invoked with a `check` subcommand. https://astral.sh/blog/ruff-v0.2.0#configuration-changes astral-sh/ruff#10169
1 parent 5f927d6 commit 2735bb2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pyproject.toml

+8-6
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ extra-dependencies = [
9191
[tool.hatch.envs.lint.scripts]
9292
typing = "mypy --install-types --non-interactive {args:src tests}"
9393
style = [
94-
"ruff {args:.}",
94+
"ruff check {args:.}",
9595
"black --check --diff {args:.}",
9696
]
9797
fmt = [
9898
"black {args:.}",
99-
"ruff --fix {args:.}",
99+
"ruff check --fix {args:.}",
100100
"style",
101101
]
102102
all = [
@@ -112,6 +112,8 @@ skip-string-normalization = true
112112
[tool.ruff]
113113
target-version = "py37"
114114
line-length = 120
115+
116+
[tool.ruff.lint]
115117
select = [
116118
"A",
117119
"ARG",
@@ -161,17 +163,17 @@ unfixable = [
161163
"F401",
162164
]
163165

164-
[tool.ruff.isort]
166+
[tool.ruff.lint.isort]
165167
known-first-party = ["outpack"]
166168

167-
[tool.ruff.flake8-tidy-imports]
169+
[tool.ruff.lint.flake8-tidy-imports]
168170
ban-relative-imports = "all"
169171

170-
[tool.ruff.per-file-ignores]
172+
[tool.ruff.lint.per-file-ignores]
171173
# Tests can use magic values, assertions, and relative imports
172174
"tests/**/*" = ["PLR2004", "S101", "TID252"]
173175

174-
[tool.ruff.pydocstyle]
176+
[tool.ruff.lint.pydocstyle]
175177
convention = "numpy"
176178

177179
[tool.coverage.run]

0 commit comments

Comments
 (0)