diff --git a/source/braille.py b/source/braille.py index 5a5a9657160..c0f4c556529 100644 --- a/source/braille.py +++ b/source/braille.py @@ -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 @@ -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 @@ -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, @@ -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: