From 9d2f3e932aa56db72af318d0fa7be87902c06407 Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Sun, 29 Oct 2023 11:32:00 -0700 Subject: [PATCH] format --- examples/heart_rate_server.py | 2 +- tasks.py | 2 +- web/scanner/scanner.py | 1 + web/speaker/speaker.py | 4 +--- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/heart_rate_server.py b/examples/heart_rate_server.py index c4f3dfef..fad809f0 100644 --- a/examples/heart_rate_server.py +++ b/examples/heart_rate_server.py @@ -106,7 +106,7 @@ def on_subscription(connection, notify_enabled, indicate_enabled): AsyncRunner.spawn( device.notify_subscriber( connection, - heart_rate_service.heart_rate_measurement_characteristic + heart_rate_service.heart_rate_measurement_characteristic, ) ) diff --git a/tasks.py b/tasks.py index 6df5a8b7..fab7cf1a 100644 --- a/tasks.py +++ b/tasks.py @@ -125,7 +125,7 @@ def lint(ctx, disable='C,R', errors_only=False): print(f">>> Running the linter{qualifier}...") try: ctx.run(f"pylint {' '.join(options)} bumble apps examples tasks.py") - print("The linter is happy. ✅ 😊 🐝'") + print("The linter is happy. ✅ 😊 🐝") except UnexpectedExit as exc: print("Please check your code against the linter messages. ❌") raise Exit(code=1) from exc diff --git a/web/scanner/scanner.py b/web/scanner/scanner.py index e498f7a1..9ff6aba9 100644 --- a/web/scanner/scanner.py +++ b/web/scanner/scanner.py @@ -67,6 +67,7 @@ def on_advertisement(self, advertisement): self.scan_entries[advertisement.address] = self.ScanEntry(advertisement) self.emit_update() + # ----------------------------------------------------------------------------- def main(hci_source, hci_sink): return Scanner(hci_source, hci_sink) diff --git a/web/speaker/speaker.py b/web/speaker/speaker.py index 4157981f..2b8ce006 100644 --- a/web/speaker/speaker.py +++ b/web/speaker/speaker.py @@ -172,9 +172,7 @@ def on_bluetooth_connection(self, connection): connection.on('disconnection', self.on_bluetooth_disconnection) peer_name = '' if connection.peer_name is None else connection.peer_name peer_address = connection.peer_address.to_string(False) - self.emit( - 'connection', {'peer_name': peer_name, 'peer_address': peer_address} - ) + self.emit('connection', {'peer_name': peer_name, 'peer_address': peer_address}) def on_bluetooth_disconnection(self, reason): print(f'Disconnection ({reason})')