mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
format
This commit is contained in:
@@ -106,7 +106,7 @@ async def main():
|
||||
AsyncRunner.spawn(
|
||||
device.notify_subscriber(
|
||||
connection,
|
||||
heart_rate_service.heart_rate_measurement_characteristic
|
||||
heart_rate_service.heart_rate_measurement_characteristic,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
2
tasks.py
2
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
|
||||
|
||||
@@ -67,6 +67,7 @@ class Scanner:
|
||||
self.scan_entries[advertisement.address] = self.ScanEntry(advertisement)
|
||||
self.emit_update()
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
def main(hci_source, hci_sink):
|
||||
return Scanner(hci_source, hci_sink)
|
||||
|
||||
@@ -172,9 +172,7 @@ class Speaker:
|
||||
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})')
|
||||
|
||||
Reference in New Issue
Block a user