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]
AquacellConfigEntry = ConfigEntry[AquacellCoordinator]
type AquacellConfigEntry = ConfigEntry[AquacellCoordinator]
async def async_setup_entry(hass: HomeAssistant, entry: AquacellConfigEntry) -> bool:

View File

@ -11,8 +11,7 @@ from .const import REDACTED
@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

View File

@ -899,7 +899,7 @@ class MQTT:
"""Return a string with the exception message."""
# if msg_callback is a partial we return the name of the first argument
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:
call_back_name = getattr(msg_callback, "__name__")
return (

View File

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

View File

@ -29,7 +29,7 @@ def partial_redact(
@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]]
) -> dict: ...

View File

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

View File

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