mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Replace meaningless TypeVar usage (#117553)
This commit is contained in:
parent
ab07bc5298
commit
53da59a454
@ -2766,14 +2766,16 @@ class ServiceRegistry:
|
||||
target = job.target
|
||||
if job.job_type is HassJobType.Coroutinefunction:
|
||||
if TYPE_CHECKING:
|
||||
target = cast(Callable[..., Coroutine[Any, Any, _R]], target)
|
||||
target = cast(
|
||||
Callable[..., Coroutine[Any, Any, ServiceResponse]], target
|
||||
)
|
||||
return await target(service_call)
|
||||
if job.job_type is HassJobType.Callback:
|
||||
if TYPE_CHECKING:
|
||||
target = cast(Callable[..., _R], target)
|
||||
target = cast(Callable[..., ServiceResponse], target)
|
||||
return target(service_call)
|
||||
if TYPE_CHECKING:
|
||||
target = cast(Callable[..., _R], target)
|
||||
target = cast(Callable[..., ServiceResponse], target)
|
||||
return await self._hass.async_add_executor_job(target, service_call)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user