debian/tests: move options to pyproject.toml and setup.cfg.
authorPeter Pentchev <roam@debian.org>
Fri, 12 Aug 2022 08:47:29 +0000 (11:47 +0300)
committerPeter Pentchev <roam@debian.org>
Fri, 12 Aug 2022 08:47:29 +0000 (11:47 +0300)
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 [new file with mode: 0644]
debian/tests/setup.cfg [new file with mode: 0644]
debian/tests/tox.ini

diff --git a/debian/tests/pyproject.toml b/debian/tests/pyproject.toml
new file mode 100644 (file)
index 0000000..783a0c5
--- /dev/null
@@ -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 (file)
index 0000000..b6c4e58
--- /dev/null
@@ -0,0 +1,3 @@
+[flake8]
+# Leave the formatting to the black tool.
+extend-ignore = E203
index 75bea47ca81f0b24f965513770404c5ab51ea4a5..47f770f3afdb91664574d5ffd3f1a2b8c11ad972 100644 (file)
@@ -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}