From 1bf175b09ce6210c2467c6f790c12507fc9750e2 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Tue, 17 Sep 2024 22:26:17 +0200 Subject: [PATCH] Adding type hints --- LogarithmPlotter/util/latex.py | 6 +++--- LogarithmPlotter/util/update.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LogarithmPlotter/util/latex.py b/LogarithmPlotter/util/latex.py index 166e224..bdae13e 100644 --- a/LogarithmPlotter/util/latex.py +++ b/LogarithmPlotter/util/latex.py @@ -66,11 +66,11 @@ class Latex(QObject): self.tempdir = tempdir @Property(bool) - def latexSupported(self): + def latexSupported(self) -> bool: return LATEX_PATH is not None and DVIPNG_PATH is not None @Slot(result=bool) - def checkLatexInstallation(self): + def checkLatexInstallation(self) -> bool: """ Checks if the current latex installation is valid. """ @@ -121,7 +121,7 @@ class Latex(QObject): return f'{export_path}.png,{img.width()},{img.height()}' @Slot(str, float, QColor, result=str) - def findPrerendered(self, latex_markup: str, font_size: float, color: QColor): + def findPrerendered(self, latex_markup: str, font_size: float, color: QColor) -> str: """ Finds a prerendered image and returns its data if possible, and an empty string if not. """ diff --git a/LogarithmPlotter/util/update.py b/LogarithmPlotter/util/update.py index dbacbfe..1fec256 100644 --- a/LogarithmPlotter/util/update.py +++ b/LogarithmPlotter/util/update.py @@ -54,7 +54,7 @@ class UpdateCheckerRunnable(QRunnable): is_version_newer = version_tuple > current_version_tuple if is_version_newer: msg_text = QCoreApplication.translate("update", - "An update for LogarithPlotter (v{}) is available.").format( + "An update for LogarithmPlotter (v{}) is available.").format( version) update_available = True else: