Add ComponentProtocol to improve type checking (#90586)

This commit is contained in:
epenet 2023-03-31 20:19:58 +02:00 committed by GitHub
parent 03137feba5
commit 611d4135fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 17 deletions

View file

@ -236,7 +236,7 @@ async def _async_setup_component(
SLOW_SETUP_WARNING,
)
task = None
task: Awaitable[bool] | None = None
result: Any | bool = True
try:
if hasattr(component, "async_setup"):