mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Update python-typing-update to v0.3.5 (#53223)
* Update python-typing-update to 0.3.5 * Update typing
This commit is contained in:
parent
cd37c2492b
commit
5d2ce19746
@ -70,7 +70,7 @@ repos:
|
|||||||
- id: prettier
|
- id: prettier
|
||||||
stages: [manual]
|
stages: [manual]
|
||||||
- repo: https://github.com/cdce8p/python-typing-update
|
- repo: https://github.com/cdce8p/python-typing-update
|
||||||
rev: v0.3.3
|
rev: v0.3.5
|
||||||
hooks:
|
hooks:
|
||||||
# Run `python-typing-update` hook manually from time to time
|
# Run `python-typing-update` hook manually from time to time
|
||||||
# to update python typing syntax.
|
# to update python typing syntax.
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
"""The Search integration."""
|
"""The Search integration."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections import defaultdict, deque
|
from collections import defaultdict, deque
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -71,7 +73,7 @@ class Searcher:
|
|||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
device_reg: device_registry.DeviceRegistry,
|
device_reg: device_registry.DeviceRegistry,
|
||||||
entity_reg: entity_registry.EntityRegistry,
|
entity_reg: entity_registry.EntityRegistry,
|
||||||
entity_sources: "dict[str, dict[str, str]]",
|
entity_sources: dict[str, dict[str, str]],
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Search results."""
|
"""Search results."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"""Configure pytest for Litter-Robot tests."""
|
"""Configure pytest for Litter-Robot tests."""
|
||||||
from typing import Any, Optional
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from pylitterbot import Account, Robot
|
from pylitterbot import Account, Robot
|
||||||
@ -15,7 +17,7 @@ from tests.common import MockConfigEntry
|
|||||||
|
|
||||||
|
|
||||||
def create_mock_robot(
|
def create_mock_robot(
|
||||||
robot_data: Optional[dict] = None, side_effect: Optional[Any] = None
|
robot_data: dict | None = None, side_effect: Any | None = None
|
||||||
) -> Robot:
|
) -> Robot:
|
||||||
"""Create a mock Litter-Robot device."""
|
"""Create a mock Litter-Robot device."""
|
||||||
if not robot_data:
|
if not robot_data:
|
||||||
@ -33,8 +35,8 @@ def create_mock_robot(
|
|||||||
|
|
||||||
|
|
||||||
def create_mock_account(
|
def create_mock_account(
|
||||||
robot_data: Optional[dict] = None,
|
robot_data: dict | None = None,
|
||||||
side_effect: Optional[Any] = None,
|
side_effect: Any | None = None,
|
||||||
skip_robots: bool = False,
|
skip_robots: bool = False,
|
||||||
) -> MagicMock:
|
) -> MagicMock:
|
||||||
"""Create a mock Litter-Robot account."""
|
"""Create a mock Litter-Robot account."""
|
||||||
@ -72,7 +74,7 @@ def mock_account_with_side_effects() -> MagicMock:
|
|||||||
|
|
||||||
|
|
||||||
async def setup_integration(
|
async def setup_integration(
|
||||||
hass: HomeAssistant, mock_account: MagicMock, platform_domain: Optional[str] = None
|
hass: HomeAssistant, mock_account: MagicMock, platform_domain: str | None = None
|
||||||
) -> MockConfigEntry:
|
) -> MockConfigEntry:
|
||||||
"""Load a Litter-Robot platform with the provided hub."""
|
"""Load a Litter-Robot platform with the provided hub."""
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user