Fix implicit-return in unifiprotect tests (#122781)

pull/122804/head
epenet 2024-07-29 21:50:45 +02:00 committed by GitHub
parent 1f488b00f8
commit 5d87a74c3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ from __future__ import annotations
from collections.abc import Callable, Sequence
from dataclasses import dataclass
from datetime import timedelta
from typing import Any
from unittest.mock import Mock
from uiprotect import ProtectApiClient
@ -41,11 +40,11 @@ class MockUFPFixture:
ws_subscription: Callable[[WSSubscriptionMessage], None] | None = None
ws_state_subscription: Callable[[WebsocketState], None] | None = None
def ws_msg(self, msg: WSSubscriptionMessage) -> Any:
def ws_msg(self, msg: WSSubscriptionMessage) -> None:
"""Emit WS message for testing."""
if self.ws_subscription is not None:
return self.ws_subscription(msg)
self.ws_subscription(msg)
def reset_objects(bootstrap: Bootstrap):