From 710737b06c81f2f7b2391203dcea1466563862c1 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 16 Jun 2025 17:02:41 +0300 Subject: [PATCH 1/6] tox: switch from requirements_dev.txt to extras=dev This avoids duplicating optional dependencies. --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 586e5cb..fcd3a49 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,7 @@ envlist = py39, py310, py311, py312, py313 # isolated_build = True [testenv] -deps = - -r {toxinidir}/requirements_dev.txt +extras = dev commands = python -m doctest argparse_dataclass.py pytest From bd02a35995569cba44c46f83028831771707bd28 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 16 Jun 2025 17:03:39 +0300 Subject: [PATCH 2/6] requirements_dev.txt: remove, duplicate and unnecessary --- MANIFEST.in | 1 - requirements_dev.txt | 5 ----- 2 files changed, 6 deletions(-) delete mode 100644 requirements_dev.txt diff --git a/MANIFEST.in b/MANIFEST.in index 243f0e5..c80189b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include README.rst include LICENSE -include requirements_dev.txt include tox.ini include Makefile diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index 69b3e34..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,5 +0,0 @@ -black -flake8 -tox -pytest -build From bee1ddbad2e641e830beab945c3e02117facd311 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 16 Jun 2025 17:02:18 +0300 Subject: [PATCH 3/6] pyproject.toml: add flake8-pyproject for tool.flake8 to take effect --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f4bac66..60de60f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ Homepage = "https://github.com/mivade/argparse_dataclass" [project.optional-dependencies] -dev = ["black", "flake8", "tox", "pytest", "build"] +dev = ["black", "flake8", "flake8-pyproject", "tox", "pytest", "build"] [build-system] requires = ["setuptools", "wheel"] From 98bd84190a6fb08e28c1c6d4bb8eb6c136c059ce Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 16 Jun 2025 17:01:24 +0300 Subject: [PATCH 4/6] pyproject.toml: tool.flake8 options compatible with black --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 60de60f..be506b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,3 +29,9 @@ dev = ["black", "flake8", "flake8-pyproject", "tox", "pytest", "build"] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +[tool.flake8] +# Recommended by black +max-line-length = 88 +extend-ignore = [ + "E501", # line too long, even for constants - incompatible with black +] From 8371ce26931377d565c6af5a89bfd3e062afe98c Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 14 Jul 2025 16:26:26 +0300 Subject: [PATCH 5/6] tox.ini: remove commands_post = black, replace with explicit tox -e flake8 support --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index fcd3a49..a417cf6 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,6 @@ extras = dev commands = python -m doctest argparse_dataclass.py pytest -commands_post = - black --check argparse_dataclass.py - black --check tests + +[testenv:flake8] +commands = flake8 {posargs} From d85b5c63e49796b2b9f073bccfaed370e80d5d45 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 14 Jul 2025 16:27:03 +0300 Subject: [PATCH 6/6] github workflows: separate flake8 step --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7de3922..114d43b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,5 +33,8 @@ jobs: pip3 --version pip3 install setuptools tox - - name: Run tox + - name: Run pytest run: tox -e py + + - name: Run flake8 + run: tox -e flake8