refactor(test): replace all Union usage by | syntax in `/tests` [no changelog]
What changed, and why it matters
This is a minor code cleanup in the test suite only. It replaces an older Python type-hint style (`Union[...]`) with a newer, equivalent syntax (`|`) in a single test helper file. There is no change to the actual Trezor firmware or to any runtime behavior, and no security relevance.
No action required. The change is a non-functional style refactor in test code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff changes one type alias under if t.TYPE_CHECKING: in tests/click_tests/common.py from t.List[t.Union[str, t.Tuple[str, ...]]] to list[str | tuple[str, ...]]. This is a purely syntactic refactor of a type annotation used only during static type checking; it does not alter executable code, the firmware, device behavior, or test logic.
Changed components
tests/click_tests/common.py (test-only type annotation)Inspect captured patch +1 / −1
diff --git a/tests/click_tests/common.py b/tests/click_tests/common.py
index bcfbe65eb..05996bdeb 100644
--- a/tests/click_tests/common.py
+++ b/tests/click_tests/common.py
@@ -10,7 +10,7 @@ from .. import translations as TR
if t.TYPE_CHECKING:
from trezorlib.debuglink import DebugLink, LayoutContent
- AllActionsType = t.List[t.Union[str, t.Tuple[str, ...]]]
+ AllActionsType = list[str | tuple[str, ...]]
# Passphrases and addresses for both models
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.