Skip to content
.pre-commit-config.yaml 2.47 KiB
Newer Older
default_stages: [commit]
repos:

- repo: meta
  hooks:
  - id: check-hooks-apply
  - id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
Dom Sekotill's avatar
Dom Sekotill committed
  rev: v4.4.0
  hooks:
  - id: check-added-large-files
  - id: check-case-conflict
  - id: check-docstring-first
  - id: check-merge-conflict
  - id: check-yaml
    args: [--allow-multiple-documents]
  - id: debug-statements
  - id: destroyed-symlinks
  - id: end-of-file-fixer
    stages: [commit, manual]
  - id: fix-byte-order-marker
  - id: fix-encoding-pragma
    args: [--remove]
  - id: mixed-line-ending
    args: [--fix=lf]
    stages: [commit, manual]
  - id: trailing-whitespace
    exclude_types: [markdown, plain-text]
    stages: [commit, manual]

- repo: https://github.com/jorisroovers/gitlint
Dom Sekotill's avatar
Dom Sekotill committed
  rev: v0.18.0
  hooks:
  - id: gitlint

- repo: https://code.kodo.org.uk/dom/pre-commit-hooks
  rev: v0.6.1
  hooks:
  - id: check-executable-modes
  - id: check-for-squash
  - id: copyright-notice
    args: [--min-size=100]
    stages: [commit, manual]
  - id: protect-first-parent

- repo: https://github.com/pre-commit/pygrep-hooks
Dom Sekotill's avatar
Dom Sekotill committed
  rev: v1.10.0
  hooks:
  - id: python-no-eval
  - id: python-no-log-warn
  - id: python-use-type-annotations

Dom Sekotill's avatar
Dom Sekotill committed
- repo: https://github.com/hakancelikdev/unimport
  rev: 0.14.1
  hooks:
  - id: unimport
    args: ["--remove", "--include=\\.pyi?$"]
    types: []
    types_or: [python, pyi]
    stages: [commit, manual]

- repo: https://github.com/pycqa/isort
Dom Sekotill's avatar
Dom Sekotill committed
  rev: 5.12.0
  hooks:
  - id: isort
    stages: [commit, manual]

- repo: https://github.com/asottile/add-trailing-comma
Dom Sekotill's avatar
Dom Sekotill committed
  rev: v2.4.0
  hooks:
  - id: add-trailing-comma
    args: [--py36-plus]
    types: []
    types_or: [python, pyi]
    stages: [commit, manual]

- repo: https://github.com/flakeheaven/flakeheaven
Dom Sekotill's avatar
Dom Sekotill committed
  rev: 3.2.1
  hooks:
  - id: flakeheaven
    additional_dependencies:
    - flake8-bugbear
    - flake8-docstrings
    - flake8-print
    - flake8-return
    - flake8-sfs

- repo: https://github.com/pre-commit/mirrors-mypy
Dom Sekotill's avatar
Dom Sekotill committed
  rev: v1.0.1
  hooks:
  - id: mypy
    args: [--follow-imports=silent]
    additional_dependencies:
    - packaging >=21
    - types-requests
    - types-urllib3
    - typing-extensions ~=4.0; python_version < "3.10"
      # https://github.com/python-trio/trio-typing/pull/72
    - trio-typing[mypy] @git+https://github.com/gschaffner/trio-typing.git@fix-takes_callable_and_args-TypeVar-binding
    - xdg ~=5.1
    - git+https://code.kodo.org.uk/dom/type-stubs.git#type-stubs[jsonpath,parse]