Skip to content

Commit

Permalink
Merge pull request #12 from adafruit/discord-fix
Browse files Browse the repository at this point in the history
Using python 3.7 so sphinx is ok with __future__
  • Loading branch information
dhalbert authored Jul 10, 2020
2 parents 4b5462c + 6707af2 commit 82899ad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 12 additions & 5 deletions adafruit_ble_broadcastnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"""

import struct
import os
import time
from micropython import const
import adafruit_ble
Expand All @@ -56,12 +57,18 @@ def broadcast(measurement, *, broadcast_time=0.1, extended=False):
_sequence_number = (_sequence_number + 1) % 256


device_address = "{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}".format( # pylint: disable=invalid-name
*reversed(
list(_ble._adapter.address.address_bytes) # pylint: disable=protected-access
# This line causes issues with Sphinx, so we won't run it in the CI
if not hasattr(os, "environ") or (
"GITHUB_ACTION" not in os.environ and "READTHEDOCS" not in os.environ
):
device_address = "{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}".format( # pylint: disable=invalid-name
*reversed(
list(
_ble._adapter.address.address_bytes # pylint: disable=protected-access
)
)
)
)
"""Device address as a string."""
"""Device address as a string."""

_MANUFACTURING_DATA_ADT = const(0xFF)
_ADAFRUIT_COMPANY_ID = const(0x0822)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["digitalio", "busio"]
autodoc_mock_imports = ["bleak", "digitalio", "busio"]


intersphinx_mapping = {
Expand Down

0 comments on commit 82899ad

Please sign in to comment.