chore(python): remove unused `_skip_init_device` flag
What changed, and why it matters
This is a minor cleanup change in the Python Trezor library. It removes an internal, underscore-prefixed flag called `_skip_init_device` that was not being used anywhere. The function now always refreshes device features after loading a device. There is no security issue here.
No action needed. This is a benign cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the _skip_init_device parameter from load_device() in python/src/trezorlib/debuglink.py. This was a private/internal parameter (indicated by the leading underscore) and was not referenced elsewhere in the codebase. The conditional if not _skip_init_device: session.refresh_features() is replaced with an unconditional call to session.refresh_features(). This is a straightforward refactoring with no functional or security impact.
Changed components
python/src/trezorlib/debuglink.pyInspect captured patch +1 / −3
diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py
index 358042c4..a675a4f3 100644
--- a/python/src/trezorlib/debuglink.py
+++ b/python/src/trezorlib/debuglink.py
@@ -1753,7 +1753,6 @@ def load_device(
skip_checksum: bool = False,
needs_backup: bool = False,
no_backup: bool = False,
- _skip_init_device: bool = False,
) -> None:
if isinstance(mnemonic, str):
mnemonic = [mnemonic]
@@ -1777,8 +1776,7 @@ def load_device(
),
expect=messages.Success,
)
- if not _skip_init_device:
- session.refresh_features()
+ session.refresh_features()
# keep the old name for compatibility
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.