Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix eurobraille mistakes due to coderabbit suggestions
  • Loading branch information
LeonarddeR committed Jan 2, 2025
commit c176ce6b0949a16f2e379fe6a2e2103a754f199b
6 changes: 3 additions & 3 deletions source/brailleDisplayDrivers/eurobraille/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __init__(self, port="Auto"):
port=port,
),
)
if self.deviceType.startswith(("bnote", "bbook")):
if self.deviceType.startswith(("bnote", "bbook")):
# send identifier to bnote / bbook with current COM port
comportNumber = f'{int(re.match(".*?([0-9]+)$", port).group(1)):02d}'
identifier = f"NVDA/{comportNumber}".encode()
Expand All @@ -158,7 +158,7 @@ def __init__(self, port="Auto"):

def terminate(self):
try:
if self.deviceType.startswith(("bnote", "bbook")):
if self.deviceType.startswith(("bnote", "bbook")):
# reset identifier to bnote / bbook with current COM port
self._sendPacket(constants.EB_SYSTEM, constants.EB_CONNECTION_NAME, b"")
super().terminate()
Expand All @@ -173,7 +173,7 @@ def terminate(self):
def _prepFirstByteStreamAndData(
self,
data: bytes,
) -> (bytes, Union[BytesIO, hwIo.IoBase], bytes):
) -> tuple[bytes, Union[BytesIO, hwIo.IoBase], bytes]:
if self.isHid:
# data contains the entire packet.
# HID Packets start with 0x00.
Expand Down