src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
eric7
changeset 10043
f1427d95cfde
parent 9653
e67609152c5e
child 10046
35b27af462ef
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri May 19 16:01:53 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri May 19 18:08:45 2023 +0200
@@ -577,6 +577,11 @@
                         ]["ForceFutureAnnotations"],
                     }
                 )
+            if "CheckFutureAnnotations" not in self.__data["AnnotationsChecker"]:
+                # third extension
+                self.__data["AnnotationsChecker"]["CheckFutureAnnotations"] = (
+                    defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"]
+                )
 
             # Upgrading ImportsChecker from older data structures
             if "CombinedAsImports" not in self.__data["ImportsChecker"]:
@@ -661,6 +666,9 @@
         self.forceFutureAnnotationsCheckBox.setChecked(
             self.__data["AnnotationsChecker"]["ForceFutureAnnotations"]
         )
+        self.simplifiedTypesCheckBox.setChecked(
+            self.__data["AnnotationsChecker"]["CheckFutureAnnotations"]
+        )
         self.dispatchDecoratorEdit.setText(
             ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"])
         )
@@ -869,6 +877,7 @@
                 "ForceFutureAnnotations": (
                     self.forceFutureAnnotationsCheckBox.isChecked()
                 ),
+                "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
                 "DispatchDecorators": [
                     d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
                 ],
@@ -1311,6 +1320,7 @@
                     "ForceFutureAnnotations": (
                         self.forceFutureAnnotationsCheckBox.isChecked()
                     ),
+                    "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
                     "DispatchDecorators": [
                         d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
                     ],
@@ -1751,6 +1761,14 @@
                 )
             )
         )
+        self.simplifiedTypesCheckBox.setChecked(
+            Preferences.toBool(
+                settings.value(
+                    "PEP8/CheckFutureAnnotations",
+                    defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
+                )
+            )
+        )
         self.dispatchDecoratorEdit.setText(
             ", ".join(
                 Preferences.toList(
@@ -2007,6 +2025,9 @@
             self.forceFutureAnnotationsCheckBox.isChecked(),
         )
         settings.setValue(
+            "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked()
+        )
+        settings.setValue(
             "PEP8/DispatchDecorators",
             [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")],
         )
@@ -2171,6 +2192,10 @@
             defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"],
         )
         settings.setValue(
+            "PEP8/CheckFutureAnnotations",
+            defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
+        )
+        settings.setValue(
             "PEP8/DispatchDecorators",
             defaultParameters["AnnotationsChecker"]["DispatchDecorators"],
         )

eric ide

mercurial