mirror of
https://github.com/google/bumble.git
synced 2026-05-09 04:08:02 +00:00
Used pytype to find some missing types
``` pytype --pythonpath . ./bumble/device.py ```
This commit is contained in:
committed by
Alan Rosenthal
parent
c4fb63d35c
commit
fda00dcb28
@@ -310,6 +310,9 @@ class AdvertisementDataAccumulator:
|
|||||||
|
|
||||||
def update(self, report):
|
def update(self, report):
|
||||||
advertisement = Advertisement.from_advertising_report(report)
|
advertisement = Advertisement.from_advertising_report(report)
|
||||||
|
if advertisement is None:
|
||||||
|
return None
|
||||||
|
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
if advertisement.is_scan_response:
|
if advertisement.is_scan_response:
|
||||||
@@ -2776,7 +2779,7 @@ class Device(CompositeEventEmitter):
|
|||||||
# [Classic only]
|
# [Classic only]
|
||||||
@host_event_handler
|
@host_event_handler
|
||||||
@try_with_connection_from_address
|
@try_with_connection_from_address
|
||||||
def on_remote_name(self, connection, address, remote_name):
|
def on_remote_name(self, connection: Connection, address, remote_name):
|
||||||
# Try to decode the name
|
# Try to decode the name
|
||||||
try:
|
try:
|
||||||
remote_name = remote_name.decode('utf-8')
|
remote_name = remote_name.decode('utf-8')
|
||||||
@@ -2794,7 +2797,7 @@ class Device(CompositeEventEmitter):
|
|||||||
# [Classic only]
|
# [Classic only]
|
||||||
@host_event_handler
|
@host_event_handler
|
||||||
@try_with_connection_from_address
|
@try_with_connection_from_address
|
||||||
def on_remote_name_failure(self, connection, address, error):
|
def on_remote_name_failure(self, connection: Connection, address, error):
|
||||||
if connection:
|
if connection:
|
||||||
connection.emit('remote_name_failure', error)
|
connection.emit('remote_name_failure', error)
|
||||||
self.emit('remote_name_failure', address, error)
|
self.emit('remote_name_failure', address, error)
|
||||||
|
|||||||
Reference in New Issue
Block a user