Enable Ruff RET504 (#114528)
* Enable Ruff RET504 * fix test * Use noqa instead of cast * fix sonos RET504 --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
a28731c294
commit
0d66d298ec
200 changed files with 252 additions and 595 deletions
|
@ -82,8 +82,7 @@ async def _async_get_image(image_entity: ImageEntity, timeout: int) -> Image:
|
|||
async with asyncio.timeout(timeout):
|
||||
if image_bytes := await image_entity.async_image():
|
||||
content_type = valid_image_content_type(image_entity.content_type)
|
||||
image = Image(content_type, image_bytes)
|
||||
return image
|
||||
return Image(content_type, image_bytes)
|
||||
|
||||
raise HomeAssistantError("Unable to get image")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue