[tox]
envlist = py3,linting
skipsdist = true

[testenv]
deps = -r requirements/local.txt
skip_install = true
whitelist_externals = pytest
commands = pytest -c pytest.ini

[testenv:linting]
basepython = python3
deps = pre-commit
commands = pre-commit run --all-files

[testenv:linting-show]
basepython = python3
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure

[flake8]
exclude =
    .git,
    .tox,
    __pycache__,
    old,
    build,
    dist,
    txt,
    .ini,
    .sh
    .github,
    venv/

application-import-names = flake8

# Recommendations from Black formatting library.
select = B,C,E,F,W,T4,B9
ignore =
    # Lines are too long.
    E501
    # Line break before binary operator.
    W503
    # Whitespace before ':'.
    E203
    # Module level import.
    E402

import-order-style = pep8

[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
