Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bumble/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2644,11 +2644,13 @@ def host(self, host: Host) -> None:
host.link_key_provider = self.get_link_key

@property
def sdp_service_records(self):
def sdp_service_records(self) -> dict[int, sdp.Server.Service]:
return self.sdp_server.service_records

@sdp_service_records.setter
def sdp_service_records(self, service_records):
def sdp_service_records(
self, service_records: dict[int, sdp.Server.Service]
) -> None:
self.sdp_server.service_records = service_records

def lookup_connection(self, connection_handle: int) -> Connection | None:
Expand Down
4 changes: 2 additions & 2 deletions bumble/sdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import struct
from collections.abc import Iterable, Sequence
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, ClassVar, NewType, TypeVar
from typing import TYPE_CHECKING, Any, ClassVar, TypeAlias, TypeVar

from typing_extensions import Self

Expand Down Expand Up @@ -1076,7 +1076,7 @@ async def __aexit__(self, *args) -> None:
class Server:
CONTINUATION_STATE = bytes([0x01, 0x00])
channel: l2cap.ClassicChannel | None
Service = NewType('Service', list[ServiceAttribute])
Service: TypeAlias = list[ServiceAttribute]
service_records: dict[int, Service]
current_response: None | bytes | tuple[int, list[int]]

Expand Down
Loading