@@ -48,7 +48,7 @@ def getManualPorts(cls):
4848 return braille .getSerialPorts ()
4949
5050 def __init__ (self , port = "Auto" ):
51- super (BrailleDisplayDriver , self ).__init__ ()
51+ super ().__init__ ()
5252 self .numCells = 0
5353 self .deviceType = None
5454 self ._deviceData = {}
@@ -101,7 +101,7 @@ def __init__(self, port="Auto"):
101101 # A display responded.
102102 log .info ("Found {device} connected via {type} ({port})" .format (
103103 device = self .deviceType , type = portType , port = port ))
104- if self .deviceType .startswith (("b.note " , "b.book " )):
104+ if self .deviceType .startswith (("bnote " , "bbook " )):
105105 # send identifier to bnote / bbook with current COM port
106106 comportNumber = f'{ int (re .match (".*?([0-9]+)$" , port ).group (1 )):02d} '
107107 identifier = f"NVDA/{ comportNumber } " .encode ()
@@ -118,10 +118,10 @@ def __init__(self, port="Auto"):
118118
119119 def terminate (self ):
120120 try :
121- if self .deviceType .startswith (("b.note " , "b.book " )):
121+ if self .deviceType .startswith (("bnote " , "bbook " )):
122122 # reset identifier to bnote / bbook with current COM port
123123 self ._sendPacket (constants .EB_SYSTEM , constants .EB_CONNECTION_NAME , b'' )
124- super (BrailleDisplayDriver , self ).terminate ()
124+ super ().terminate ()
125125 finally :
126126 # We must sleep before closing the port as not doing this can leave
127127 # the display in a bad state where it can not be re-initialized.
@@ -190,7 +190,7 @@ def _onReceive(self, data: bytes):
190190
191191 def _handleAck (self , frame : int ):
192192 try :
193- super (BrailleDisplayDriver , self )._handleAck ()
193+ super ()._handleAck ()
194194 except NotImplementedError :
195195 log .debugWarning (f"Received ACK for frame { frame } while ACK handling is disabled" )
196196 else :
@@ -325,7 +325,7 @@ def _set_hidKeyboardInput(self, state: bool):
325325
326326 scriptCategory = SCRCAT_BRAILLE
327327
328- def script_toggleHidKeyboardInput (self , gesture ):
328+ def script_toggleHidKeyboardInput (self , gesture : inputCore . InputGesture ):
329329 def announceUnavailableMessage ():
330330 # Translators: Message when HID keyboard simulation is unavailable.
331331 ui .message (_ ("HID keyboard input simulation is unavailable." ))
0 commit comments