Repository navigation
Remove dead code in the transport layer - #14
Merged
Merged
Conversation
list_reader_names() had no caller in src, tests, docs or packaging; reader_states() returns the same names along with card presence and ATR. It was reachable as a public import, so it gets a CHANGELOG Removed entry. describe_sw's family fallback tested `sw1 in (0x62, 0x63)`, but the preceding branch already returns for 0x63, so the tuple advertised an arm that could never be taken. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove dead code in the transport layer
Two removals in
transport/. No behaviour change.Changes
transport.pcsc.list_reader_names(). CHANGELOG entry under Removed, becausethe function was importable and the package ships
Typing :: Typed.describe_sw's family fallback narrowed fromsw1 in (0x62, 0x63)tosw1 == 0x62.Constraints
list_reader_names()had no caller. Checked across.py,.rst,.md,.toml,.cfgand
.spec; only the definition matched.reader_states()covers the same ground and returnscard presence and ATR alongside the names, so there is nothing to migrate.
The
0x63arm was unreachable.describe_swreturns forsw1 == 0x63two branchesearlier, so only
0x62ever reached the tuple. The edit removes an arm that could not betaken; it does not change how any status word is decoded.
Verification
ruff check,ruff format --check,mypy, 347 tests andsphinx-build -W --keep-goingallpass. Statement count drops 6013 → 6008, four of the five removed statements having been
uncovered.
Note for whoever merges second
This touches
CHANGELOG.mdunder Unreleased, as does #13. The two entries are independent andthe conflict is textual only.
🤖 Generated with Claude Code