summaryrefslogtreecommitdiffstatshomepage
path: root/examples/bluetooth/ble_temperature_central.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-08-29 15:14:29 +1000
committerDamien George <damien@micropython.org>2020-08-29 15:18:01 +1000
commit06659077a81b85882254cf0953c33b27614e018e (patch)
treef0463060ca6144a82b0e54ffc4f394c208d4d92c /examples/bluetooth/ble_temperature_central.py
parent0c7354afaf91da3dac2c5ec471603c9e7acc8eac (diff)
downloadmicropython-06659077a81b85882254cf0953c33b27614e018e.tar.gz
micropython-06659077a81b85882254cf0953c33b27614e018e.zip
all: Update Python code to conform to latest black formatting.
Updating to Black v20.8b1 there are two changes that affect the code in this repository: - If there is a trailing comma in a list (eg [], () or function call) then that list is now written out with one line per element. So remove such trailing commas where the list should stay on one line. - Spaces at the start of """ doc strings are removed. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'examples/bluetooth/ble_temperature_central.py')
-rw-r--r--examples/bluetooth/ble_temperature_central.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bluetooth/ble_temperature_central.py b/examples/bluetooth/ble_temperature_central.py
index f9db225c16..7983034178 100644
--- a/examples/bluetooth/ble_temperature_central.py
+++ b/examples/bluetooth/ble_temperature_central.py
@@ -87,7 +87,7 @@ class BLETemperatureCentral:
def _irq(self, event, data):
if event == _IRQ_SCAN_RESULT:
addr_type, addr, adv_type, rssi, adv_data = data
- if adv_type in (_ADV_IND, _ADV_DIRECT_IND,) and _ENV_SENSE_UUID in decode_services(
+ if adv_type in (_ADV_IND, _ADV_DIRECT_IND) and _ENV_SENSE_UUID in decode_services(
adv_data
):
# Found a potential device, remember it and stop scanning.
@@ -110,14 +110,14 @@ class BLETemperatureCentral:
elif event == _IRQ_PERIPHERAL_CONNECT:
# Connect successful.
- conn_handle, addr_type, addr, = data
+ conn_handle, addr_type, addr = data
if addr_type == self._addr_type and addr == self._addr:
self._conn_handle = conn_handle
self._ble.gattc_discover_services(self._conn_handle)
elif event == _IRQ_PERIPHERAL_DISCONNECT:
# Disconnect (either initiated by us or the remote end).
- conn_handle, _, _, = data
+ conn_handle, _, _ = data
if conn_handle == self._conn_handle:
# If it was initiated by us, it'll already be reset.
self._reset()