From 666c85ad93a9e75c20027d048304ad7c289a428b Mon Sep 17 00:00:00 2001 From: ase Date: Tue, 19 Dec 2023 00:29:31 +0000 Subject: [PATCH] Update BlueZ documentation links (#1480) BlueZ changed their docs from txt to rst so update the links accordingly. --- bleak/backends/bluezdbus/advertisement_monitor.py | 4 ++-- bleak/backends/bluezdbus/defs.py | 13 ++++++++----- bleak/backends/bluezdbus/scanner.py | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bleak/backends/bluezdbus/advertisement_monitor.py b/bleak/backends/bluezdbus/advertisement_monitor.py index 83de82f1..5d41692b 100644 --- a/bleak/backends/bluezdbus/advertisement_monitor.py +++ b/bleak/backends/bluezdbus/advertisement_monitor.py @@ -3,7 +3,7 @@ --------------------- This module contains types associated with the BlueZ D-Bus `advertisement -monitor api `. +monitor api `. """ import logging @@ -22,7 +22,7 @@ class OrPattern(NamedTuple): """ BlueZ advertisement monitor or-pattern. - https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt + https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst#arrayuint8-uint8-arraybyte-patterns-read-only-optional """ start_position: int diff --git a/bleak/backends/bluezdbus/defs.py b/bleak/backends/bluezdbus/defs.py index 50054540..18ed0c33 100644 --- a/bleak/backends/bluezdbus/defs.py +++ b/bleak/backends/bluezdbus/defs.py @@ -23,7 +23,7 @@ # D-Bus properties for interfaces -# https://github.com/bluez/bluez/blob/master/doc/adapter-api.txt +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst class Adapter1(TypedDict): @@ -43,7 +43,7 @@ class Adapter1(TypedDict): ExperimentalFeatures: List[str] -# https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst class AdvertisementMonitor1(TypedDict): @@ -56,12 +56,15 @@ class AdvertisementMonitor1(TypedDict): Patterns: List[Tuple[int, int, bytes]] +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitorManager.rst + + class AdvertisementMonitorManager1(TypedDict): SupportedMonitorTypes: List[str] SupportedFeatures: List[str] -# https://github.com/bluez/bluez/blob/master/doc/battery-api.txt +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Battery.rst class Battery1(TypedDict): @@ -69,7 +72,7 @@ class Battery1(TypedDict): SupportedFeatures: List[str] -# https://github.com/bluez/bluez/blob/master/doc/device-api.txt +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Device.rst class Device1(TypedDict): @@ -99,7 +102,7 @@ class Device1(TypedDict): AdvertisingData: Dict[int, bytes] -# https://github.com/bluez/bluez/blob/master/doc/gatt-api.txt +# https://github.com/bluez/bluez/blob/master/doc/org.bluez.GattService.rst class GattService1(TypedDict): diff --git a/bleak/backends/bluezdbus/scanner.py b/bleak/backends/bluezdbus/scanner.py index 24591398..d325ce92 100644 --- a/bleak/backends/bluezdbus/scanner.py +++ b/bleak/backends/bluezdbus/scanner.py @@ -19,7 +19,7 @@ class BlueZDiscoveryFilters(TypedDict, total=False): Dictionary of arguments for the ``org.bluez.Adapter1.SetDiscoveryFilter`` D-Bus method. - https://github.com/bluez/bluez/blob/master/doc/adapter-api.txt + https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter """ UUIDs: List[str] @@ -93,7 +93,7 @@ class BleakScannerBlueZDBus(BaseBleakScanner): For possible values for `filters`, see the parameters to the ``SetDiscoveryFilter`` method in the `BlueZ docs - `_ + `_ Args: detection_callback: @@ -201,7 +201,7 @@ def set_scanning_filter(self, **kwargs) -> None: For possible values for `filters`, see the parameters to the ``SetDiscoveryFilter`` method in the `BlueZ docs - `_ + `_ See variant types here: