612 if "ExemptedTypingSymbols" not in self.__data["AnnotationsChecker"]: |
612 if "ExemptedTypingSymbols" not in self.__data["AnnotationsChecker"]: |
613 # fourth extension |
613 # fourth extension |
614 self.__data["AnnotationsChecker"]["ExemptedTypingSymbols"] = ( |
614 self.__data["AnnotationsChecker"]["ExemptedTypingSymbols"] = ( |
615 defaultParameters["AnnotationsChecker"]["ExemptedTypingSymbols"] |
615 defaultParameters["AnnotationsChecker"]["ExemptedTypingSymbols"] |
616 ) |
616 ) |
|
617 if "RespectTypeIgnore" not in self.__data["AnnotationsChecker"]: |
|
618 # fifth extension |
|
619 self.__data["AnnotationsChecker"]["RespectTypeIgnore"] = ( |
|
620 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"] |
|
621 ) |
617 |
622 |
618 self.__initCategoriesList(self.__data["EnabledCheckerCategories"]) |
623 self.__initCategoriesList(self.__data["EnabledCheckerCategories"]) |
619 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) |
624 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) |
620 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"]) |
625 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"]) |
621 self.includeMessagesEdit.setText(self.__data["IncludeMessages"]) |
626 self.includeMessagesEdit.setText(self.__data["IncludeMessages"]) |
678 self.forceFutureAnnotationsCheckBox.setChecked( |
683 self.forceFutureAnnotationsCheckBox.setChecked( |
679 self.__data["AnnotationsChecker"]["ForceFutureAnnotations"] |
684 self.__data["AnnotationsChecker"]["ForceFutureAnnotations"] |
680 ) |
685 ) |
681 self.simplifiedTypesCheckBox.setChecked( |
686 self.simplifiedTypesCheckBox.setChecked( |
682 self.__data["AnnotationsChecker"]["CheckFutureAnnotations"] |
687 self.__data["AnnotationsChecker"]["CheckFutureAnnotations"] |
|
688 ) |
|
689 self.typeIgnoreCheckBox.setChecked( |
|
690 self.__data["AnnotationsChecker"]["RespectTypeIgnore"] |
683 ) |
691 ) |
684 self.dispatchDecoratorEdit.setText( |
692 self.dispatchDecoratorEdit.setText( |
685 ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"]) |
693 ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"]) |
686 ) |
694 ) |
687 self.overloadDecoratorEdit.setText( |
695 self.overloadDecoratorEdit.setText( |
933 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), |
941 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), |
934 "ForceFutureAnnotations": ( |
942 "ForceFutureAnnotations": ( |
935 self.forceFutureAnnotationsCheckBox.isChecked() |
943 self.forceFutureAnnotationsCheckBox.isChecked() |
936 ), |
944 ), |
937 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), |
945 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), |
|
946 "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(), |
938 "DispatchDecorators": [ |
947 "DispatchDecorators": [ |
939 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") |
948 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") |
940 ], |
949 ], |
941 "OverloadDecorators": [ |
950 "OverloadDecorators": [ |
942 d.strip() for d in self.overloadDecoratorEdit.text().split(",") |
951 d.strip() for d in self.overloadDecoratorEdit.text().split(",") |
1413 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), |
1422 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), |
1414 "ForceFutureAnnotations": ( |
1423 "ForceFutureAnnotations": ( |
1415 self.forceFutureAnnotationsCheckBox.isChecked() |
1424 self.forceFutureAnnotationsCheckBox.isChecked() |
1416 ), |
1425 ), |
1417 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), |
1426 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), |
|
1427 "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(), |
1418 "DispatchDecorators": [ |
1428 "DispatchDecorators": [ |
1419 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") |
1429 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") |
1420 ], |
1430 ], |
1421 "OverloadDecorators": [ |
1431 "OverloadDecorators": [ |
1422 d.strip() for d in self.overloadDecoratorEdit.text().split(",") |
1432 d.strip() for d in self.overloadDecoratorEdit.text().split(",") |
1891 "PEP8/CheckFutureAnnotations", |
1901 "PEP8/CheckFutureAnnotations", |
1892 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], |
1902 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], |
1893 ) |
1903 ) |
1894 ) |
1904 ) |
1895 ) |
1905 ) |
|
1906 self.typeIgnoreCheckBox.setChecked( |
|
1907 Preferences.toBool( |
|
1908 settings.value( |
|
1909 "PEP8/RespectTypeIgnore", |
|
1910 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"], |
|
1911 ) |
|
1912 ) |
|
1913 ) |
1896 self.dispatchDecoratorEdit.setText( |
1914 self.dispatchDecoratorEdit.setText( |
1897 ", ".join( |
1915 ", ".join( |
1898 Preferences.toList( |
1916 Preferences.toList( |
1899 settings.value( |
1917 settings.value( |
1900 "PEP8/DispatchDecorators", |
1918 "PEP8/DispatchDecorators", |
2254 ) |
2272 ) |
2255 settings.setValue( |
2273 settings.setValue( |
2256 "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked() |
2274 "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked() |
2257 ) |
2275 ) |
2258 settings.setValue( |
2276 settings.setValue( |
|
2277 "PEP8/RespectTypeIgnore", self.typeIgnoreCheckBox.isChecked() |
|
2278 ) |
|
2279 settings.setValue( |
2259 "PEP8/DispatchDecorators", |
2280 "PEP8/DispatchDecorators", |
2260 [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")], |
2281 [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")], |
2261 ) |
2282 ) |
2262 settings.setValue( |
2283 settings.setValue( |
2263 "PEP8/OverloadDecorators", |
2284 "PEP8/OverloadDecorators", |
2466 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"], |
2487 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"], |
2467 ) |
2488 ) |
2468 settings.setValue( |
2489 settings.setValue( |
2469 "PEP8/CheckFutureAnnotations", |
2490 "PEP8/CheckFutureAnnotations", |
2470 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], |
2491 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], |
|
2492 ) |
|
2493 settings.setValue( |
|
2494 "PEP8/RespectTypeIgnore", |
|
2495 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"], |
2471 ) |
2496 ) |
2472 settings.setValue( |
2497 settings.setValue( |
2473 "PEP8/DispatchDecorators", |
2498 "PEP8/DispatchDecorators", |
2474 defaultParameters["AnnotationsChecker"]["DispatchDecorators"], |
2499 defaultParameters["AnnotationsChecker"]["DispatchDecorators"], |
2475 ) |
2500 ) |