Describe the bug
The four generated AppType registries each carry # pylint: disable=consider-using-f-string while containing zero %-format sites, so the suppression is stale. Found by #803's cross-review, confirmed genuinely stale with pylint's useless-suppression rather than inferred from a grep.
pcapkit/const/reg/apptype/tcp.py %-format sites = 0 disable present
pcapkit/const/reg/apptype/udp.py %-format sites = 0 disable present
pcapkit/const/reg/apptype/sctp.py %-format sites = 0 disable present
pcapkit/const/reg/apptype/dccp.py %-format sites = 0 disable present
Expected behavior
The disable dropped from all four, and from whatever emits it, so the suppression is earned everywhere in this family.
Additional context
The source is the fifth template, which #803 deliberately did not touch. TRANSPORT at pcapkit/vendor/reg/apptype/apptype.py:504 emits the four registry modules; #803's title scopes to "the four bespoke templates" and this is a fifth. So this is not a #803 regression — the disable is identically stale on main — it is the remainder of #798's "the disable being earned is the cheapest signal the work is unfinished" argument, applied one template further out.
make pylint cannot see this. useless-suppression is not in the Makefile's --enable set, so the staleness is invisible to CI and will stay invisible after this is fixed. Worth deciding whether to add it while here — that would catch the next stale disable for free, and it is the check that found this one.
Two traps, both hit while establishing this:
- A
%-format grep must allow both quote styles and multi-line strings. A pattern requiring single quotes reported 0 for files whose every site was double-quoted. The review used an AST walk over BinOp(Constant(str) % x) and self-tested it against known positives including a double-quoted and a triple-quoted case.
pylint --disable=all --enable=useless-suppression manufactures false hits — the review's first run produced bogus line-too-long/no-member reports that way. Use the real Makefile flag set plus useless-suppression.
Related: #798, #803, #804, #783.
Describe the bug
The four generated
AppTyperegistries each carry# pylint: disable=consider-using-f-stringwhile containing zero%-format sites, so the suppression is stale. Found by #803's cross-review, confirmed genuinely stale with pylint'suseless-suppressionrather than inferred from a grep.Expected behavior
The disable dropped from all four, and from whatever emits it, so the suppression is earned everywhere in this family.
Additional context
The source is the fifth template, which #803 deliberately did not touch.
TRANSPORTatpcapkit/vendor/reg/apptype/apptype.py:504emits the four registry modules; #803's title scopes to "the four bespoke templates" and this is a fifth. So this is not a #803 regression — the disable is identically stale onmain— it is the remainder of #798's "the disable being earned is the cheapest signal the work is unfinished" argument, applied one template further out.make pylintcannot see this.useless-suppressionis not in the Makefile's--enableset, so the staleness is invisible to CI and will stay invisible after this is fixed. Worth deciding whether to add it while here — that would catch the next stale disable for free, and it is the check that found this one.Two traps, both hit while establishing this:
%-format grep must allow both quote styles and multi-line strings. A pattern requiring single quotes reported 0 for files whose every site was double-quoted. The review used an AST walk overBinOp(Constant(str) % x)and self-tested it against known positives including a double-quoted and a triple-quoted case.pylint --disable=all --enable=useless-suppressionmanufactures false hits — the review's first run produced bogusline-too-long/no-memberreports that way. Use the real Makefile flag set plususeless-suppression.Related: #798, #803, #804, #783.