[flake8]
; Allow >> on newline (W503), and allow cls as first argument for pydantic validators (B902)
ignore = B902,W503
exclude = .git,.*_cache,.eggs,*.egg-info,__pycache__,venv,.tox,gso/migrations,docs
enable-extensions = G
select = B,C,D,E,F,G,I,N,S,T,W,B902,B903,R
max-line-length = 120
ban-relative-imports = true

[testenv]
passenv = DATABASE_URI_TEST,USE_ISOLATED_DOCKER_COMPOSE
deps =
    coverage
    flake8
    black
    mypy
    ruff
    isort
    types-requests
    -r requirements.txt

commands =
    isort -c .
    ruff .
    black --check .
    mypy .
    flake8
    coverage erase
    coverage run --source gso -m pytest {posargs}
    coverage xml
    coverage html
    # coverage report --fail-under 80
    coverage report