<NME> tox.ini
<BEF> [tox]
basepython = python3.9
envlist =
    check
    # mypy
    py310  # EOL 2026-10-04
    py39  # EOL 2025-10-05
    py38  # EOL 2024-10-14
    py38,
    black-check,
    lint-py27,
    lint-py38,
    coverage,




[testenv]
usedevelop = True
extras =
    test
passenv = LC_ALL LANG TRAVIS TRAVIS_BRANCH TRAVIS_OS_NAME TRAVIS_BUILD_ID
deps =
    cheroot
    defusedxml
    Jinja2
    json5
    PyYAML
    pytest
    pytest-cov
    #pytest-remove-stale-bytecode
    pytest-html
    redis
    requests
    webtest
setenv =
    COVERAGE_FILE = .coverage.{envname}
commands =
    # Run everything from /tests folder:
    python -V
    pip list
    # Note: also honors .coveragerc:
    pytest -ra -v -x --cov=wsgidav --durations=10 --html=build/pytest/report-{envname}.html --self-contained-html {posargs}


[testenv:coverage]
skip_install = true
deps =
    coverage
setenv =
    COVERAGE_FILE = .coverage
commands =
    coverage erase
    coverage combine
    coverage html
    ; coverage xml
    coverage report --fail-under=30.0


[testenv:mypy]
skip_install = true
deps =
    mypy
changedir = {toxinidir}
commands =
    mypy wsgidav tests


[testenv:flake8]
skip_install = true
deps =
    # Required by flake8-bandit
    bandit
    # Flake8
    # Configuration is defined in the [flake8] section of setup.cfg.
    # Run `flake8 --help` to see the available options of *installed* plugins.
    flake8

    # --- Helper to generate HTML reports:
    # flake8-html

    # --- Useful flake8 plugins:
    flake8-annotations-complexity  # TAE002 too complex annotation (X > Y)
    # flake8-bandit  # Security checks, e.g. S101
    flake8-breakpoint  # Check forgotten breakpoints and debugger calls
    flake8-bugbear  # (B...) Check for error-prone constructs
    # flake8-builtins  # Check for python builtins being used as variables or parameters (A...)
    flake8-coding  # C101 Coding magic comment not found, ...
    # flake8-commas  # C812 missing trailing comma -> Handled by Black # flake8-comprehensions # flake8-docstrings # flake8-eradicate  # E800 Found commented out code # flake8-expression-complexity  # ECE001 Expression is too complex (X > Y) # flake8-if-expr  # KEK100 don`t use "[on_true] if [expression] else [on_false]" syntax # flake8-import-order  # (we run `isort --check`) # flake8-isort  # (we run `isort --check`) # flake8-logging-format  # G001 Logging statement uses string.format() # flake8-pep3101  # Use "".format instead of %
    # flake8-print  # T001 print found
    # flake8-pytest-style  # PT009 use a regular assert instead of unittest-style 'assertTrue'
    flake8-quotes  # See also [flake8] config
    # flake8-return  # R503 you should add explicit return at end of the function if function have return value except None
    # flake8-rst-docstrings  # Docstrings should work with Sphinx (RSTnnn)
    # flake8-string-format  # Check for valid string.format() args
    # flake8-todo  # T000 Todo note found
    # mccabe  # Check conplexity (see also max_complexity setting)
    # pep8-naming
    # Flake8 plugin 'wemake'
    # (e.g. WPSnnn style errors)
    # wemake-python-styleguide
changedir = {toxinidir}
commands =
    flake8 wsgidav tests setup.py --doctests --statistics


[testenv:check]
description = Check Black formatting compliance and add flake8-bugbear checks
skip_install = true
deps =
    black ~=22.6
    isort
    {[testenv:flake8]deps}
changedir = {toxinidir}
commands =
    {[testenv:flake8]commands}
    isort --check-only --profile black wsgidav tests setup.py
    black --check --diff wsgidav tests setup.py


[testenv:format]
description = Reformat python code using Black and isort
# skip_install = true
deps =
    black ~=22.6
    isort
    {[testenv:flake8]deps}
changedir = {toxinidir}
commands =
    isort --profile black wsgidav tests setup.py {posargs}
    black wsgidav tests setup.py
    {[testenv:flake8]commands}
; commands = {[lint]commands}
; whitelist_externals = {[lint]whitelist_externals}

[testenv:lint-py38]
basepython = python3.8
skip_install = true
deps =
    {[lint]deps}
    sphinx_rtd_theme
    readthedocs-sphinx-search
commands =
    # http://www.sphinx-doc.org/en/master/man/sphinx-build.html

[testenv:black]
description = Reformat python code using Black
basepython = python3.8
changedir = {toxinidir}
skip_install = true
deps =
changedir = {toxinidir}
deps =
    stressor
commands =

[testenv:black-check]
description = Check Black formatting compliance and add flake8-bugbear checks
basepython = python3.8
changedir = {toxinidir}
skip_install = true
deps =
changedir = .
deps =
    cx_Freeze
commands =

[testenv:format]
description = Reformat python code using Black and isort
basepython = python3.8
changedir = {toxinidir}
skip_install = true
deps =


# [testenv:stats]
# commands =
#     coverage combine
#     coverage report

[testenv:docs]
description = Build Sphinx documentation (output directory: docs/sphinx-build)
basepython = python3.8
changedir = doc
deps =
    sphinx

<MSG> Test with Python 3.7 until 3.8 is supported by homebrew

<DFF> @@ -9,7 +9,7 @@ envlist =
     py38,
     black-check,
     lint-py27,
-    lint-py38,
+    lint-py37,
     coverage,
 
 
@@ -133,8 +133,8 @@ commands =
 ; commands = {[lint]commands}
 ; whitelist_externals = {[lint]whitelist_externals}
 
-[testenv:lint-py38]
-basepython = python3.8
+[testenv:lint-py37]
+basepython = python3.7
 skip_install = true
 deps =
     {[lint]deps}
@@ -145,7 +145,7 @@ whitelist_externals = {[lint]whitelist_externals}
 
 [testenv:black]
 description = Reformat python code using Black
-basepython = python3.8
+basepython = python3.7
 changedir = {toxinidir}
 skip_install = true
 deps =
@@ -156,7 +156,7 @@ commands =
 
 [testenv:black-check]
 description = Check Black formatting compliance and add flake8-bugbear checks
-basepython = python3.8
+basepython = python3.7
 changedir = {toxinidir}
 skip_install = true
 deps =
@@ -167,7 +167,7 @@ commands =
 
 [testenv:format]
 description = Reformat python code using Black and isort
-basepython = python3.8
+basepython = python3.7
 changedir = {toxinidir}
 skip_install = true
 deps =
@@ -180,7 +180,7 @@ commands =
 
 [testenv:docs]
 description = Build Sphinx documentation (output directory: docs/sphinx-build)
-basepython = python3.8
+basepython = python3.7
 changedir = doc
 deps =
     sphinx

{'addition_count': 7, 'commit_subject': 'Test with Python 3.7 until 3.8 is supported by homebrew', 'deletion_count': 7, 'file_extension': '.ini', 'lang': 'ini', 'license': 'mit', 'repo_name': 'mar10/wsgidav'}