Use assignment expressions 38 (#58828)

This commit is contained in:
Marc Mueller 2021-10-31 18:49:18 +01:00 committed by GitHub
parent b6d9e517c2
commit 72801867d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 26 additions and 54 deletions

View file

@ -21,8 +21,7 @@ async def async_setup_addon_panel(hass: HomeAssistant, hassio):
hass.http.register_view(hassio_addon_panel)
# If panels are exists
panels = await hassio_addon_panel.get_panels()
if not panels:
if not (panels := await hassio_addon_panel.get_panels()):
return
# Register available panels