inclusive language

This commit is contained in:
Gilles Boccon-Gibod
2024-01-17 21:17:13 -08:00
parent b7b70ebcbb
commit 8d2f37aa7a
5 changed files with 6 additions and 6 deletions

View File

@@ -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"
)

View File

@@ -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(

View File

@@ -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

View File

@@ -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

View File

@@ -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')