Skip to content
Snippets Groups Projects
.pre-commit-config.yaml 1.12 KiB
Newer Older
exclude: '^docs/conf.py'

default_language_version:
    python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.4.0
  hooks:
  - id: trailing-whitespace
  # - id: check-added-large-files
  - id: check-ast
  - id: check-json
  - id: check-merge-conflict
  - id: check-xml
  - id: check-yaml
  - id: debug-statements
  - id: end-of-file-fixer
  - id: requirements-txt-fixer
  - id: mixed-line-ending
    args: ['--fix=auto']  # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
-   repo: https://github.com/psf/black
    rev: 23.3.0
    hooks:
    - id: black
      language_version: python3.10
- repo: https://github.com/pycqa/isort
  rev: 5.12.0
  hooks:
  - id: isort
    args: ["--profile", "black"]

- repo: https://github.com/PyCQA/flake8
  rev: 6.0.0
  hooks:
  - id: flake8
  ## You can add flake8 plugins via `additional_dependencies`:
  #  additional_dependencies: [flake8-bugbear]
- repo: https://github.com/asottile/pyupgrade
  rev: v3.3.1
  hooks:
  - id: pyupgrade
    args: [--py310-plus]
- repo: https://github.com/dosisod/refurb
  rev: v1.12.0
  hooks:
  - id: refurb