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

branch
server
changeset 10759
aeb98b3fa008
parent 10704
27d21e5163b8
parent 10753
031cfa81992a
child 10761
63618ecdbe57
diff -r 3cf5ee0c3e9f -r aeb98b3fa008 src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Fri Jun 07 13:58:16 2024 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sun Jun 09 12:59:51 2024 +0200
@@ -614,6 +614,11 @@
                 self.__data["AnnotationsChecker"]["ExemptedTypingSymbols"] = (
                     defaultParameters["AnnotationsChecker"]["ExemptedTypingSymbols"]
                 )
+            if "RespectTypeIgnore" not in self.__data["AnnotationsChecker"]:
+                # fifth extension
+                self.__data["AnnotationsChecker"]["RespectTypeIgnore"] = (
+                    defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"]
+                )
 
         self.__initCategoriesList(self.__data["EnabledCheckerCategories"])
         self.excludeFilesEdit.setText(self.__data["ExcludeFiles"])
@@ -681,6 +686,9 @@
         self.simplifiedTypesCheckBox.setChecked(
             self.__data["AnnotationsChecker"]["CheckFutureAnnotations"]
         )
+        self.typeIgnoreCheckBox.setChecked(
+            self.__data["AnnotationsChecker"]["RespectTypeIgnore"]
+        )
         self.dispatchDecoratorEdit.setText(
             ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"])
         )
@@ -935,6 +943,7 @@
                     self.forceFutureAnnotationsCheckBox.isChecked()
                 ),
                 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
+                "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(),
                 "DispatchDecorators": [
                     d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
                 ],
@@ -1415,6 +1424,7 @@
                         self.forceFutureAnnotationsCheckBox.isChecked()
                     ),
                     "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
+                    "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(),
                     "DispatchDecorators": [
                         d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
                     ],
@@ -1893,6 +1903,14 @@
                 )
             )
         )
+        self.typeIgnoreCheckBox.setChecked(
+            Preferences.toBool(
+                settings.value(
+                    "PEP8/RespectTypeIgnore",
+                    defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"],
+                )
+            )
+        )
         self.dispatchDecoratorEdit.setText(
             ", ".join(
                 Preferences.toList(
@@ -2256,6 +2274,9 @@
             "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked()
         )
         settings.setValue(
+            "PEP8/RespectTypeIgnore", self.typeIgnoreCheckBox.isChecked()
+        )
+        settings.setValue(
             "PEP8/DispatchDecorators",
             [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")],
         )
@@ -2470,6 +2491,10 @@
             defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
         )
         settings.setValue(
+            "PEP8/RespectTypeIgnore",
+            defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"],
+        )
+        settings.setValue(
             "PEP8/DispatchDecorators",
             defaultParameters["AnnotationsChecker"]["DispatchDecorators"],
         )

eric ide

mercurial