# disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix ci: autofix_prs: false repos: # generic verification and formatting - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: # ensure syntaxes are valid - id: check-toml - id: check-yaml exclude: ^(conda\.)?recipe/meta.yaml # catch git merge/rebase problems - id: check-merge-conflict # sort requirements files - id: file-contents-sorter files: | (?x)^( docs/requirements.txt | tests/requirements.*\.txt ) args: [--unique] # other - id: check-added-large-files - id: check-ast - id: fix-byte-order-marker - id: check-case-conflict - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: debug-statements - id: detect-private-key - repo: https://github.com/adamchainz/blacken-docs rev: 1.20.0 hooks: # auto format Python codes within docstrings - id: blacken-docs - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.15 hooks: # lint & attempt to correct failures (e.g. pyupgrade) - id: ruff-check args: [--fix] # compatible replacement for black - id: ruff-format - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.37.2 hooks: # verify github syntaxes - id: check-github-workflows - id: check-dependabot - repo: meta # see https://pre-commit.com/#meta-hooks hooks: - id: check-hooks-apply - id: check-useless-excludes