We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 170c6c9 commit 22a87e0Copy full SHA for 22a87e0
1 file changed
growattServer/open_api_v1/devices/abstract_device.py
@@ -1,8 +1,10 @@
1
"""Abstract device file for centralising shared device logic."""
2
-from typing import TypedDict
+from typing import TYPE_CHECKING, TypedDict
3
4
from growattServer.exceptions import GrowattParameterError
5
-from growattServer.open_api_v1 import OpenApiV1
+
6
+if TYPE_CHECKING:
7
+ from growattServer.open_api_v1 import OpenApiV1
8
9
10
class ReadParamResponse(TypedDict):
@@ -15,7 +17,7 @@ class ReadParamResponse(TypedDict):
15
17
class AbstractDevice:
16
18
"""Abstract device type. Must not be used directly."""
19
- def __init__(self, api: OpenApiV1, device_sn: str) -> None:
20
+ def __init__(self, api: "OpenApiV1", device_sn: str) -> None:
21
"""
22
Initialize the device with the bare minimum being the device_sn.
23
0 commit comments