From 56755b5d54dffd2d98690d1546ead0e496e7c3eb Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Fri, 25 Sep 2026 18:10:02 -0400 Subject: [PATCH] chore: add isort to Pipfile's dev-packages so `make isort` resolves it `make isort` runs its four recipe lines through `pipenv run`, which resolves against `Pipfile`'s `[dev-packages]` -- and isort was not listed there, next to the `mypy` and `pylint` it sits beside in the Makefile. So a `pipenv install --dev` environment could not run the recipe, and #786's fix put isort on the `test` extra only, leaving the two declarations disagreeing about a tool the Makefile needs. - Pipfile: add `isort = "*"` between `bandit` and `mypy`, bare like its neighbours. Additive only -- the `pyproject.toml` extra serves consumers of the published package, `Pipfile` this repo's dev environment. - tests/project/test_isort_clean.py: its docstring recorded the gap as still open ("isort remains absent from Pipfile"), which this change makes stale. Audited every executable the Makefile invokes against `[dev-packages]`: isort was the only omission. build, twine, pytest, coverage, sphinx, sphinx-autobuild, vermin, pylint, mypy and bandit are all present. Closes #810 --- Pipfile | 1 + tests/project/test_isort_clean.py | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Pipfile b/Pipfile index 928e4dd631..7be3d8de14 100644 --- a/Pipfile +++ b/Pipfile @@ -45,6 +45,7 @@ beautifulsoup4 = {extras = ["html5lib"],version = "*"} requests = {extras = ["socks"],version = "*"} autopep8 = "*" bandit = "*" +isort = "*" mypy = "*" pylint = "*" ipython = "*" diff --git a/tests/project/test_isort_clean.py b/tests/project/test_isort_clean.py index 24bd228af3..f95cb9745d 100644 --- a/tests/project/test_isort_clean.py +++ b/tests/project/test_isort_clean.py @@ -145,10 +145,12 @@ below take about 1.5s together, the "costs nothing per leg" category the test job's own install comment puts ``DPKT`` in rather than the ``Scapy`` one. -``isort`` remains absent from ``Pipfile``, which is what ``make isort``'s own -``pipenv run`` prefix resolves against -- so the target still depends on a -contributor having isort on ``PATH``. Out of scope here: this module is reached -by pytest, not by ``make``. +``isort`` is in ``Pipfile``'s ``[dev-packages]`` too, as of #810 -- that being +what ``make isort``'s own ``pipenv run`` prefix resolves against, so the target +no longer depends on a contributor happening to have isort on ``PATH``. The two +declarations are additive rather than duplicate: the ``pyproject.toml`` extra +serves consumers installing the package, ``Pipfile`` serves this repository's +own dev environment, and ``make isort`` reads only the latter. """