fix(core): Pylance issues [no changelog]
What changed, and why it matters
This commit is a minor code cleanup that changes type annotations in a Solana-related layout file. It removes an unused import and switches three variable type hints from a broader type (PropertyType) to a narrower one (StrPropertyType). There is no functional code change, no behavior change, and no security fix.
No security action required. Treat as a normal lint/type-checker cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates core/src/apps/solana/layout.py. It removes the import of PropertyType from trezor.ui.layouts and changes three list type annotations (account_data, signers, accounts) from list[PropertyType] to list[StrPropertyType]. These are TYPE_CHECKING-only imports and annotations; they do not alter runtime behavior. The commit title explicitly states ‘Pylance issues’ and is marked ‘[no changelog]’.
Changed components
core/src/apps/solana/layout.pyInspect captured patch +4 / −4
diff --git a/core/src/apps/solana/layout.py b/core/src/apps/solana/layout.py
index ef3dfcc3..cd5ee739 100644
--- a/core/src/apps/solana/layout.py
+++ b/core/src/apps/solana/layout.py
@@ -23,7 +23,7 @@ if TYPE_CHECKING:
from typing import Sequence
from trezor.messages import PaymentRequest, SolanaOffchainMessageV1, SolanaTokenInfo
- from trezor.ui.layouts import PropertyType, StrPropertyType
+ from trezor.ui.layouts import StrPropertyType
from .definitions import Definitions
from .transaction import Fee
@@ -140,7 +140,7 @@ async def confirm_instruction(
):
continue
- account_data: list[PropertyType] = []
+ account_data: list[StrPropertyType] = []
if not is_address_reference(account_value):
account_description = f"{base58.encode(account_value[0])}"
token = definitions.get_token(account_value[0])
@@ -168,7 +168,7 @@ async def confirm_instruction(
raise ValueError # Invalid ui property
if instruction.multisig_signers:
- signers: list[PropertyType] = []
+ signers: list[StrPropertyType] = []
for i, multisig_signer in enumerate(instruction.multisig_signers, 1):
if not is_address_reference(multisig_signer):
multisig_signer_public_key = multisig_signer[0]
@@ -243,7 +243,7 @@ async def confirm_unsupported_instruction_details(
)
for i, account in enumerate(instruction.accounts, 1):
- accounts: list[PropertyType] = []
+ accounts: list[StrPropertyType] = []
if not is_address_reference(account):
account_public_key = account[0]
address_type = get_address_type(account[1])
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.