From 8e024ad20f96bd875b45784af098e13091b6bd7d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:46:27 +0200 Subject: [PATCH] Fix invalid Any annotations (#122212) --- tests/components/lastfm/__init__.py | 3 ++- tests/components/unifi/test_sensor.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/components/lastfm/__init__.py b/tests/components/lastfm/__init__.py index 9fe946f8dff..e4eb476f62d 100644 --- a/tests/components/lastfm/__init__.py +++ b/tests/components/lastfm/__init__.py @@ -1,5 +1,6 @@ """The tests for lastfm.""" +from typing import Any from unittest.mock import patch from pylast import PyLastError, Track @@ -91,7 +92,7 @@ class MockUser: """Get mock now playing.""" return self._now_playing_result - def get_friends(self) -> list[any]: + def get_friends(self) -> list[Any]: """Get mock friends.""" if len(self._friends) == 0: raise PyLastError("network", "status", "Page not found") diff --git a/tests/components/unifi/test_sensor.py b/tests/components/unifi/test_sensor.py index 281c4583399..e1893922f60 100644 --- a/tests/components/unifi/test_sensor.py +++ b/tests/components/unifi/test_sensor.py @@ -740,9 +740,9 @@ async def test_outlet_power_readings( device_payload: list[dict[str, Any]], entity_id: str, expected_unique_id: str, - expected_value: any, + expected_value: Any, changed_data: dict | None, - expected_update_value: any, + expected_update_value: Any, ) -> None: """Test the outlet power reporting on PDU devices.""" assert len(hass.states.async_all()) == 13