1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

fix(python): prevent accidental modification of models.TREZORS

This commit is contained in:
matejcik 2024-09-02 13:59:45 +02:00 committed by matejcik
parent 17706540b5
commit abe51b93a8
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Use `frozenset` for `models.TREZORS` to prevent accidental modification.

View File

@ -109,7 +109,7 @@ TREZOR_SAFE5 = T3T1
TREZOR_DISC1 = DISC1
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]: