Iterate dictionary directly

This commit is contained in:
deepsource-autofix[bot]
2021-12-26 04:59:47 +00:00
committed by GitHub
parent 6c6fe37203
commit c3865ca093
2 changed files with 5 additions and 5 deletions

View File

@@ -169,7 +169,7 @@ class Packet:
def parse(val: typing.Union[bytes, None]) -> typing.Union[bytes, None]:
for cmd in [
Packet.Type.__dict__[attr]
for attr in Packet.Type.__dict__.keys()
for attr in Packet.Type.__dict__
if re.search("__.+?__", attr) is None
and type(Packet.Type.__dict__[attr]) is bytes
]: