Repository navigation
test(const): fix the stale StrEnum docstring and rename EXCLUDED_STILL_BESPOKE - #894
Conversation
|
Resolve conflicts. |
ac895ba to
0ef615e
Compare
|
GOOD TO GO on So the old comment was wrong in both directions: One instrument error of mine worth recording, because it nearly produced a false contradiction. My first check used The second item is fixed as well: the Both non-blocking notes were folded in rather than deferred: Still one commit, one file, Unpublished and unmerged, yours to merge — it closes #892. |
…L_BESPOKE - test_default_still_resolves_when_registered_str called its str-valued case "synthetic, since no shipped aenum.StrEnum registry mixes in the base yet". Measured on main (walking pcapkit.const, filtering for EnumRegistry+str subclasses): ten already do (Command, FEATCode, Method, OptionType, TLSKeyLabel, AppType and its four transport subclasses). Rewrote the docstring to say so instead of the stale claim. - EXCLUDED_STILL_BESPOKE described its members as overriding the base's generic implementation, plus TransportProtocol for never mixing in the base at all. In fact most entries do mix in EnumRegistry -- the set's real, operative meaning is "outside this file's IntEnum-only historical census, anchored at commit 05468a0". Renamed to EXCLUDED_FROM_INTENUM_CENSUS and re-grouped its eleven entries by which of three reasons applies: not an IntEnum, overrides the base, or never mixes in the base (apptype.py carries two of the three, in one file). return_code.py/status_code.py's actual override is a custom __new__ plus _unregistered_member, not get()/register() -- their get/get_all/ register/register_alias all resolve to the base's own implementation; ResponseKind and GroupingInformation, co-resident in return_code.py, override nothing at all. Updated the other four EXCLUDED_STILL_BESPOKE references (one behavioural, three prose) to the new name. - No behaviour change: the set's file-membership, and the 6/11/105/122 counts it feeds, are unchanged (122/11/105 following #890's merge, which added pcapkit/const/pcapng/tls_key_label.py to both). Build/test: tests/const/test_const_registry_protocol.py (run=74, failures=0, errors=0) and tests/const/test_const_enum_builtin_parity.py (run=33, failures=0, errors=0), both via the worktree's own pcapkit.
0ef615e to
098cb51
Compare
|
Rebased onto current Needed because the The The rebase produces the same single-commit diffstat ( |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A -- changelog centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
test— tests onlyDescription of your pull request and other information
Closes #892.
Two stale-prose fixes in
tests/const/test_const_registry_protocol.py, no behaviour change:test_default_still_resolves_when_registered_str's docstring called its case "synthetic, since no shippedaenum.StrEnumregistry mixes in the base yet". Measured independently by walkingpcapkit.constforEnumRegistry+strsubclasses: ten already do (Command,FEATCode,Method,OptionType,TLSKeyLabel,AppTypeand its four transport subclasses). Rewrote the docstring to state that instead.EXCLUDED_STILL_BESPOKE's comment described "overrides the base" plusTransportProtocolfor never mixing in at all — but most entries do mix inEnumRegistry. Renamed toEXCLUDED_FROM_INTENUM_CENSUSand re-grouped its eleven entries by which of three reasons actually applies (not anIntEnum; overrides the base; never mixes in the base —apptype.pycarries two of the three in one file).return_code.py/status_code.py's actual override is a custom__new__plus_unregistered_member, notget()/register(). Updated all four other references (one behavioural, three prose).all_files/generated/exclusion counts (122/105/11,6+11+105=122) are unchanged — this branch is now rebased onto #890 (parent commit), which addedpcapkit/const/pcapng/tls_key_label.pyand is what brought the census from nine to ten and the exclusion set from ten to eleven entries.