Skip to content

Commit 340e9a5

Browse files
authored
update pre-commit hook versions, use new ruff config format (#53)
At least a year ago (I'm not sure when precisely), `ruff` broke up the `[ruff]` table in `pyproject.toml` in favor of storing configuration in several more focused tables, like `[tool.ruff.lint]`. Context: https://github.com/rapidsai/rapids-reviser/pull/51/files#r1755430166 This proposes the following: * using that new format here, to avoid build issues when that deprecation eventually is enforced and becomes an error * updating all the pre-commit hooks w/ `pre-commit autoupdate`
1 parent f4c0c18 commit 340e9a5

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: trailing-whitespace
1313
- id: end-of-file-fixer
1414
- repo: https://github.com/rapidsai/dependency-file-generator
15-
rev: v1.13.11
15+
rev: v1.14.0
1616
hooks:
1717
- id: rapids-dependency-file-generator
1818
args: ["--clean"]
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: codespell
2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.4.8
24+
rev: v0.6.4
2525
hooks:
2626
- id: ruff
2727
args: ["--fix"]
@@ -32,7 +32,7 @@ repos:
3232
- id: verify-copyright
3333
args: [--fix, --main-branch=main]
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: 'v1.10.0'
35+
rev: 'v1.11.2'
3636
hooks:
3737
- id: mypy
3838
args: [

pyproject.toml

+16-3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ include = ["rapids_build_backend*"]
4747
[tool.mypy]
4848
ignore_missing_imports = true
4949

50-
[tool.ruff]
51-
lint.select = ["E", "F", "W", "I", "N", "UP"]
52-
lint.fixable = ["ALL"]
50+
[tool.ruff.lint]
51+
select = [
52+
# pycodestyle (errors)
53+
"E",
54+
# isort
55+
"I",
56+
# pyflakes
57+
"F",
58+
# pep8-naming
59+
"N",
60+
# pyupgrade
61+
"UP",
62+
# pycodestyle (warnings)
63+
"W",
64+
]
65+
fixable = ["ALL"]

0 commit comments

Comments
 (0)