repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.4.0
    hooks:
      - id: double-quote-string-fixer
  - repo: https://github.com/humitos/mirrors-autoflake
    rev: v1.3
    hooks:
      - id: autoflake
        args:
          - --in-place
          - --remove-all-unused-imports
          - --remove-unused-variable
  - repo: https://github.com/pre-commit/mirrors-isort
    rev: v4.3.21
    hooks:
      - id: isort
  - repo: https://github.com/psf/black
    rev: 22.3.0
    hooks:
      - id: black
        args:
          # --skip-string-normalization tells Black to not replace single quotes with double quotes.
          - --skip-string-normalization
        language_version: python3.11
  # Black doesn't have opinions on docstrings yet: https://github.com/psf/black/issues/144.
  # docformatter autoformats docstrings to follow https://www.python.org/dev/peps/pep-0257/.
  # flake8-docstrings enforces PEP 257 style and makes sure that the docstrings exist.
  - repo: https://github.com/myint/docformatter
    rev: v1.3
    hooks:
      - id: docformatter-venv
        args:
          - --in-place
          - --blank
  - repo: https://github.com/pycqa/flake8
    rev: 3.7.9
    hooks:
      - id: flake8
        additional_dependencies:
          - flake8-bugbear
          - flake8-builtins
          - flake8-docstrings
