diff --git a/addon/globalPlugins/MathCAT/MathCAT.py b/addon/globalPlugins/MathCAT/MathCAT.py
index fa7daaa..93983bb 100644
--- a/addon/globalPlugins/MathCAT/MathCAT.py
+++ b/addon/globalPlugins/MathCAT/MathCAT.py
@@ -23,14 +23,17 @@
import gui
from . import libmathcat_py as libmathcat
-from typing import List, Dict
+from typing import Type
+from collections.abc import Generator, Callable
from keyboardHandler import KeyboardInputGesture # navigation key strokes
from logHandler import log # logging
from os import path # set rule dir path
from scriptHandler import script # copy MathML via ctrl-c
-from synthDriverHandler import getSynth # speech engine param setting
+from synthDriverHandler import (
+ getSynth,
+ SynthDriver,
+)
from ctypes import windll # register clipboard formats
-from typing import Optional
from speech import getCurrentLanguage
from speech.types import SpeechSequence
@@ -45,10 +48,13 @@
CharacterModeCommand,
PhonemeCommand,
IndexCommand,
+ ProsodyCommand,
+ SpeechCommand,
+ SynthCommand,
)
from textUtils import WCHAR_ENCODING
-from ctypes import c_wchar, WinError
+from ctypes import c_wchar, WinError, Array
from api import getClipData
from synthDrivers import _espeak
@@ -56,7 +62,7 @@
addonHandler.initTranslation()
-RE_MATHML_SPEECH = re.compile(
+RE_MATHML_SPEECH: re.Pattern = re.compile(
# Break.
r" ?"
# Pronunciation of characters.
@@ -73,12 +79,12 @@
r"|(?P[^<]+)",
)
-PROSODY_COMMANDS = {
+PROSODY_COMMANDS: dict[str, ProsodyCommand] = {
"pitch": PitchCommand,
"volume": VolumeCommand,
"rate": RateCommand,
}
-RE_MATH_LANG = re.compile(r"""