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( async def set_advertising_parameters(
self, advertising_parameters: AdvertisingParameters self, advertising_parameters: AdvertisingParameters
) -> None: ) -> None:
# Sanity check # Compliance check
if ( if (
not advertising_parameters.advertising_event_properties.is_legacy not advertising_parameters.advertising_event_properties.is_legacy
and advertising_parameters.advertising_event_properties.is_connectable and advertising_parameters.advertising_event_properties.is_connectable
and advertising_parameters.advertising_event_properties.is_scannable and advertising_parameters.advertising_event_properties.is_scannable
): ):
raise ValueError( logger.warning(
"non-legacy extended advertising event properties may not be both " "non-legacy extended advertising event properties may not be both "
"connectable and scannable" "connectable and scannable"
) )

View File

@@ -1068,7 +1068,7 @@ class Client:
logger.warning('!!! unexpected response, there is no pending request') logger.warning('!!! unexpected response, there is no pending request')
return 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 # an error response
if att_pdu.op_code != ATT_ERROR_RESPONSE: if att_pdu.op_code != ATT_ERROR_RESPONSE:
expected_response_name = self.pending_request.name.replace( 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()}' f'handle=0x{characteristic.handle:04X}: {value.hex()}'
) )
# Sanity check # Check parameters
if len(value) != 2: if len(value) != 2:
logger.warning('CCCD value not 2 bytes long') logger.warning('CCCD value not 2 bytes long')
return return

View File

@@ -6371,7 +6371,7 @@ class HCI_AclDataPacketAssembler:
self.current_data = None self.current_data = None
self.l2cap_pdu_length = 0 self.l2cap_pdu_length = 0
else: else:
# Sanity check # Compliance check
if len(self.current_data) > self.l2cap_pdu_length + 4: if len(self.current_data) > self.l2cap_pdu_length + 4:
logger.warning('!!! ACL data exceeds L2CAP PDU') logger.warning('!!! ACL data exceeds L2CAP PDU')
self.current_data = None self.current_data = None

View File

@@ -208,7 +208,7 @@ class L2CAP_PDU:
@staticmethod @staticmethod
def from_bytes(data: bytes) -> L2CAP_PDU: def from_bytes(data: bytes) -> L2CAP_PDU:
# Sanity check # Check parameters
if len(data) < 4: if len(data) < 4:
raise ValueError('not enough data for L2CAP header') raise ValueError('not enough data for L2CAP header')