; a generative tox configuration, see: https://tox.readthedocs.io/en/latest/config.html#generative-envlist [tox] envlist = clean, check, {py27, py35, py36, py37, py38, py39, py310, py311}, report [testenv] basepython = py27: {env:TOXPYTHON:python2.7} py35: {env:TOXPYTHON:python3.5} py36: {env:TOXPYTHON:python3.6} py37: {env:TOXPYTHON:python3.7} py38: {env:TOXPYTHON:python3.8} py39: {env:TOXPYTHON:python3.9} py310: {env:TOXPYTHON:python3.10} py311: {env:TOXPYTHON:python3.11} {clean,check,report,codecov}: {env:TOXPYTHON:python3} setenv = PYTHONPATH={toxinidir}/tests PYTHONUNBUFFERED=yes passenv = * usedevelop = false skip_install = true deps = pytest pytest-travis-fold pytest-cov pywin32 ; sys.platform == 'win32' commands = {posargs:pytest --cov --cov-report=term-missing tests} [flake8] max-line-length = 79 max-doc-length = 79 verbose = 2 statistics = True min-version = 2.7 require-code = True exclude = .github/ .tox/ .pytest_cache/ htmlcov/ logs/ libs/common libs/win libs/py2 ignore = ; -- flake8 -- ; E501 line too long ; W505 doc line too long E501, W505 ; -- flake8-docstrings -- ; D100 Missing docstring in public module ; D101 Missing docstring in public class ; D102 Missing docstring in public method ; D103 Missing docstring in public function ; D104 Missing docstring in public package ; D105 Missing docstring in magic method ; D107 Missing docstring in __init__ ; D200 One-line docstring should fit on one line with quotes ; D202 No blank lines allowed after function docstring ; D205 1 blank line required between summary line and description ; D400 First line should end with a period ; D401 First line should be in imperative mood ; D402 First line should not be the function's "signature" D100, D101, D102, D103, D104, D105, D107 ; -- flake8-future-import -- ; x = 1 for missing, 5 for present ; FIx6 nested_scopes 2.2 ; FIx7 generators 2.3 ; FIx2 with_statement 2.6 ; FIx1 absolute_import 3.0 ; FIx0 division 3.0 ; FIx3 print_function 3.0 ; FIx4 unicode_literals 3.0 ; FIx5 generator_stop 3.7 ; ???? annotations 4.0 ; FI90 __future__ import does not exist FI50, FI51, FI53, FI54 per-file-ignores = ; F401 imported but unused ; E402 module level import not at top of file nzbTo*.py: E265, E266, E402 TorrentToMedia.py: E402 core/__init__.py: E402, F401 core/utils/__init__.py: F401 core/plugins/downloaders/configuration.py: F401 core/plugins/downloaders/utils.py: F401 libs/custom/deluge_client/__init__.py: F401 [testenv:check] deps = flake8 flake8-bugbear flake8-commas flake8-comprehensions flake8-docstrings flake8-future-import flake8-quotes skip_install = true commands = ; ** PRIMARY TESTS ** ; Run flake8 tests (with plugins) using default test selections flake8 ; ** SELECTIVE TESTS ** ; Run flake8 tests (with plugins) for specific optional codes defined below ; -- flake8 -- ; E123 closing bracket does not match indentation of opening bracket’s line ; E226 missing whitespace around arithmetic operator ; E241 multiple spaces after ‘,’ ; E242 tab after ‘,’ ; E704 multiple statements on one line ; W504 line break after binary operator ; W505 doc line too long ; -- flake8-bugbear -- ; B902 Invalid first argument used for instance method. ; B903 Data class should be immutable or use __slots__ to save memory. flake8 --select=B902,B903,E123,E226,E241,E242,E704,W504,W505 [coverage:run] omit = libs/* [testenv:codecov] deps = codecov skip_install = true commands = coverage xml --ignore-errors codecov [] [testenv:report] deps = coverage skip_install = true commands = coverage report coverage html [testenv:clean] commands = coverage erase skip_install = true deps = coverage