mirror of
https://github.com/google/bumble.git
synced 2026-05-10 04:18:03 +00:00
fix linter warnings
This commit is contained in:
@@ -3091,7 +3091,7 @@ class Device(CompositeEventEmitter):
|
|||||||
def on_pairing(
|
def on_pairing(
|
||||||
self,
|
self,
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
identity_address: Address,
|
identity_address: Optional[Address],
|
||||||
keys: PairingKeys,
|
keys: PairingKeys,
|
||||||
sc: bool,
|
sc: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
@@ -256,7 +256,8 @@ class JsonKeyStore(KeyStore):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def from_device(device: Device, filename=None) -> Optional[JsonKeyStore]:
|
def from_device(device: Device, filename=None) -> Optional[JsonKeyStore]:
|
||||||
if not filename:
|
if not filename:
|
||||||
# Extract the filename from the config
|
# Extract the filename from the config if there is one
|
||||||
|
if device.config.keystore is not None:
|
||||||
params = device.config.keystore.split(':', 1)[1:]
|
params = device.config.keystore.split(':', 1)[1:]
|
||||||
if params:
|
if params:
|
||||||
filename = params[0]
|
filename = params[0]
|
||||||
|
|||||||
@@ -1805,9 +1805,7 @@ class Manager(EventEmitter):
|
|||||||
self.device.abort_on('flush', store_keys())
|
self.device.abort_on('flush', store_keys())
|
||||||
|
|
||||||
# Notify the device
|
# Notify the device
|
||||||
self.device.on_pairing(
|
self.device.on_pairing(session.connection, identity_address, keys, session.sc)
|
||||||
session.connection, identity_address, keys, session.sc
|
|
||||||
)
|
|
||||||
|
|
||||||
def on_pairing_failure(self, session: Session, reason: int) -> None:
|
def on_pairing_failure(self, session: Session, reason: int) -> None:
|
||||||
self.device.on_pairing_failure(session.connection, reason)
|
self.device.on_pairing_failure(session.connection, reason)
|
||||||
|
|||||||
Reference in New Issue
Block a user