mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 23:37:18 +00:00
Update mypy to a custom version (#111258)
* Update mypy to a custom version * Fix call_soon_threadsafe typing Result from a recent typeshed change -> better asyncio callback typing with Ts
This commit is contained in:
parent
841d4e320f
commit
f0be33fc6a
@ -513,6 +513,11 @@ class HomeAssistant:
|
|||||||
"""
|
"""
|
||||||
if target is None:
|
if target is None:
|
||||||
raise ValueError("Don't call add_job with None")
|
raise ValueError("Don't call add_job with None")
|
||||||
|
if asyncio.iscoroutine(target):
|
||||||
|
self.loop.call_soon_threadsafe(self.async_add_job, target)
|
||||||
|
return
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
target = cast(Callable[..., Any], target)
|
||||||
self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
|
self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
|
@ -11,7 +11,7 @@ astroid==3.1.0
|
|||||||
coverage==7.4.3
|
coverage==7.4.3
|
||||||
freezegun==1.4.0
|
freezegun==1.4.0
|
||||||
mock-open==1.4.0
|
mock-open==1.4.0
|
||||||
mypy==1.8.0
|
mypy-dev==1.9.0b1
|
||||||
pre-commit==3.6.2
|
pre-commit==3.6.2
|
||||||
pydantic==1.10.12
|
pydantic==1.10.12
|
||||||
pylint==3.1.0
|
pylint==3.1.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user