Update python-typing-update to v0.3.5 (#53223)

* Update python-typing-update to 0.3.5

* Update typing
This commit is contained in:
Marc Mueller 2021-07-20 11:31:48 +02:00 committed by GitHub
parent cd37c2492b
commit 5d2ce19746
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View file

@ -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.

View file

@ -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

View file

@ -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(