.pre-commit-config.yaml
default_language_version:
python: python3
default_stages: [ pre-commit ]
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: local
hooks:
- id: docformatter
name: docformatter
entry: python -Im docformatter
additional_dependencies:
- docformatter >= 1.7.5
- tomli >= 2.0.0
args: [ "--in-place", "--config", "./pyproject.toml" ]
language: python
types:
- python
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [ cython ]
- id: isort
name: isort (pyi)
types: [ pyi ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml
- id: sort-simple-yaml
- id: check-yaml
args: [ --unsafe ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-use-type-annotations
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3.12
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies:
- black>=24.8
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix, --unsafe-fixes ]