repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.3.0
    hooks:
    -   id: check-yaml
        exclude: docs/
    -   id: end-of-file-fixer
        exclude: docs/
    -   id: trailing-whitespace
        exclude: docs/
-   repo: https://github.com/pycqa/isort
    rev: 5.12.0
    hooks:
      - id: isort
        args: ["--profile", "black"]
        name: isort (python)
-   repo: https://github.com/psf/black
    rev: 22.3.0
    hooks:
    - id: black
-   repo: local
    hooks:
    - id: autoflake
      name: autoflake
      entry: autoflake
      language: python
      "types": [python]
      require_serial: true
      args:
        - "--in-place"
        - "--expand-star-imports"
        - "--remove-duplicate-keys"
        - "--remove-unused-variables"
        - "--remove-all-unused-imports"
    - id: make-document
      name: Generate documentation
      entry: make document
      language: system
      pass_filenames: false
      stages: [pre-commit]

- repo: local
  hooks:
    - id: run-tests
      name: Run tests
      entry: make test
      language: system
      pass_filenames: false
      stages: [commit]
