ci(lint): make all three isort lines clean and repin lint.yml's counts - #761
Conversation
|
Cross-review verdict: NEEDS CHANGES (opus; authored by a different model). Six findings routed to the branch; a seventh is filed separately as #766 because its fix needs files a live PR owns. The blocking one, which I verified independently: Those two files are unchanged since #757 was filed, so they were already red then. A contributor running The rest: Confirmed sound: bandit, mypy and vermin re-measure exactly; the 496→506 move is #754's (+12/−2 = +10, verified); mypy's |
9303024 to
e36e549
Compare
|
Re-review at The two reformatted example files are genuinely inert, proven rather than asserted. 1. A false 2. E is pinned on the opposite convention from W. The header excludes W's one The vermin dispute is resolved, against the reviewer. It retracted its own 107 as an off-by-one — its pattern matched vermin's Also verified: each of the three subTests fails independently when exactly one scope is broken, under both pytest and |
- schema.py's `warnings` import was still wrapped from an earlier, narrower width; under the Makefile's real isort flags (-l100 -ppcapkit) it now fits on one line. dispatch.py needed a blank line after two function-local import blocks; options.py needed `import ipaddress` moved above its `pcapkit...` block and a `scapy.all` import reordered -- import order only, confirmed via ast/py_compile and the targeted test batch that exercises both files. All three lines of the Makefile's `isort:` target are now clean; none needed a config change (isort's 100 vs pylint's 120 is a documented, deliberate split per CONTRIBUTING.md, not a misconfiguration). - tests/project/test_isort_clean.py now runs all three Makefile lines, each as its own subTest, rather than just the one reaching schema.py; skips when isort is not installed, the same precondition the Makefile target has. Its note on why options.py's reorder is safe now cites three test modules that actually load it by path plus dispatch.py:20 and the 1.5.0 changelog, replacing a `CONTRIBUTING.md:110` citation that turned out not to exist. - Re-measured all four analysers in lint.yml's header at 932cb48 and pinned each line to that commit (#753): bandit unchanged (8), mypy 112/38 (was 115/39), vermin 106 files (was 105 -- already 106 at 73f09ae too, so three of the four had drifted by the time #753 was filed, not two). pylint's E/W/C (90/4765/542, file-scoped -- both E and W exclude one Command-line-attributed message each, matching pylint's own `messageTypeCount`) are pinned; its R and total are not, since repeated runs at the same commit gave R 645-680 (all from non-deterministic `R0401` cyclic-import ordering) -- documented instead of pinned. Five of `PYLINT_FLAGS`' entries are stale against the installed pylint, not three; the fifth (`pylint.extensions.emptystring`, a dead plugin) is #767 and out of scope here. The narrowed `--enable=E,F` figure in the "Promotion order" prose is corrected to a real, file-scoped run of that invocation (87 errors, 36 unsubscriptable-object, 31 no-member). Also fixed the unwrapped `warnings` import's character count in the test docstring (96, not 98). Build/test: all three `make isort` lines clean; new test passes and is shown to fail on each of its three subTests independently when its fix is reverted; tests/project/ 127 passed, 489 subtests, under `coverage run -m pytest`.
e36e549 to
fd732a1
Compare
|
Final cross-review at The one figure neither reviewer nor I had verified is correct. The narrowed All four figures now reconcile three ways:
So one dead plugin (#767) had distorted three separate published figures. The arithmetic seam is closed too — the header now supplies both conventions, and all six previously-quoted totals reconcile exactly against The citation count was three, not four. I had told the author "the four test modules that load The merge test was not a formality. #764 rewrote Two disclosed and accepted rather than fixed: One commit, unpublished, awaiting the owner. |
Fixes #757.
Fixes #753.
Please follow the guide below
make pylint,make mypy,make isort)make testpasses, and a test case covers the change — rantests/project/: 127 passed, 489 subtests, undercoverage run -m pytestCommit type
ci— workflows or build toolingDescription
#757 —
make isortis three invocations; all three are now clean, not just the one reachingschema.py. The issue's own repro used isort's 79-column default instead of the Makefile's real 100 (documented inCONTRIBUTING.mdas deliberately different from pylint's 120 — not a config bug), which is why it flagged the wrong line. Fixed on this head:schema.py'swarningsimport (collapse to one line),examples/generators/dispatch.py(blank line after two function-local import blocks),examples/generators/options.py(import ipaddressmoved above thepcapkit...block, onescapy.allimport reordered — order only, confirmed viaast/py_compileand a targeted test batch, no behaviour change; three test modules loadoptions.pyby path —test_option_generator_tcp_base_unit.py,test_option_coverage_runtime.py,test_option_roundtrip_unit.py— anddispatch.py:20and the 1.5.0 changelog both name it directly).tests/project/test_isort_clean.pynow covers all three Makefile lines as separate subTests, not just one.#753 — re-measured at
932cb48d1: bandit unchanged (8); mypy 112/38 (was 115/39); vermin 106 files (was 105 — already 106 at73f09aecbtoo, so three of the four had drifted by the time #753 was filed, not two). pylint's E/W/C (90/4765/542, file-scoped — both exclude oneCommand-line-attributed message each, matching pylint's ownmessageTypeCount) are pinned; its R and total are not — repeated runs at the identical commit gave R 645–680, entirely from non-deterministicR0401cyclic-import ordering, so a single number would not reproduce. The "Promotion order" prose's narrowed--enable=E,Ffigure is corrected to a real, file-scoped run of that invocation: 87 errors (36unsubscriptable-object, 31no-member). Each header line is pinned to the commit it was measured at.Known and deferred: #766 (the new test's skip is invisible to
tests/_dependency_gates.py's guard; fixing it needs files owned by the live #755 worker); #767 (pylint.extensions.emptystringdoesn't exist in the installed pylint, so that--load-plugins=entry fails every run andcompare-to-empty-stringhas never actually been enabled).Pre-existing nit, not fixed here:
PYLINT_FLAGSdisables/loads five things pylint no longer has, not three —old-division/no-absolute-import/input-builtin(→R0022),eq-without-hash(→W0012), and the dead plugin above (→E0013, #767) — all attributed toCommand linerather than a file.breakingdoes not apply to either half.