Skip to content

Commit 65540a3

Browse files
authored
Update mypy dev to 1.19.0a4 (home-assistant#153995)
1 parent cbf1b39 commit 65540a3

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ jobs:
741741
- name: Generate partial mypy restore key
742742
id: generate-mypy-key
743743
run: |
744-
mypy_version=$(cat requirements_test.txt | grep mypy | cut -d '=' -f 3)
744+
mypy_version=$(cat requirements_test.txt | grep 'mypy.*=' | cut -d '=' -f 3)
745745
echo "version=$mypy_version" >> $GITHUB_OUTPUT
746746
echo "key=mypy-${{ env.MYPY_CACHE_VERSION }}-$mypy_version-${{
747747
env.HA_SHORT_VERSION }}-$(date -u '+%Y-%m-%dT%H:%M:%s')" >> $GITHUB_OUTPUT

homeassistant/components/homekit/accessories.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def available(self) -> bool:
456456
return self._available
457457

458458
@ha_callback
459-
@pyhap_callback # type: ignore[misc]
459+
@pyhap_callback # type: ignore[untyped-decorator]
460460
def run(self) -> None:
461461
"""Handle accessory driver started event."""
462462
if state := self.hass.states.get(self.entity_id):
@@ -725,7 +725,7 @@ def __init__(
725725
self._entry_title = entry_title
726726
self.iid_storage = iid_storage
727727

728-
@pyhap_callback # type: ignore[misc]
728+
@pyhap_callback # type: ignore[untyped-decorator]
729729
def pair(
730730
self, client_username_bytes: bytes, client_public: str, client_permissions: int
731731
) -> bool:
@@ -735,7 +735,7 @@ def pair(
735735
async_dismiss_setup_message(self.hass, self.entry_id)
736736
return cast(bool, success)
737737

738-
@pyhap_callback # type: ignore[misc]
738+
@pyhap_callback # type: ignore[untyped-decorator]
739739
def unpair(self, client_uuid: UUID) -> None:
740740
"""Override super function to show setup message if unpaired."""
741741
super().unpair(client_uuid)

homeassistant/components/homekit/doorbell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
7171
self.async_update_doorbell_state(None, state)
7272

7373
@ha_callback
74-
@pyhap_callback # type: ignore[misc]
74+
@pyhap_callback # type: ignore[untyped-decorator]
7575
def run(self) -> None:
7676
"""Handle doorbell event."""
7777
if self._char_doorbell_detected:

homeassistant/components/homekit/type_air_purifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def should_add_preset_mode_switch(self, preset_mode: str) -> bool:
219219
return preset_mode.lower() != "auto"
220220

221221
@callback
222-
@pyhap_callback # type: ignore[misc]
222+
@pyhap_callback # type: ignore[untyped-decorator]
223223
def run(self) -> None:
224224
"""Handle accessory driver started event.
225225

homeassistant/components/homekit/type_cameras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def __init__(
229229
)
230230
self._async_update_motion_state(None, state)
231231

232-
@pyhap_callback # type: ignore[misc]
232+
@pyhap_callback # type: ignore[untyped-decorator]
233233
@callback
234234
def run(self) -> None:
235235
"""Handle accessory driver started event.

homeassistant/components/homekit/type_covers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, *args: Any) -> None:
127127
self.async_update_state(state)
128128

129129
@callback
130-
@pyhap_callback # type: ignore[misc]
130+
@pyhap_callback # type: ignore[untyped-decorator]
131131
def run(self) -> None:
132132
"""Handle accessory driver started event.
133133

homeassistant/components/homekit/type_humidifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def __init__(self, *args: Any) -> None:
178178
self._async_update_current_humidity(humidity_state)
179179

180180
@callback
181-
@pyhap_callback # type: ignore[misc]
181+
@pyhap_callback # type: ignore[untyped-decorator]
182182
def run(self) -> None:
183183
"""Handle accessory driver started event.
184184

homeassistant/components/homekit/type_triggers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ async def async_attach(self) -> None:
108108
_LOGGER.log,
109109
)
110110

111-
@pyhap_callback # type: ignore[misc]
111+
@pyhap_callback # type: ignore[untyped-decorator]
112112
@callback
113113
def run(self) -> None:
114114
"""Run the accessory."""

homeassistant/components/mcp_server/server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def get_api_instance() -> llm.APIInstance:
5959
# Backwards compatibility with old MCP Server config
6060
return await llm.async_get_api(hass, llm_api_id, llm_context)
6161

62-
@server.list_prompts() # type: ignore[no-untyped-call, misc]
62+
@server.list_prompts() # type: ignore[no-untyped-call,untyped-decorator]
6363
async def handle_list_prompts() -> list[types.Prompt]:
6464
llm_api = await get_api_instance()
6565
return [
@@ -69,7 +69,7 @@ async def handle_list_prompts() -> list[types.Prompt]:
6969
)
7070
]
7171

72-
@server.get_prompt() # type: ignore[no-untyped-call, misc]
72+
@server.get_prompt() # type: ignore[no-untyped-call,untyped-decorator]
7373
async def handle_get_prompt(
7474
name: str, arguments: dict[str, str] | None
7575
) -> types.GetPromptResult:
@@ -90,13 +90,13 @@ async def handle_get_prompt(
9090
],
9191
)
9292

93-
@server.list_tools() # type: ignore[no-untyped-call, misc]
93+
@server.list_tools() # type: ignore[no-untyped-call,untyped-decorator]
9494
async def list_tools() -> list[types.Tool]:
9595
"""List available time tools."""
9696
llm_api = await get_api_instance()
9797
return [_format_tool(tool, llm_api.custom_serializer) for tool in llm_api.tools]
9898

99-
@server.call_tool() # type: ignore[misc]
99+
@server.call_tool() # type: ignore[untyped-decorator]
100100
async def call_tool(name: str, arguments: dict) -> Sequence[types.TextContent]:
101101
"""Handle calling tools."""
102102
llm_api = await get_api_instance()

requirements_test.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ astroid==3.3.11
1111
coverage==7.10.6
1212
freezegun==1.5.2
1313
go2rtc-client==0.2.1
14+
# librt is an internal mypy dependency
15+
librt==0.2.1
1416
license-expression==30.4.3
1517
mock-open==1.4.0
16-
mypy-dev==1.19.0a2
18+
mypy-dev==1.19.0a4
1719
pre-commit==4.2.0
1820
pydantic==2.12.0
1921
pylint==3.3.8

0 commit comments

Comments
 (0)