exclude: 'setup.py|^docs'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v3.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: check-executables-have-shebangs
  - 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/pycqa/isort
  rev: 5.8.0
  hooks:
  - id: isort

- repo: https://github.com/psf/black
  rev: 22.3.0
  hooks:
  - id: black
    language_version: python3
- repo: https://github.com/pycqa/flake8
  rev: 3.9.1
  hooks:
  - id: flake8
    args: [
        "--max-line-length=140",
        "--extend-ignore=E203,W503"
    ]
- repo: https://github.com/pre-commit/mirrors-mypy
  rev: v0.812
  hooks:
  - id: mypy
    args: [
          "--ignore-missing-imports",
          "--scripts-are-modules",
          "--disallow-incomplete-defs",
          "--no-implicit-optional",
          "--warn-unused-ignores",
          "--warn-redundant-casts",
          "--strict-equality",
          "--warn-unreachable",
          "--disallow-untyped-defs",
          "--disallow-untyped-calls",
      ]
- repo: local
  hooks:
  - id: flynt
    name: flynt
    entry: flynt
    args: [--fail-on-change]
    types: [python]
    language: python
    additional_dependencies:
        - flynt
