Skip to content

Commit

Permalink
Update BlueZ documentation links (#1480)
Browse files Browse the repository at this point in the history
BlueZ changed their docs from txt to rst so update the links accordingly.
  • Loading branch information
adamse authored Dec 19, 2023
1 parent a2d677e commit 666c85a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bleak/backends/bluezdbus/advertisement_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---------------------
This module contains types associated with the BlueZ D-Bus `advertisement
monitor api <https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt>`.
monitor api <https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst>`.
"""

import logging
Expand All @@ -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
Expand Down
13 changes: 8 additions & 5 deletions bleak/backends/bluezdbus/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -56,20 +56,23 @@ 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):
SupportedMonitorTypes: List[str]
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):
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions bleak/backends/bluezdbus/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -93,7 +93,7 @@ class BleakScannerBlueZDBus(BaseBleakScanner):
For possible values for `filters`, see the parameters to the
``SetDiscoveryFilter`` method in the `BlueZ docs
<https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt?h=5.48&id=0d1e3b9c5754022c779da129025d493a198d49cf>`_
<https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter>`_
Args:
detection_callback:
Expand Down Expand Up @@ -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
<https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt?h=5.48&id=0d1e3b9c5754022c779da129025d493a198d49cf>`_
<https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter>`_
See variant types here: <https://python-dbus-next.readthedocs.io/en/latest/type-system/>
Expand Down

0 comments on commit 666c85a

Please sign in to comment.