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