From 495650fc7318944ac4d53356ef30615f68717f80 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 23 Apr 2020 03:41:58 +0300 Subject: [PATCH] - remove some method declaration with type hints that work only in Python > 3.8 --- FlatCAMObj.py | 2 +- flatcamGUI/GUIElements.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index bf4d5aa8..d23ea62b 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -384,7 +384,7 @@ class FlatCAMObj(QtCore.QObject): pass # self.app.log.warning("Failed to read option from field: %s" % option) - def plot(self, kind=None) -> bool: + def plot(self, kind=None): """ Plot this object (Extend this method to implement the actual plotting). Call this in descendants before doing the plotting. diff --git a/flatcamGUI/GUIElements.py b/flatcamGUI/GUIElements.py index 0b243456..7d5b4e49 100644 --- a/flatcamGUI/GUIElements.py +++ b/flatcamGUI/GUIElements.py @@ -726,7 +726,7 @@ class FCSpinner(QtWidgets.QSpinBox): self.readyToEdit = True self.prev_readyToEdit = True - def valueFromText(self, text: str) -> int: + def valueFromText(self, text): txt = text.strip('%%') try: ret_val = int(txt) @@ -1426,7 +1426,7 @@ class FCLabel(QtWidgets.QLabel): # for the usage of this label as a clickable label, to know that current state self.clicked_state = False - def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None: + def mousePressEvent(self, event): self.clicked_state = not self.clicked_state self.clicked.emit(self.clicked_state)