harbor-python 1.2.0__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: harbor-python
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A package to locally connect to a Harbor Sleep Camera
5
5
  Author: Andres Garcia, Lash-L
6
6
  License-Expression: Apache-2.0
@@ -1,9 +1,11 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import json
3
5
  import logging
4
6
  import sys
5
7
  from collections.abc import Awaitable, Callable
6
- from typing import Any
8
+ from typing import TYPE_CHECKING, Any
7
9
  from uuid import uuid4
8
10
 
9
11
  from aiomqtt import Client, MqttError
@@ -12,6 +14,9 @@ from .config import HarborCameraConfig
12
14
  from .data.mqtt_models import GetCameraSettingsRequest, SettingsEvent
13
15
  from .utils import get_camera_host, get_ssl_cache_key, get_ssl_context
14
16
 
17
+ if TYPE_CHECKING:
18
+ from .events import HarborEvent
19
+
15
20
  _LOGGER = logging.getLogger(__name__)
16
21
 
17
22
  DEFAULT_CONNECTION_GRACE_PERIOD = 90.0
@@ -26,7 +31,7 @@ class HarborMQTTClient:
26
31
  self,
27
32
  config: HarborCameraConfig,
28
33
  topics: list[str],
29
- message_handler: Callable[[str, Any], Awaitable[None]],
34
+ message_handler: Callable[[str, Any], Awaitable[HarborEvent | None]],
30
35
  client_id: str | None = None,
31
36
  ssl_context_cache: dict | None = None,
32
37
  on_connection_change: Callable[[bool], Awaitable[None]] | None = None,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "harbor-python"
3
- version = "1.2.0"
3
+ version = "1.2.1"
4
4
  description = "A package to locally connect to a Harbor Sleep Camera"
5
5
  authors = [{name="Andres Garcia"},{name = "Lash-L"}]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes