refactor(core): no need to check `LayoutObj.request_complete_repaint` result
What changed, and why it matters
This is a tiny code cleanup in the Trezor firmware's user-interface layer. It removes an `assert` statement that checked the return value of a repaint request. There is no security-relevant change: the method still performs the same repaint request; it just no longer verifies that the call returned nothing. No bug fix, vulnerability, or security behavior is introduced.
No action needed. Treat as routine refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors Layout.request_complete_repaint() in core/src/trezor/ui/__init__.py. Previously it stored the return value of self.layout.request_complete_repaint() and asserted it was None. Now it simply returns that value directly. The method’s own return annotation remains -> None, so this is a stylistic/consistency refactor. No functional or security change is evident from the diff.
Changed components
core/src/trezor/ui/__init__.pyInspect captured patch +1 / −2
diff --git a/core/src/trezor/ui/__init__.py b/core/src/trezor/ui/__init__.py
index ffd042d8..fc31c7f7 100644
--- a/core/src/trezor/ui/__init__.py
+++ b/core/src/trezor/ui/__init__.py
@@ -283,8 +283,7 @@ class Layout(Generic[T]):
def request_complete_repaint(self) -> None:
"""Request a complete repaint of the layout."""
- msg = self.layout.request_complete_repaint()
- assert msg is None
+ return self.layout.request_complete_repaint()
def repaint(self) -> None:
"""Repaint the layout. Forces drawing at this moment.
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.