Update mypy-dev to 1.11.0a2 (#117630)

This commit is contained in:
Marc Mueller 2024-05-17 13:32:20 +02:00 committed by GitHub
parent eacbebce22
commit 4edee94a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 16 deletions

View file

@ -580,8 +580,6 @@ class HomeAssistant:
functools.partial(self.async_create_task, target, eager_start=True)
)
return
if TYPE_CHECKING:
target = cast(Callable[[*_Ts], Any], target)
self.loop.call_soon_threadsafe(
functools.partial(self._async_add_hass_job, HassJob(target), *args)
)
@ -648,12 +646,6 @@ class HomeAssistant:
if asyncio.iscoroutine(target):
return self.async_create_task(target, eager_start=eager_start)
# This code path is performance sensitive and uses
# if TYPE_CHECKING to avoid the overhead of constructing
# the type used for the cast. For history see:
# https://github.com/home-assistant/core/pull/71960
if TYPE_CHECKING:
target = cast(Callable[[*_Ts], Coroutine[Any, Any, _R] | _R], target)
return self._async_add_hass_job(HassJob(target), *args)
@overload
@ -987,12 +979,6 @@ class HomeAssistant:
if asyncio.iscoroutine(target):
return self.async_create_task(target, eager_start=True)
# This code path is performance sensitive and uses
# if TYPE_CHECKING to avoid the overhead of constructing
# the type used for the cast. For history see:
# https://github.com/home-assistant/core/pull/71960
if TYPE_CHECKING:
target = cast(Callable[[*_Ts], Coroutine[Any, Any, _R] | _R], target)
return self.async_run_hass_job(HassJob(target), *args)
def block_till_done(self, wait_background_tasks: bool = False) -> None: