mirror of
https://github.com/google/bumble.git
synced 2026-06-01 07:37:02 +00:00
Merge pull request #151 from AlanRosenthal/alan/add-types-via-pytypes
Used pytype to find some missing types / fix small issue
This commit is contained in:
+5
-2
@@ -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