Enable Ruff RET502 (#115139)

This commit is contained in:
Sid 2024-05-21 22:19:33 +02:00 committed by GitHub
parent ff2b851683
commit c2b3bf3fb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 87 additions and 86 deletions

View file

@ -174,7 +174,7 @@ class Gateway:
"""Get the model of the modem."""
model = await self._worker.get_model_async()
if not model or not model[0]:
return
return None
display = model[0] # Identification model
if model[1]: # Real model
display = f"{display} ({model[1]})"
@ -184,7 +184,7 @@ class Gateway:
"""Get the firmware information of the modem."""
firmware = await self._worker.get_firmware_async()
if not firmware or not firmware[0]:
return
return None
display = firmware[0] # Version
if firmware[1]: # Date
display = f"{display} ({firmware[1]})"