Skip to content

Commit 49f8786

Browse files
authored
Apply suggestions from code review
1 parent c7ded6e commit 49f8786

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ def _copyToClipAsMathML(
497497
def _setClipboardData(self, format: int, data: str) -> None:
498498
"""Sets the clipboard data to the given data with the specified format.
499499
500-
:param format: The format for the clipboard data. This is an integer format code returned by windll.user32.RegisterClipboardFormatW.
500+
:param format: The format for the clipboard data.
501+
This is an integer format code returned by windll.user32.RegisterClipboardFormatW.
501502
:param data: The data to set on the clipboard.
502503
"""
503504
# Need to support MathML Presentation, so this copied from winUser.py and the first two lines are commented out

addon/globalPlugins/MathCAT/MathCATPreferences.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class UserInterface(MathCATgui.MathCATPreferencesDialog):
4848
and navigation settings. Extends MathCATgui.MathCATPreferencesDialog.
4949
"""
5050

51-
def __init__(self, parent):
51+
def __init__(self, parent: wx.Window | None):
5252
"""Initialize the preferences dialog.
5353
5454
Sets up the UI, loads preferences, applies defaults and saved settings,
@@ -120,7 +120,7 @@ def languagesDict() -> dict[str, str]:
120120
'en-GB', 'zh-HANT', and others.
121121
122122
:return: A dictionary where the key is the language code (e.g., 'en', 'fr', 'zh-HANS')
123-
and the value is the language name (e.g., 'English', 'Français', 'Chinese, Simplified').
123+
and the value is the language name (e.g. 'English', 'Français', 'Chinese, Simplified').
124124
"""
125125
languages = {
126126
"aa": "Afar",
@@ -393,18 +393,16 @@ def getLanguageCode(self) -> str:
393393
for example: "English (en)".
394394
395395
:return: The language code extracted from the selection.
396-
:rtype: str
397396
"""
398397
langSelection: str = self._choiceLanguage.GetStringSelection()
399398
langCode: str = langSelection[langSelection.find("(") + 1 : langSelection.find(")")]
400399
return langCode
401400

402-
def getSpeechStyles(self, thisSpeechStyle: str):
401+
def getSpeechStyles(self, thisSpeechStyle: str) -> None:
403402
"""Get all the speech styles for the current language.
404403
This sets the SpeechStyles dialog entry.
405404
406405
:param thisSpeechStyle: The speech style to set or highlight in the dialog.
407-
:return: None
408406
"""
409407
from speech import getCurrentLanguage
410408

0 commit comments

Comments
 (0)