1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-02 19:40:57 +00:00

python: silenced unused variables (#1202)

This commit is contained in:
Ferdinando M. Ametrano 2020-08-24 10:56:18 +02:00 committed by GitHub
parent d080464cc5
commit b3d483dd6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ class MessageType:
@classmethod @classmethod
def get_field_type(cls, name: str) -> Optional[FieldType]: def get_field_type(cls, name: str) -> Optional[FieldType]:
for fname, ftype, flags in cls.get_fields().values(): for fname, ftype, _ in cls.get_fields().values():
if fname == name: if fname == name:
return ftype return ftype
return None return None
@ -239,7 +239,7 @@ class MessageType:
def _fill_missing(self) -> None: def _fill_missing(self) -> None:
# fill missing fields # fill missing fields
for fname, ftype, fflags in self.get_fields().values(): for fname, _, fflags in self.get_fields().values():
if not hasattr(self, fname): if not hasattr(self, fname):
if fflags & FLAG_REPEATED: if fflags & FLAG_REPEATED:
setattr(self, fname, []) setattr(self, fname, [])