Skip to content

Commit a8ff8ba

Browse files
committed
Fix annotations
1 parent cf5b8fc commit a8ff8ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

adafruit_ble/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, bleio_connection: _bleio.Connection) -> None:
5959
# Service objects that wrap remote services.
6060
self._constructed_services = {}
6161

62-
def _discover_remote(self, uuid: UUID) -> Optional[Service]:
62+
def _discover_remote(self, uuid: UUID) -> Optional[_bleio.Service]:
6363
remote_service = None
6464
if uuid in self._discovered_bleio_services:
6565
remote_service = self._discovered_bleio_services[uuid]
@@ -72,7 +72,7 @@ def _discover_remote(self, uuid: UUID) -> Optional[Service]:
7272
self._discovered_bleio_services[uuid] = remote_service
7373
return remote_service
7474

75-
def __contains__(self, key: Union[UUID, Characteristic]) -> bool:
75+
def __contains__(self, key: Union[UUID, Service]) -> bool:
7676
"""
7777
Allows easy testing for a particular Service class or a particular UUID
7878
associated with this connection.
@@ -90,7 +90,7 @@ def __contains__(self, key: Union[UUID, Characteristic]) -> bool:
9090
uuid = key.uuid
9191
return self._discover_remote(uuid) is not None
9292

93-
def __getitem__(self, key: Union[UUID, Characteristic]) -> Optional[Service]:
93+
def __getitem__(self, key: Union[UUID, Service]) -> Optional[Service]:
9494
"""Return the Service for the given Service class or uuid, if any."""
9595
uuid = key
9696
maybe_service = False

adafruit_ble/characteristics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def bind(self, service: Service) -> _bleio.Characteristic:
216216

217217
def __get__(
218218
self, service: Optional[Service], cls: Optional[Type[Service]] = None
219-
) -> Characteristic:
219+
) -> _bleio.Characteristic:
220220
if service is None:
221221
return self
222222
bound_object = self.bind(service)

0 commit comments

Comments
 (0)