Skip to content

Commit 9f2da7c

Browse files
authored
Merge pull request #195 from adafruit/dhalbert-patch-1
Correct type annotations in advertising/standard.py
2 parents 28349ae + 2f9beb7 commit 9f2da7c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

adafruit_ble/advertising/standard.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
try:
2828
from typing import Optional, List, Tuple, Union, Type, Iterator, Iterable, Any
2929
from adafruit_ble.uuid import UUID
30-
from adafruit_ble.characteristics import Characteristic
3130
from adafruit_ble.services import Service
3231
from _bleio import ScanEntry
3332

@@ -71,7 +70,7 @@ def __init__(
7170
uuid = VendorUUID(data[16 * i : 16 * (i + 1)])
7271
self._vendor_services.append(uuid)
7372

74-
def __contains__(self, key: Union[UUID, Characteristic]) -> bool:
73+
def __contains__(self, key: Union[UUID, Service]) -> bool:
7574
uuid = key
7675
if hasattr(key, "uuid"):
7776
uuid = key.uuid
@@ -353,7 +352,7 @@ class ServiceData(AdvertisingDataField):
353352
"""Encapsulates service data. It is read as a memoryview which can be manipulated or set as a
354353
bytearray to change the size."""
355354

356-
def __init__(self, service: Characteristic) -> None:
355+
def __init__(self, service: Service) -> None:
357356
if isinstance(service.uuid, StandardUUID):
358357
self._adt = 0x16
359358
elif isinstance(service.uuid, VendorUUID):

0 commit comments

Comments
 (0)