diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6977a9..fdde2ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,10 @@ jobs: awk -F '\/' '{ print tolower($2) }' | tr '_' '-' ) - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: 3.7 - name: Versions run: | python3 --version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18efb9c..0950dc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,10 +20,10 @@ jobs: awk -F '\/' '{ print tolower($2) }' | tr '_' '-' ) - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: 3.7 - name: Versions run: | python3 --version diff --git a/adafruit_ble/__init__.py b/adafruit_ble/__init__.py index 75e6e81..6250f9c 100755 --- a/adafruit_ble/__init__.py +++ b/adafruit_ble/__init__.py @@ -231,7 +231,13 @@ def start_scan( """ if not advertisement_types: advertisement_types = (Advertisement,) - prefixes = b"".join(adv.get_prefix_bytes() for adv in advertisement_types) + + all_prefix_bytes = tuple(adv.get_prefix_bytes() for adv in advertisement_types) + + # If one of the advertisement_types has no prefix restrictions, then + # no prefixes should be specified at all, so we match everything. + prefixes = b"" if b"" in all_prefix_bytes else b"".join(all_prefix_bytes) + for entry in self._adapter.start_scan( prefixes=prefixes, buffer_size=buffer_size, diff --git a/docs/conf.py b/docs/conf.py index e5db6f7..6cc895c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,7 @@ # Uncomment the below if you use native CircuitPython modules such as # digitalio, micropython and busio. List the modules you use. Without it, the # autodoc module docs will fail to generate with a warning. -autodoc_mock_imports = ["board", "microcontroller"] +autodoc_mock_imports = ["bleak", "board", "microcontroller"] autodoc_member_order = "bysource" add_module_names = False