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
3 changed files with 11 additions and 7 deletions
|
@ -70,7 +70,7 @@ repos:
|
|||
- id: prettier
|
||||
stages: [manual]
|
||||
- repo: https://github.com/cdce8p/python-typing-update
|
||||
rev: v0.3.3
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
# Run `python-typing-update` hook manually from time to time
|
||||
# to update python typing syntax.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""The Search integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import defaultdict, deque
|
||||
import logging
|
||||
|
||||
|
@ -71,7 +73,7 @@ class Searcher:
|
|||
hass: HomeAssistant,
|
||||
device_reg: device_registry.DeviceRegistry,
|
||||
entity_reg: entity_registry.EntityRegistry,
|
||||
entity_sources: "dict[str, dict[str, str]]",
|
||||
entity_sources: dict[str, dict[str, str]],
|
||||
) -> None:
|
||||
"""Search results."""
|
||||
self.hass = hass
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"""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 pylitterbot import Account, Robot
|
||||
|
@ -15,7 +17,7 @@ from tests.common import MockConfigEntry
|
|||
|
||||
|
||||
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:
|
||||
"""Create a mock Litter-Robot device."""
|
||||
if not robot_data:
|
||||
|
@ -33,8 +35,8 @@ def create_mock_robot(
|
|||
|
||||
|
||||
def create_mock_account(
|
||||
robot_data: Optional[dict] = None,
|
||||
side_effect: Optional[Any] = None,
|
||||
robot_data: dict | None = None,
|
||||
side_effect: Any | None = None,
|
||||
skip_robots: bool = False,
|
||||
) -> MagicMock:
|
||||
"""Create a mock Litter-Robot account."""
|
||||
|
@ -72,7 +74,7 @@ def mock_account_with_side_effects() -> MagicMock:
|
|||
|
||||
|
||||
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:
|
||||
"""Load a Litter-Robot platform with the provided hub."""
|
||||
entry = MockConfigEntry(
|
||||
|
|
Loading…
Add table
Reference in a new issue