mirror of
https://github.com/google/bumble.git
synced 2026-05-08 03:58:01 +00:00
inclusive language
This commit is contained in:
@@ -604,13 +604,13 @@ class AdvertisingSet(EventEmitter):
|
||||
async def set_advertising_parameters(
|
||||
self, advertising_parameters: AdvertisingParameters
|
||||
) -> None:
|
||||
# Sanity check
|
||||
# Compliance check
|
||||
if (
|
||||
not advertising_parameters.advertising_event_properties.is_legacy
|
||||
and advertising_parameters.advertising_event_properties.is_connectable
|
||||
and advertising_parameters.advertising_event_properties.is_scannable
|
||||
):
|
||||
raise ValueError(
|
||||
logger.warning(
|
||||
"non-legacy extended advertising event properties may not be both "
|
||||
"connectable and scannable"
|
||||
)
|
||||
|
||||
@@ -1068,7 +1068,7 @@ class Client:
|
||||
logger.warning('!!! unexpected response, there is no pending request')
|
||||
return
|
||||
|
||||
# Sanity check: the response should match the pending request unless it is
|
||||
# The response should match the pending request unless it is
|
||||
# an error response
|
||||
if att_pdu.op_code != ATT_ERROR_RESPONSE:
|
||||
expected_response_name = self.pending_request.name.replace(
|
||||
|
||||
@@ -328,7 +328,7 @@ class Server(EventEmitter):
|
||||
f'handle=0x{characteristic.handle:04X}: {value.hex()}'
|
||||
)
|
||||
|
||||
# Sanity check
|
||||
# Check parameters
|
||||
if len(value) != 2:
|
||||
logger.warning('CCCD value not 2 bytes long')
|
||||
return
|
||||
|
||||
@@ -6371,7 +6371,7 @@ class HCI_AclDataPacketAssembler:
|
||||
self.current_data = None
|
||||
self.l2cap_pdu_length = 0
|
||||
else:
|
||||
# Sanity check
|
||||
# Compliance check
|
||||
if len(self.current_data) > self.l2cap_pdu_length + 4:
|
||||
logger.warning('!!! ACL data exceeds L2CAP PDU')
|
||||
self.current_data = None
|
||||
|
||||
@@ -208,7 +208,7 @@ class L2CAP_PDU:
|
||||
|
||||
@staticmethod
|
||||
def from_bytes(data: bytes) -> L2CAP_PDU:
|
||||
# Sanity check
|
||||
# Check parameters
|
||||
if len(data) < 4:
|
||||
raise ValueError('not enough data for L2CAP header')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user