Skip to content

Commit

Permalink
update pre-commit hook versions, use new ruff config format (#59)
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`

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

URL: #59
  • Loading branch information
jameslamb authored Sep 11, 2024
1 parent 5e6d8e6 commit 864ed0d
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 @@ -5,16 +5,16 @@ exclude: ".*__rdd_patch_.*"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.6.4
hooks:
- id: ruff
args: ["--fix"]
Expand Down
19 changes: 16 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ license-files = ["LICENSE"]
[tool.setuptools.packages.find]
include = ["rapids_dask_dependency*"]

[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 864ed0d

Please sign in to comment.