* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 → 39d9ac5938dadb73df0564a45f163e25ff9fa6e2](https://github.com/astral-sh/ruff-pre-commit/compare/c59bba8fb259db0fec2bbb77ad8ba51ea7341b56...39d9ac5938dadb73df0564a45f163e25ff9fa6e2) - [github.com/pre-commit/mirrors-mypy: d2823d321df3af8f878f7ee3414dc94d037145b9 → 41e691678310dfd3833f7ab4e180ddb014310356](https://github.com/pre-commit/mirrors-mypy/compare/d2823d321df3af8f878f7ee3414dc94d037145b9...41e691678310dfd3833f7ab4e180ddb014310356) - [github.com/codespell-project/codespell: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a → 57b21406f092110c18776e39b0bda50d37c945c8](https://github.com/codespell-project/codespell/compare/2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a...57b21406f092110c18776e39b0bda50d37c945c8) * chore: fix lint errors from new ruff rules Ruff 0.16 enables BLE, TRY, and N999 by default. Use local noqa excludes for the blind-except catches, ignore TRY002 and N999 in tests, and drop the pylint equivalents. Assisted-by: ClaudeCode:claude-opus-5 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
ci:
|
|
autoupdate_schedule: monthly
|
|
exclude: "^cibuildwheel/resources/ios-support/(?!make_cross_venv\\.py)"
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
|
hooks:
|
|
- id: check-case-conflict
|
|
- id: check-merge-conflict
|
|
- id: check-yaml
|
|
- id: check-toml
|
|
- id: debug-statements
|
|
- id: end-of-file-fixer
|
|
exclude: (cibuildwheel/resources/pinned_docker_images.cfg)|(.svg$)
|
|
- id: mixed-line-ending
|
|
- id: trailing-whitespace
|
|
exclude: ^cibuildwheel/resources/android/android.patch$
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: 39d9ac5938dadb73df0564a45f163e25ff9fa6e2 # frozen: v0.16.1
|
|
hooks:
|
|
- id: ruff-check
|
|
args: ["--fix"]
|
|
- id: ruff-format
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: 41e691678310dfd3833f7ab4e180ddb014310356 # frozen: v2.3.0
|
|
hooks:
|
|
- id: mypy
|
|
name: mypy 3.11 on cibuildwheel/
|
|
args: ["--python-version=3.11"]
|
|
exclude: ^cibuildwheel/resources/android/_cross_venv.py$ # Requires Python 3.13 or later
|
|
additional_dependencies: &mypy-dependencies
|
|
- bracex
|
|
- build
|
|
- dependency-groups>=1.2
|
|
- humanize
|
|
- nox>=2025.2.9
|
|
- packaging
|
|
- pygithub
|
|
- pytest
|
|
- rich
|
|
- tomli_w
|
|
- types-certifi
|
|
- types-click
|
|
- types-jinja2
|
|
- types-pyyaml
|
|
- types-requests
|
|
- types-setuptools
|
|
- uv
|
|
- validate-pyproject
|
|
- id: mypy
|
|
name: mypy 3.14
|
|
args: ["--python-version=3.14"]
|
|
additional_dependencies: *mypy-dependencies
|
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.0.1
|
|
hooks:
|
|
- id: shellcheck
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: disallow-caps
|
|
name: Disallow improper capitalization
|
|
language: pygrep
|
|
entry: PyBind|Numpy|Cmake|Github|PyTest
|
|
types: [markdown]
|
|
exclude: ^docs/working-examples\.md$ # Autogenerated
|
|
- id: cog
|
|
name: Cog the README
|
|
language: python
|
|
pass_filenames: false
|
|
entry: cog -c -P -r -I ./bin README.md
|
|
files: '^(README\.md|docs/changelog\.md|docs/options\.md|bin/readme.*)$'
|
|
additional_dependencies: [cogapp>=3.5]
|
|
|
|
- repo: https://github.com/henryiii/flake8-lazy
|
|
rev: 5fed9a818f2583f0403aed779bf2b6c9aa8d25f4 # frozen: v0.8.5
|
|
hooks:
|
|
- id: flake8-lazy
|
|
args: ["--apply=set"]
|
|
files: '^cibuildwheel'
|
|
exclude: "^cibuildwheel/resources/"
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
|
|
hooks:
|
|
- id: codespell
|
|
args: ["-w"]
|
|
exclude: ^docs/working-examples\.md$ # Autogenerated
|
|
|
|
|
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
rev: 1a4bb160cab6417b3045e1b37b6b72449243e658 # frozen: 0.37.4
|
|
hooks:
|
|
- id: check-dependabot
|
|
- id: check-github-actions
|
|
- id: check-github-workflows
|
|
- id: check-gitlab-ci
|
|
- id: check-readthedocs
|
|
- id: check-jsonschema
|
|
name: Check projects
|
|
args: [--schemafile, docs/data/projects.schema.json]
|
|
files: '^docs/data/projects.yml$'
|
|
- id: check-metaschema
|
|
files: '^docs/data/projects.schema.json$'
|