From 94fe2f8be5091fcb9f1043da26af8954ad9f3998 Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Fri, 12 Aug 2022 11:47:29 +0300 Subject: [PATCH] debian/tests: move options to pyproject.toml and setup.cfg. Move the configuration options for the various static source checkers that we run through tox.ini to the standard Python project configuration files, so that they are also available when the tools are run in other ways. --- debian/tests/pyproject.toml | 6 ++++++ debian/tests/setup.cfg | 3 +++ debian/tests/tox.ini | 10 +++++----- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 debian/tests/pyproject.toml create mode 100644 debian/tests/setup.cfg diff --git a/debian/tests/pyproject.toml b/debian/tests/pyproject.toml new file mode 100644 index 0000000..783a0c5 --- /dev/null +++ b/debian/tests/pyproject.toml @@ -0,0 +1,6 @@ +[tool.black] +line-length = 79 + +[tool.mypy] +strict = true +python_version = 3.6 diff --git a/debian/tests/setup.cfg b/debian/tests/setup.cfg new file mode 100644 index 0000000..b6c4e58 --- /dev/null +++ b/debian/tests/setup.cfg @@ -0,0 +1,3 @@ +[flake8] +# Leave the formatting to the black tool. +extend-ignore = E203 diff --git a/debian/tests/tox.ini b/debian/tests/tox.ini index 75bea47..47f770f 100644 --- a/debian/tests/tox.ini +++ b/debian/tests/tox.ini @@ -15,21 +15,21 @@ basepython = python3 deps = black >= 22, < 23 commands = - python3 -m black --check --line-length 79 {[defs]files} + python3 -m black --check {[defs]files} [testenv:black-reformat] basepython = python3 deps = black >= 22, < 23 commands = - python3 -m black --line-length 79 {[defs]files} + python3 -m black {[defs]files} [testenv:flake8] basepython = python3 deps = flake8 commands = - python3 -m flake8 --ignore=E203 {[defs]files} + python3 -m flake8 {[defs]files} [testenv:mypy] basepython = python3 @@ -37,11 +37,11 @@ deps = mypy types-dataclasses commands = - python3 -m mypy --strict --python-version=3.6 {[defs]files} + python3 -m mypy {[defs]files} [testenv:pylint] basepython = python3 deps = pylint commands = - python3 -m pylint --ignore-imports=yes {[defs]files} + python3 -m pylint {[defs]files} -- 2.30.2