Update mypy dev 1.11.0a8 (#120032)

This commit is contained in:
Marc Mueller 2024-06-21 13:15:18 +02:00 committed by GitHub
parent 01d4629a2b
commit f0452e9ba0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 8 deletions

View File

@ -13,7 +13,7 @@ from .coordinator import AquacellCoordinator
PLATFORMS = [Platform.SENSOR] PLATFORMS = [Platform.SENSOR]
AquacellConfigEntry = ConfigEntry[AquacellCoordinator] type AquacellConfigEntry = ConfigEntry[AquacellCoordinator]
async def async_setup_entry(hass: HomeAssistant, entry: AquacellConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: AquacellConfigEntry) -> bool:

View File

@ -11,8 +11,7 @@ from .const import REDACTED
@overload @overload
def async_redact_data(data: Mapping, to_redact: Iterable[Any]) -> dict: # type: ignore[overload-overlap] def async_redact_data(data: Mapping, to_redact: Iterable[Any]) -> dict: ...
...
@overload @overload

View File

@ -899,7 +899,7 @@ class MQTT:
"""Return a string with the exception message.""" """Return a string with the exception message."""
# if msg_callback is a partial we return the name of the first argument # if msg_callback is a partial we return the name of the first argument
if isinstance(msg_callback, partial): if isinstance(msg_callback, partial):
call_back_name = getattr(msg_callback.args[0], "__name__") # type: ignore[unreachable] call_back_name = getattr(msg_callback.args[0], "__name__")
else: else:
call_back_name = getattr(msg_callback, "__name__") call_back_name = getattr(msg_callback, "__name__")
return ( return (

View File

@ -1,5 +1,7 @@
"""Recorder constants.""" """Recorder constants."""
from __future__ import annotations
from enum import StrEnum from enum import StrEnum
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
@ -17,7 +19,7 @@ if TYPE_CHECKING:
from .core import Recorder # noqa: F401 from .core import Recorder # noqa: F401
DATA_INSTANCE: HassKey["Recorder"] = HassKey("recorder_instance") DATA_INSTANCE: HassKey[Recorder] = HassKey("recorder_instance")
SQLITE_URL_PREFIX = "sqlite://" SQLITE_URL_PREFIX = "sqlite://"

View File

@ -29,7 +29,7 @@ def partial_redact(
@overload @overload
def async_redact_data[_ValueT]( # type: ignore[overload-overlap] def async_redact_data[_ValueT](
data: Mapping, to_redact: Iterable[Any] | Mapping[Any, Callable[[_ValueT], _ValueT]] data: Mapping, to_redact: Iterable[Any] | Mapping[Any, Callable[[_ValueT], _ValueT]]
) -> dict: ... ) -> dict: ...

View File

@ -3045,7 +3045,7 @@ class TemplateEnvironment(ImmutableSandboxedEnvironment):
return super().is_safe_attribute(obj, attr, value) return super().is_safe_attribute(obj, attr, value)
@overload @overload
def compile( # type: ignore[overload-overlap] def compile(
self, self,
source: str | jinja2.nodes.Template, source: str | jinja2.nodes.Template,
name: str | None = None, name: str | None = None,

View File

@ -11,7 +11,7 @@ astroid==3.2.2
coverage==7.5.3 coverage==7.5.3
freezegun==1.5.0 freezegun==1.5.0
mock-open==1.4.0 mock-open==1.4.0
mypy-dev==1.11.0a6 mypy-dev==1.11.0a8
pre-commit==3.7.1 pre-commit==3.7.1
pydantic==1.10.17 pydantic==1.10.17
pylint==3.2.2 pylint==3.2.2