--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Fri Jun 07 13:51:43 2024 +0200 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Jun 08 15:01:47 2024 +0200 @@ -610,6 +610,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"]) @@ -677,6 +682,9 @@ self.simplifiedTypesCheckBox.setChecked( self.__data["AnnotationsChecker"]["CheckFutureAnnotations"] ) + self.typeIgnoreCheckBox.setChecked( + self.__data["AnnotationsChecker"]["RespectTypeIgnore"] + ) self.dispatchDecoratorEdit.setText( ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"]) ) @@ -926,6 +934,7 @@ self.forceFutureAnnotationsCheckBox.isChecked() ), "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), + "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(), "DispatchDecorators": [ d.strip() for d in self.dispatchDecoratorEdit.text().split(",") ], @@ -1396,6 +1405,7 @@ self.forceFutureAnnotationsCheckBox.isChecked() ), "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), + "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(), "DispatchDecorators": [ d.strip() for d in self.dispatchDecoratorEdit.text().split(",") ], @@ -1874,6 +1884,14 @@ ) ) ) + self.typeIgnoreCheckBox.setChecked( + Preferences.toBool( + settings.value( + "PEP8/RespectTypeIgnore", + defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"], + ) + ) + ) self.dispatchDecoratorEdit.setText( ", ".join( Preferences.toList( @@ -2237,6 +2255,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(",")], ) @@ -2451,6 +2472,10 @@ defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], ) settings.setValue( + "PEP8/RespectTypeIgnore", + defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"], + ) + settings.setValue( "PEP8/DispatchDecorators", defaultParameters["AnnotationsChecker"]["DispatchDecorators"], )