[tox]
isolated_build = true
envlist =
    py36,py37,py38,py39,py310,py311,
    lint

[testenv]
passenv = *
deps=
    -rrequirements/project.txt
    -rrequirements/extras.txt
    -rrequirements/test.txt
commands=
    {envbindir}/mypy
    {envbindir}/py.test --cov backrefs --cov-append tests
    {envbindir}/coverage html -d {envtmpdir}/coverage
    {envbindir}/coverage xml
    {envbindir}/coverage report --show-missing

[testenv:documents]
passenv = *
deps=
    -rrequirements/docs.txt
commands=
    {envpython} -m mkdocs build --clean --verbose --strict
    {envbindir}/pyspelling

[testenv:lint]
passenv = *
deps=
    -rrequirements/project.txt
    -rrequirements/flake8.txt
commands=
    {envbindir}/flake8 {toxinidir}

[flake8]
exclude=site/*,backrefs/uniprops/unidata/*,.tox/*,backrefs/pep562.py,build/*,dist/*
max-line-length=120
ignore=D202,D203,D401,E741,W504,N818

[tox]
isolated_build = true
envlist =
    py36,py37,py38,py39,py310,py311,
    lint

[testenv]
passenv = *
deps=
    -rrequirements/project.txt
    -rrequirements/extras.txt
    -rrequirements/test.txt
commands=
    {envbindir}/python tools/unipropgen.py backrefs/uniprops/unidata
    {envbindir}/mypy
    {envbindir}/py.test --cov backrefs --cov-append tests
    {envbindir}/coverage html -d {envtmpdir}/coverage
    {envbindir}/coverage xml
    {envbindir}/coverage report --show-missing

[testenv:documents]
passenv = *
deps=
    -rrequirements/docs.txt
commands=
    {envpython} -m mkdocs build --clean --verbose --strict
    {envbindir}/pyspelling

[testenv:lint]
passenv = *
deps=
    -rrequirements/project.txt
    -rrequirements/flake8.txt
commands=
    {envbindir}/flake8 {toxinidir}

[flake8]
exclude=site/*,backrefs/uniprops/unidata/*,.tox/*,backrefs/pep562.py,build/*,dist/*
max-line-length=120
ignore=D202,D203,D401,E741,W504,N818

Test environment requires us to build the Unicode data
Test environment requires us to build the Unicode data
