Skip to content

Commit

Permalink
inclusive language
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Jan 29, 2024
1 parent b7b70eb commit 8d2f37a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bumble/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,13 @@ def __post_init__(self) -> None:
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"
)
Expand Down
2 changes: 1 addition & 1 deletion bumble/gatt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def on_gatt_pdu(self, att_pdu: ATT_PDU) -> None:
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(
Expand Down
2 changes: 1 addition & 1 deletion bumble/gatt_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def write_cccd(
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
Expand Down
2 changes: 1 addition & 1 deletion bumble/hci.py
Original file line number Diff line number Diff line change
Expand Up @@ -6371,7 +6371,7 @@ def feed_packet(self, packet: HCI_AclDataPacket) -> None:
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
Expand Down
2 changes: 1 addition & 1 deletion bumble/l2cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 8d2f37a

Please sign in to comment.