<commit_before>[tox]
package = rstcheck

minversion = 3.15.0
requires =
    tox-envlist
skip_missing_interpreters = true
ignore_basepython_conflict = true
isolated_build = true
skipsdist = false

envlist =
    package
    pre-commit
    py{310,39,38,37}
    py{310,39,38,37}-with-sphinx{1.5,2,3,4}


[envlists]
test = py{310,39,38,37},py{310,39,38,37}-with-sphinx{1.5,2,3,4}
py3.7 = py37,py37-with-sphinx{1.5,2,3,4}
py3.8 = py38,py38-with-sphinx{1.5,2,3,4}
py3.9 = py39,py39-with-sphinx{1.5,2,3,4}
py3.10 = py310,py310-with-sphinx{1.5,2,3,4},package


[testenv]
description = basic config env
passenv =
    HOME
    CI
setenv =
    PIP_DISABLE_VERSION_CHECK = 1
download = true


[testenv:pre-commit]
description = format and check the code
passenv =
    {[testenv]passenv}
    SSH_AUTH_SOCK
    SKIP
setenv =
    {[testenv]setenv}
    SKIP = {tty:identity:},{env:SKIP:}
skip_install = true
deps = pre-commit >= 2.17
commands = pre-commit run {posargs} --all-files {tty::--show-diff-on-failure} {tty:--color always:}


[testenv:mypy]
description = run mypy type checker
deps = mypy >=0.931
extras = sphinx
ignore_errors = true
commands =
    mypy rstcheck
    mypy test_rstcheck.py


[testenv:pylint]
description = run pylint linter
deps = pylint >= 2.12
extras = sphinx
commands = pylint rstcheck test_rstcheck.py


[testenv:package]
description = check sdist and wheel
skip_install = true
deps =
    poetry >= 1.1.13
    twine >= 3.3
commands =
    poetry build {tty:--ansi:} --no-interaction -vvv
    twine check --strict dist/*


[testenv:py{310,39,38,37}]
description = run tests with {basepython}
commands = python -m test_rstcheck


[testenv:py{310,39,38,37}-with-sphinx{1.5,2,3,4}]
description = run tests with {basepython}
deps =
    sphinx1.5,sphinx2,sphinx3: jinja2<3
    sphinx1.5,sphinx2,sphinx3: markupsafe<2
    sphinx1.5: sphinx>=1.5,<2
    sphinx2: sphinx>=2,<3
    sphinx3: sphinx>=3,<4
    # With python 3.10 there is a failing import added in sphinx 3.5
    py310-sphinx3: sphinx>=3,<3.5
    sphinx4: sphinx>=4,<5
commands = python -m test_rstcheck<commit_msg>fix tox env description<commit_after>[tox]
package = rstcheck

minversion = 3.15.0
requires =
    tox-envlist
skip_missing_interpreters = true
ignore_basepython_conflict = true
isolated_build = true
skipsdist = false

envlist =
    package
    pre-commit
    py{310,39,38,37}
    py{310,39,38,37}-with-sphinx{1.5,2,3,4}


[envlists]
test = py{310,39,38,37},py{310,39,38,37}-with-sphinx{1.5,2,3,4}
py3.7 = py37,py37-with-sphinx{1.5,2,3,4}
py3.8 = py38,py38-with-sphinx{1.5,2,3,4}
py3.9 = py39,py39-with-sphinx{1.5,2,3,4}
py3.10 = py310,py310-with-sphinx{1.5,2,3,4},package


[testenv]
description = basic config env
passenv =
    HOME
    CI
setenv =
    PIP_DISABLE_VERSION_CHECK = 1
download = true


[testenv:pre-commit]
description = format and check the code
passenv =
    {[testenv]passenv}
    SSH_AUTH_SOCK
    SKIP
setenv =
    {[testenv]setenv}
    SKIP = {tty:identity:},{env:SKIP:}
skip_install = true
deps = pre-commit >= 2.17
commands = pre-commit run {posargs} --all-files {tty::--show-diff-on-failure} {tty:--color always:}


[testenv:mypy]
description = run mypy type checker
deps = mypy >=0.931
extras = sphinx
ignore_errors = true
commands =
    mypy rstcheck
    mypy test_rstcheck.py


[testenv:pylint]
description = run pylint linter
deps = pylint >= 2.12
extras = sphinx
commands = pylint rstcheck test_rstcheck.py


[testenv:package]
description = check sdist and wheel
skip_install = true
deps =
    poetry >= 1.1.13
    twine >= 3.3
commands =
    poetry build {tty:--ansi:} --no-interaction -vvv
    twine check --strict dist/*


[testenv:py{310,39,38,37}]
description = run tests with {basepython}
commands = python -m test_rstcheck


[testenv:py{310,39,38,37}-with-sphinx{1.5,2,3,4}]
description = run tests with {basepython} and sphinx
deps =
    sphinx1.5,sphinx2,sphinx3: jinja2<3
    sphinx1.5,sphinx2,sphinx3: markupsafe<2
    sphinx1.5: sphinx>=1.5,<2
    sphinx2: sphinx>=2,<3
    sphinx3: sphinx>=3,<4
    # With python 3.10 there is a failing import added in sphinx 3.5
    py310-sphinx3: sphinx>=3,<3.5
    sphinx4: sphinx>=4,<5
commands = python -m test_rstcheck
{'fraction_non_alphanumeric': 0.13872279359005021, 'fraction_numerical': 0.08323367615403014, 'mean_word_length': 3.990453460620525, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '839202', 'n_tokens_mistral': 1923, 'n_tokens_neox': 1744, 'n_words': 352}