repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.3.0
    hooks:
    -   id: check-json
    -   id: check-yaml
    -   id: end-of-file-fixer
    -   id: requirements-txt-fixer
    -   id: trailing-whitespace
    # Remove unused python imports
-   repo: https://github.com/myint/autoflake
    rev: v1.4
    hooks:
    -   id: autoflake
        args: [--in-place, --remove-all-unused-imports]
        # why we exclude these files? See below.
        #
        # setup.py -> if formatted the integration validation fails
        # conftest.py -> has intentional unsused imports
        # test_default.py -> has intentional unsused imports
        #
        # This is the same reason why we exclude this
        # files on hooks bellow.
        exclude: "setup.py|conftest.py|test_default.py"
    # Sort python imports
-   repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
    -   id: isort
        # never remove --profile black
        # if you do that darker and isort will enter
        # in conflict and you'll enter in a infinity import
        # error because black will revert what isort fixed.
        args: ["--profile", "black"]
        exclude: "setup.py|conftest.py|test_default.py"
    # black but powered with diff
-   repo: https://github.com/akaihola/darker
    rev: 1.5.0
    hooks:
    -   id: darker
        exclude: "setup.py"
