Skip to content

Commit

Permalink
Update mypy-dev to 1.14.0a5 (#132063)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Dec 2, 2024
1 parent 89ee49e commit fe0f414
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/renault/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ def __init__(
def _get_data_attr(self, key: str) -> StateType:
"""Return the attribute value from the coordinator data."""
if self.coordinator.data is None:
return None # type: ignore[unreachable]
return None
return cast(StateType, getattr(self.coordinator.data, key))
16 changes: 14 additions & 2 deletions homeassistant/helpers/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@
from struct import error as StructError, pack, unpack_from
import sys
from types import CodeType, TracebackType
from typing import Any, Concatenate, Literal, NoReturn, Self, cast, overload
from typing import (
TYPE_CHECKING,
Any,
Concatenate,
Literal,
NoReturn,
Self,
cast,
overload,
)
from urllib.parse import urlencode as urllib_urlencode
import weakref

Expand Down Expand Up @@ -88,6 +97,9 @@
from .translation import async_translate_state
from .typing import TemplateVarsType

if TYPE_CHECKING:
from _typeshed import OptExcInfo

# mypy: allow-untyped-defs, no-check-untyped-defs

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -532,7 +544,7 @@ def __init__(self, template: str, hass: HomeAssistant | None = None) -> None:
self._compiled: jinja2.Template | None = None
self.hass = hass
self.is_static = not is_template_string(template)
self._exc_info: sys._OptExcInfo | None = None
self._exc_info: OptExcInfo | None = None
self._limited: bool | None = None
self._strict: bool | None = None
self._log_fn: Callable[[int, str], None] | None = None
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ coverage==7.6.8
freezegun==1.5.1
license-expression==30.4.0
mock-open==1.4.0
mypy-dev==1.14.0a3
mypy-dev==1.14.0a5
pre-commit==4.0.0
pydantic==1.10.19
pylint==3.3.1
Expand Down

0 comments on commit fe0f414

Please sign in to comment.