mirror of
https://github.com/home-assistant/core.git
synced 2026-09-25 07:51:46 -05:00
Enable strict typing in collection_image (#181118)
This commit is contained in:
@@ -147,6 +147,7 @@ homeassistant.components.clicksend.*
|
||||
homeassistant.components.climate.*
|
||||
homeassistant.components.cloud.*
|
||||
homeassistant.components.co2signal.*
|
||||
homeassistant.components.collection_image.*
|
||||
homeassistant.components.comelit.*
|
||||
homeassistant.components.command_line.*
|
||||
homeassistant.components.compit.*
|
||||
|
||||
@@ -109,7 +109,7 @@ class CollectionImageImageEntity(ImageEntity):
|
||||
self._attr_available = True
|
||||
await self.update_image(child.media_content_id)
|
||||
|
||||
async def update_image(self, image_id: str):
|
||||
async def update_image(self, image_id: str) -> None:
|
||||
"""Update the entity from the image_id."""
|
||||
self._cached_image = None
|
||||
try:
|
||||
|
||||
@@ -109,4 +109,4 @@ rules:
|
||||
inject-websession:
|
||||
status: exempt
|
||||
comment: No external connections.
|
||||
strict-typing: todo
|
||||
strict-typing: done
|
||||
|
||||
@@ -1227,6 +1227,16 @@ disallow_untyped_defs = true
|
||||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[mypy-homeassistant.components.collection_image.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_subclassing_any = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_decorators = true
|
||||
disallow_untyped_defs = true
|
||||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[mypy-homeassistant.components.comelit.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
||||
Reference in New Issue
Block a user