Skip to content

Commit

Permalink
Pre-commit auto-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 19, 2024
1 parent 9b6e186 commit 170b2ff
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions source/braille.py
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,7 @@ def _get_displayNumRows(self) -> int:

def _set_displayNumRows(self, value: int):
raise AttributeError(
f"Can't set displayNumRows to {value}, consider registering a handler to filter displayNumRows"
f"Can't set displayNumRows to {value}, consider registering a handler to filter displayNumRows",
)

displayNumCols: int
Expand All @@ -2534,7 +2534,7 @@ def _get_displayNumCols(self) -> int:

def _set_displayNumCols(self, value: int):
raise AttributeError(
f"Can't set displayNumCols to {value}, consider registering a handler to filter displayNumCols"
f"Can't set displayNumCols to {value}, consider registering a handler to filter displayNumCols",
)

enabled: bool
Expand Down Expand Up @@ -2697,7 +2697,12 @@ def _updateDisplay(self):
wx.CallAfter(self._cursorBlinkTimer.Start, blinkRate)

def _normalizeCellArraySize(
self, oldCells: list[int], oldCellCount: int, oldNumRows: int, newCellCount: int, newNumRows: int
self,
oldCells: list[int],
oldCellCount: int,
oldNumRows: int,
newCellCount: int,
newNumRows: int,
) -> list[int]:
"""
Given a list of braille cells of length oldCell Count layed out in sequencial rows of oldNumRows,
Expand Down Expand Up @@ -2737,7 +2742,11 @@ def _writeCells(self, cells: List[int]):
# However, the braille handler uses handlerCellCount to calculate the number of cells.
# number of rows / columns may also differ.
cells = self._normalizeCellArraySize(
cells, handlerCellCount, self.displayNumRows, displayCellCount, self.display.numRows
cells,
handlerCellCount,
self.displayNumRows,
displayCellCount,
self.display.numRows,
)
if not self.display.isThreadSafe:
try:
Expand Down

0 comments on commit 170b2ff

Please sign in to comment.