diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-09-08 11:04:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-08 11:04:11 +0100 |
| commit | 7cc7c2044811d44820194e9b8e4ef92a0a80a497 (patch) | |
| tree | fce71a8f9cf696b32d0d584eeb6a97f704d8c386 /challenge-285/ppentchev/python/tox.ini | |
| parent | f914ae6a3f7212cd2083677a8134d9009960a5b0 (diff) | |
| parent | 50445dbe3f83551244d858e5d2a0a0e1a90adf75 (diff) | |
| download | perlweeklychallenge-club-7cc7c2044811d44820194e9b8e4ef92a0a80a497.tar.gz perlweeklychallenge-club-7cc7c2044811d44820194e9b8e4ef92a0a80a497.tar.bz2 perlweeklychallenge-club-7cc7c2044811d44820194e9b8e4ef92a0a80a497.zip | |
Merge pull request #10788 from ppentchev/pp-285-python
Add Peter Pentchev's Python solution to 285.
Diffstat (limited to 'challenge-285/ppentchev/python/tox.ini')
| -rw-r--r-- | challenge-285/ppentchev/python/tox.ini | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/challenge-285/ppentchev/python/tox.ini b/challenge-285/ppentchev/python/tox.ini new file mode 100644 index 0000000000..3c90abab52 --- /dev/null +++ b/challenge-285/ppentchev/python/tox.ini @@ -0,0 +1,106 @@ +# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> +# SPDX-License-Identifier: BSD-2-Clause + +[tox] +minversion = 4.1 +envlist = + ruff + format + reuse + mypy + unit-tests-pytest-7 + unit-tests-pytest-8 +isolated_build = True + +[defs] +pyfiles = + src/perl_weekly_285 \ + tests/unit + +[testenv:ruff] +skip_install = True +tags = + check + ruff + quick +deps = + -r requirements/ruff.txt +commands = + ruff check -- {[defs]pyfiles} + +[testenv:format] +skip_install = True +tags = + check + quick +deps = + -r requirements/ruff.txt +commands = + ruff check --config ruff-base.toml --select=D,I --diff -- {[defs]pyfiles} + ruff format --config ruff-base.toml --check --diff -- {[defs]pyfiles} + +[testenv:reformat] +skip_install = True +tags = + format + manual +deps = + -r requirements/ruff.txt +commands = + ruff check --config ruff-base.toml --select=D,I --fix -- {[defs]pyfiles} + ruff format --config ruff-base.toml -- {[defs]pyfiles} + +[testenv:mypy] +skip_install = True +tags = + check +deps = + -r requirements/install.txt + -r requirements/test.txt + mypy >= 1, < 2 +setenv = + MYPYPATH = {toxinidir}/stubs +commands = + mypy {[defs]pyfiles} + +[testenv:pyupgrade] +skip_install = True +tags = + check + manual +deps = + pyupgrade >= 3, < 4 +allowlist_externals = + sh +commands = + sh -c 'pyupgrade --py311-plus src/perl_weekly_285/*.py tests/unit/*.py' + +[testenv:unit-tests-pytest-7] +tags = + tests +deps = + -r requirements/install.txt + -r requirements/test.txt + pytest < 8 +commands = + pytest {posargs} tests/unit + +[testenv:unit-tests-pytest-8] +tags = + tests +deps = + -r requirements/install.txt + -r requirements/test.txt + pytest >= 8 +commands = + pytest {posargs} tests/unit + +[testenv:reuse] +skip_install = True +tags = + check + quick +deps = + reuse >= 4, < 5 +commands = + reuse --root . lint |
