Skip to content

Commit

Permalink
update pre-commit hook versions, use new ruff config format (#53)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
jameslamb authored Sep 16, 2024
1 parent f4c0c18 commit 340e9a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.13.11
rev: v1.14.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
Expand All @@ -21,7 +21,7 @@ repos:
hooks:
- id: codespell
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.6.4
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -32,7 +32,7 @@ repos:
- id: verify-copyright
args: [--fix, --main-branch=main]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
rev: 'v1.11.2'
hooks:
- id: mypy
args: [
Expand Down
19 changes: 16 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ include = ["rapids_build_backend*"]
[tool.mypy]
ignore_missing_imports = true

[tool.ruff]
lint.select = ["E", "F", "W", "I", "N", "UP"]
lint.fixable = ["ALL"]
[tool.ruff.lint]
select = [
# pycodestyle (errors)
"E",
# isort
"I",
# pyflakes
"F",
# pep8-naming
"N",
# pyupgrade
"UP",
# pycodestyle (warnings)
"W",
]
fixable = ["ALL"]

0 comments on commit 340e9a5

Please sign in to comment.