Skip to content

Remove dead code in the transport layer - #14

Merged
mmlado merged 1 commit into
mainfrom
chore/remove-dead-code
Sep 29, 2026
Merged

mmlado merged 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@mmlado

@mmlado mmlado commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Remove dead code in the transport layer

Two removals in transport/. No behaviour change.

Changes

  • Deleted transport.pcsc.list_reader_names(). CHANGELOG entry under Removed, because
    the function was importable and the package ships Typing :: Typed.
  • describe_sw's family fallback narrowed from sw1 in (0x62, 0x63) to sw1 == 0x62.

Constraints

list_reader_names() had no caller. Checked across .py, .rst, .md, .toml, .cfg
and .spec; only the definition matched. reader_states() covers the same ground and returns
card presence and ATR alongside the names, so there is nothing to migrate.

The 0x63 arm was unreachable. describe_sw returns for sw1 == 0x63 two branches
earlier, so only 0x62 ever reached the tuple. The edit removes an arm that could not be
taken; it does not change how any status word is decoded.

Verification

ruff check, ruff format --check, mypy, 347 tests and sphinx-build -W --keep-going all
pass. Statement count drops 6013 → 6008, four of the five removed statements having been
uncovered.

Note for whoever merges second

This touches CHANGELOG.md under Unreleased, as does #13. The two entries are independent and
the conflict is textual only.

🤖 Generated with Claude Code

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>
@mmlado
mmlado requested a review from embarquech September 25, 2026 10:37
@mmlado
mmlado merged commit 595c3ac into main Sep 29, 2026
12 checks passed
@mmlado
mmlado deleted the chore/remove-dead-code branch September 29, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant