Skip to content

Commit 4e08e2b

Browse files
committed
fix linter warnings
1 parent 4b77e3c commit 4e08e2b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def ConvertSSMLTextForNVDA(text: str) -> list:
128128
# log.info(f"mathCATLanguageSetting={mathCATLanguageSetting}, lang={language}, NVDA={nvdaLanguage}")
129129

130130
_monkeyPatchESpeak()
131-
131+
132132
synth = getSynth()
133133
# I tried the engines on a 180 word excerpt. The speeds do not change linearly and differ a it between engines
134134
# At "50" espeak finished in 46 sec, sapi in 75 sec, and one core in 70; at '100' one core was much slower than the others
@@ -226,7 +226,7 @@ def __init__(self, provider=None, mathMl: Optional[str] = None):
226226
def reportFocus(self):
227227
super(MathCATInteraction, self).reportFocus()
228228
# try to get around espeak bug where voice slows down
229-
if _synthesizer_rate and getSynth().name == 'espeak' :
229+
if _synthesizer_rate and getSynth().name == 'espeak':
230230
getSynth()._set_rate(_synthesizer_rate)
231231
try:
232232
text = libmathcat.DoNavigateCommand("ZoomIn")
@@ -293,7 +293,7 @@ def getScript(self, gesture: KeyboardInputGesture):
293293
def script_navigate(self, gesture: KeyboardInputGesture):
294294
try:
295295
# try to get around espeak bug where voice slows down
296-
if _synthesizer_rate and getSynth().name == 'espeak' :
296+
if _synthesizer_rate and getSynth().name == 'espeak':
297297
getSynth()._set_rate(_synthesizer_rate)
298298
if (gesture is not None): # == None when initial focus -- handled in reportFocus()
299299
modNames = gesture.modifierNames
@@ -526,11 +526,10 @@ def getSpeechForMathMl(self, mathml: str):
526526
return [""]
527527
finally:
528528
# try to get around espeak bug where voice slows down
529-
if _synthesizer_rate and getSynth().name == 'espeak' :
529+
if _synthesizer_rate and getSynth().name == 'espeak':
530530
# log.info(f'getSpeechForMathMl: reset to {_synthesizer_rate}')
531531
getSynth()._set_rate(_synthesizer_rate)
532532

533-
534533
def _add_sounds(self):
535534
try:
536535
return libmathcat.GetPreference("SpeechSound") != "None"

0 commit comments

Comments
 (0)