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:
parent
d080464cc5
commit
b3d483dd6b
@ -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, [])
|
||||||
|
Loading…
Reference in New Issue
Block a user