mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 12:58:13 +00:00
fix(python): prevent accidental modification of models.TREZORS
This commit is contained in:
parent
17706540b5
commit
abe51b93a8
1
python/.changelog.d/+4afd8b1d.fixed
Normal file
1
python/.changelog.d/+4afd8b1d.fixed
Normal file
@ -0,0 +1 @@
|
|||||||
|
Use `frozenset` for `models.TREZORS` to prevent accidental modification.
|
@ -109,7 +109,7 @@ TREZOR_SAFE5 = T3T1
|
|||||||
TREZOR_DISC1 = DISC1
|
TREZOR_DISC1 = DISC1
|
||||||
TREZOR_DISC2 = DISC2
|
TREZOR_DISC2 = DISC2
|
||||||
|
|
||||||
TREZORS = {T1B1, T2T1, T2B1, T3T1, T3B1, DISC1, DISC2}
|
TREZORS = frozenset({T1B1, T2T1, T2B1, T3T1, T3B1, DISC1, DISC2})
|
||||||
|
|
||||||
|
|
||||||
def by_name(name: Optional[str]) -> Optional[TrezorModel]:
|
def by_name(name: Optional[str]) -> Optional[TrezorModel]:
|
||||||
|
Loading…
Reference in New Issue
Block a user