Skip to content

Commit

Permalink
build(ci): Upgrade pre-commit hooks (#2)
Browse files Browse the repository at this point in the history
This commit contains a couple of changes of linters
- Moves section `[tool.ruff.lint]` under `[tool.ruff]` in
`pyproject.toml`, according to schema validation from [Even Better
TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml);
- Removes rule
[`ANN101`](https://docs.astral.sh/ruff/rules/missing-type-self/) which
has been deprecated in Ruff.
- Updates a few pre-commit hooks
  - shfmt: v3.8.0-1 ~ v3.10.0-2
  - ruff: v0.4.7 ~ v0.8.4
  - mypy: v1.11.1 ~ v1.14.0
  - clang-format: v18.1.5 ~ v19.1.5
  - cython-lint: v0.16.2 ~ v0.16.6
  - conventional commit: v2.1.1 ~ v4.0.0
  • Loading branch information
potatomashed authored Dec 29, 2024
1 parent 956a500 commit ab9fce6
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 76 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ repos:
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.8.4
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.11.1"
rev: "v1.14.0"
hooks:
- id: mypy
additional_dependencies: ['numpy >= 1.22', "ml-dtypes >= 0.1", "pytest"]
args: [--show-error-codes]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v18.1.5"
rev: "v19.1.5"
hooks:
- id: clang-format
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
rev: v0.16.6
hooks:
- id: cython-lint
- id: double-quote-cython-strings
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
rev: v3.10.0-2
hooks:
- id: shfmt
- repo: https://github.com/shellcheck-py/shellcheck-py
Expand All @@ -47,7 +47,7 @@ repos:
# - id: cmake-format
# - id: cmake-lint
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand Down
Loading

0 comments on commit ab9fce6

Please sign in to comment.