Adding type hints
This commit is contained in:
parent
52fd95551c
commit
1bf175b09c
2 changed files with 4 additions and 4 deletions
|
@ -66,11 +66,11 @@ class Latex(QObject):
|
||||||
self.tempdir = tempdir
|
self.tempdir = tempdir
|
||||||
|
|
||||||
@Property(bool)
|
@Property(bool)
|
||||||
def latexSupported(self):
|
def latexSupported(self) -> bool:
|
||||||
return LATEX_PATH is not None and DVIPNG_PATH is not None
|
return LATEX_PATH is not None and DVIPNG_PATH is not None
|
||||||
|
|
||||||
@Slot(result=bool)
|
@Slot(result=bool)
|
||||||
def checkLatexInstallation(self):
|
def checkLatexInstallation(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Checks if the current latex installation is valid.
|
Checks if the current latex installation is valid.
|
||||||
"""
|
"""
|
||||||
|
@ -121,7 +121,7 @@ class Latex(QObject):
|
||||||
return f'{export_path}.png,{img.width()},{img.height()}'
|
return f'{export_path}.png,{img.width()},{img.height()}'
|
||||||
|
|
||||||
@Slot(str, float, QColor, result=str)
|
@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.
|
Finds a prerendered image and returns its data if possible, and an empty string if not.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -54,7 +54,7 @@ class UpdateCheckerRunnable(QRunnable):
|
||||||
is_version_newer = version_tuple > current_version_tuple
|
is_version_newer = version_tuple > current_version_tuple
|
||||||
if is_version_newer:
|
if is_version_newer:
|
||||||
msg_text = QCoreApplication.translate("update",
|
msg_text = QCoreApplication.translate("update",
|
||||||
"An update for LogarithPlotter (v{}) is available.").format(
|
"An update for LogarithmPlotter (v{}) is available.").format(
|
||||||
version)
|
version)
|
||||||
update_available = True
|
update_available = True
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue