Просмотр исходного кода

- remove some method declaration with type hints that work only in Python > 3.8

Marius Stanciu 5 лет назад
Родитель
Сommit
495650fc73
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      FlatCAMObj.py
  2. 2 2
      flatcamGUI/GUIElements.py

+ 1 - 1
FlatCAMObj.py

@@ -384,7 +384,7 @@ class FlatCAMObj(QtCore.QObject):
             pass
             pass
             # self.app.log.warning("Failed to read option from field: %s" % option)
             # 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).
         Plot this object (Extend this method to implement the actual plotting).
         Call this in descendants before doing the plotting.
         Call this in descendants before doing the plotting.

+ 2 - 2
flatcamGUI/GUIElements.py

@@ -726,7 +726,7 @@ class FCSpinner(QtWidgets.QSpinBox):
             self.readyToEdit = True
             self.readyToEdit = True
             self.prev_readyToEdit = True
             self.prev_readyToEdit = True
 
 
-    def valueFromText(self, text: str) -> int:
+    def valueFromText(self, text):
         txt = text.strip('%%')
         txt = text.strip('%%')
         try:
         try:
             ret_val = int(txt)
             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
         # for the usage of this label as a clickable label, to know that current state
         self.clicked_state = False
         self.clicked_state = False
 
 
-    def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None:
+    def mousePressEvent(self, event):
         self.clicked_state = not self.clicked_state
         self.clicked_state = not self.clicked_state
         self.clicked.emit(self.clicked_state)
         self.clicked.emit(self.clicked_state)