From 0b27867d8b2d33a84b67226342f2a621541e869b Mon Sep 17 00:00:00 2001 From: Jacques Raphanel Date: Sun, 24 Mar 2024 18:11:36 +0100 Subject: [PATCH 1/2] chore: ensure same configuration for tools like black or flake8 --- pyproject.toml | 9 +++++++++ tox.ini | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8e2976e..0f93e15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,15 @@ repository = "http://github.com/crabisoft/pdbstore.git" [tool.black] line-length = 100 +[flake8] +exclude = [".git",".venv",".tox","dist","docs","*egg,build"] +max-line-length = 100 +# We ignore the following because we use black to handle code-formatting +# E203: Whitespace before ':' +# E501: Line too long +# W503: Line break occurred before a binary operator +ignore = ["E203","E501","W503"] + [tool.isort] profile = "black" multi_line_output = 3 diff --git a/tox.ini b/tox.ini index 64ca595..64fd5c2 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ basepython = python3 envdir={toxworkdir}/black deps = -r{toxinidir}/requirements-lint.txt commands = - black {posargs} --line-length 88 {toxinidir}/pdbstore/ {toxinidir}/tests/ {toxinidir}/installer/ + black {posargs} {toxinidir}/pdbstore/ {toxinidir}/tests/ {toxinidir}/installer/ [testenv:isort] basepython = python3 From 82bf701e8aec8f2af3a5b5ef5fc68bd2f1dc48dc Mon Sep 17 00:00:00 2001 From: Jacques Raphanel Date: Sun, 24 Mar 2024 18:12:35 +0100 Subject: [PATCH 2/2] chore: make tox more verbose on-demand --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 52c664e..2a789b1 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,9 @@ TOX_CMD = $(VENV_ACTIVATE_CMD) $(PYTHON) -m tox else TOX_CMD = tox endif +ifeq ($(VERBOSE),1) +TOX_ARG := $(TOX_ARG) -v +endif MNOPD = --no-print-directory