repos:

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.0.1
    hooks:
      - id: no-commit-to-branch
        stages:
          - push
          - commit
      - id: trailing-whitespace
        exclude: '.bumpversion.cfg'
      - id: end-of-file-fixer
      - id: detect-private-key
      - id: check-yaml
      - id: check-ast
      - id: debug-statements

  - repo: https://github.com/psf/black
    rev: 22.3.0
    hooks:
      - id: black
        language_version: python3

  - repo: local
    hooks:
      - id: linting
        name: Lint and format code with (flake8, isort, mypy, black)
        language: system
        entry: make local-lint
        pass_filenames: false
        stages:
          - push
