Skip to content

Commit 0fd4509

Browse files
committed
Fix annotations for characteristics/float.py
1 parent d05d2ad commit 0fd4509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ble/characteristics/float.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from . import StructCharacteristic
1717

1818
try:
19-
from typing import Optional, Type, TYPE_CHECKING
19+
from typing import Optional, Type, Union, TYPE_CHECKING
2020

2121
if TYPE_CHECKING:
2222
from circuitpython_typing import ReadableBuffer
@@ -55,7 +55,7 @@ def __init__(
5555

5656
def __get__(
5757
self, obj: Optional[Service], cls: Optional[Type[Service]] = None
58-
) -> float:
58+
) -> Union[float, "FloatCharacteristic"]:
5959
if obj is None:
6060
return self
6161
return super().__get__(obj)[0]

0 commit comments

Comments
 (0)