Skip to content

Commit

Permalink
Update python-typing-update to v0.3.5 (home-assistant#53223)
Browse files Browse the repository at this point in the history
* Update python-typing-update to 0.3.5

* Update typing
  • Loading branch information
cdce8p authored Jul 20, 2021
1 parent cd37c24 commit 5d2ce19
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/search/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""The Search integration."""
from __future__ import annotations

from collections import defaultdict, deque
import logging

Expand Down Expand Up @@ -71,7 +73,7 @@ def __init__(
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
Expand Down
12 changes: 7 additions & 5 deletions tests/components/litterrobot/conftest.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,7 +17,7 @@


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:
Expand All @@ -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."""
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5d2ce19

Please sign in to comment.