Prune redundant docstrings in updater/ and tools/ #100
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/prune-redundant-docstrings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A delete-only pass over one-line function/method docstrings and constant docstrings that only re-spell the name and signature they sit on. Kept anything citing a spec section, stating a non-obvious rationale, constraint or trap, or distinguishing similar-looking cases (the
Outcome/TransferResultmembers).tools/checkis green (lint, format, mypy, full test suite).Confirmed:
updater/session.py's_result_nameis untouched, and every hunk in the diff is a docstring-line deletion only (in two spots a trailing blank line goes with it) — no behaviour change anywhere.Two removals contradict the stated keep-rule directly: both cited a spec section, which the task says to keep. See inline comments.
TRANSFER_TIMEOUT/JOIN_DEADLINE/NODE_PATIENCEright next to one of them were correctly kept for the identical reason, which makes the inconsistency easy to fix — restore those two lines.Nothing else in the diff looks wrong; the rest are genuine restatements of the name/signature and are fine to drop.
@ -384,7 +382,6 @@ def _image(image: CachedImage) -> dict[str, Any]:def _node(Lower confidence, but worth a second look: this said missing data renders as null/unknown rather than being coerced to something else — the same category of null-semantics note kept for
_radio()("Nulls rather than a guess...") and_newer()("Null, never false...") just below in this file. Possibly should have stayed for consistency, though it's a weaker case than the two in session.py.@ -44,7 +44,6 @@ WIFI_STATUS = "SYS_WIFI_STATUS"ANNOUNCE = "SYS_ANNOUNCE"BULK_PAYLOAD = 6This docstring cited Spec section 8.9 and explained what the value 6 is (bytes of content one
BULK_DATAframe carries) — exactly the "cites a spec section" case the task says to keep. Restore it.@ -72,4 +71,3 @@STATUS_INTERVAL = timedelta(seconds=5)"""How often a node with its radio up broadcasts `SYS_WIFI_STATUS`. Spec 8.1."""Same issue: this cited Spec 8.1 and said which broadcast (
SYS_WIFI_STATUS) and under what condition (radio up) governs the interval — indistinguishable in kind fromTRANSFER_TIMEOUT/JOIN_DEADLINE/NODE_PATIENCEjust below, which kept their spec-citing docstrings for the same reason. Restore it.