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

branch
eric7
changeset 10753
031cfa81992a
parent 10690
fab36645aa7d
child 10759
aeb98b3fa008
child 10760
f702f6781b05
equal deleted inserted replaced
10751:d4dbb6b75bdc 10753:031cfa81992a
608 if "ExemptedTypingSymbols" not in self.__data["AnnotationsChecker"]: 608 if "ExemptedTypingSymbols" not in self.__data["AnnotationsChecker"]:
609 # fourth extension 609 # fourth extension
610 self.__data["AnnotationsChecker"]["ExemptedTypingSymbols"] = ( 610 self.__data["AnnotationsChecker"]["ExemptedTypingSymbols"] = (
611 defaultParameters["AnnotationsChecker"]["ExemptedTypingSymbols"] 611 defaultParameters["AnnotationsChecker"]["ExemptedTypingSymbols"]
612 ) 612 )
613 if "RespectTypeIgnore" not in self.__data["AnnotationsChecker"]:
614 # fifth extension
615 self.__data["AnnotationsChecker"]["RespectTypeIgnore"] = (
616 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"]
617 )
613 618
614 self.__initCategoriesList(self.__data["EnabledCheckerCategories"]) 619 self.__initCategoriesList(self.__data["EnabledCheckerCategories"])
615 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) 620 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"])
616 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"]) 621 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"])
617 self.includeMessagesEdit.setText(self.__data["IncludeMessages"]) 622 self.includeMessagesEdit.setText(self.__data["IncludeMessages"])
674 self.forceFutureAnnotationsCheckBox.setChecked( 679 self.forceFutureAnnotationsCheckBox.setChecked(
675 self.__data["AnnotationsChecker"]["ForceFutureAnnotations"] 680 self.__data["AnnotationsChecker"]["ForceFutureAnnotations"]
676 ) 681 )
677 self.simplifiedTypesCheckBox.setChecked( 682 self.simplifiedTypesCheckBox.setChecked(
678 self.__data["AnnotationsChecker"]["CheckFutureAnnotations"] 683 self.__data["AnnotationsChecker"]["CheckFutureAnnotations"]
684 )
685 self.typeIgnoreCheckBox.setChecked(
686 self.__data["AnnotationsChecker"]["RespectTypeIgnore"]
679 ) 687 )
680 self.dispatchDecoratorEdit.setText( 688 self.dispatchDecoratorEdit.setText(
681 ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"]) 689 ", ".join(self.__data["AnnotationsChecker"]["DispatchDecorators"])
682 ) 690 )
683 self.overloadDecoratorEdit.setText( 691 self.overloadDecoratorEdit.setText(
924 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), 932 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(),
925 "ForceFutureAnnotations": ( 933 "ForceFutureAnnotations": (
926 self.forceFutureAnnotationsCheckBox.isChecked() 934 self.forceFutureAnnotationsCheckBox.isChecked()
927 ), 935 ),
928 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), 936 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
937 "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(),
929 "DispatchDecorators": [ 938 "DispatchDecorators": [
930 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") 939 d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
931 ], 940 ],
932 "OverloadDecorators": [ 941 "OverloadDecorators": [
933 d.strip() for d in self.overloadDecoratorEdit.text().split(",") 942 d.strip() for d in self.overloadDecoratorEdit.text().split(",")
1394 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(), 1403 "AllowStarArgAny": self.allowStarArgAnyCheckBox.isChecked(),
1395 "ForceFutureAnnotations": ( 1404 "ForceFutureAnnotations": (
1396 self.forceFutureAnnotationsCheckBox.isChecked() 1405 self.forceFutureAnnotationsCheckBox.isChecked()
1397 ), 1406 ),
1398 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(), 1407 "CheckFutureAnnotations": self.simplifiedTypesCheckBox.isChecked(),
1408 "RespectTypeIgnore": self.typeIgnoreCheckBox.isChecked(),
1399 "DispatchDecorators": [ 1409 "DispatchDecorators": [
1400 d.strip() for d in self.dispatchDecoratorEdit.text().split(",") 1410 d.strip() for d in self.dispatchDecoratorEdit.text().split(",")
1401 ], 1411 ],
1402 "OverloadDecorators": [ 1412 "OverloadDecorators": [
1403 d.strip() for d in self.overloadDecoratorEdit.text().split(",") 1413 d.strip() for d in self.overloadDecoratorEdit.text().split(",")
1872 "PEP8/CheckFutureAnnotations", 1882 "PEP8/CheckFutureAnnotations",
1873 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], 1883 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
1874 ) 1884 )
1875 ) 1885 )
1876 ) 1886 )
1887 self.typeIgnoreCheckBox.setChecked(
1888 Preferences.toBool(
1889 settings.value(
1890 "PEP8/RespectTypeIgnore",
1891 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"],
1892 )
1893 )
1894 )
1877 self.dispatchDecoratorEdit.setText( 1895 self.dispatchDecoratorEdit.setText(
1878 ", ".join( 1896 ", ".join(
1879 Preferences.toList( 1897 Preferences.toList(
1880 settings.value( 1898 settings.value(
1881 "PEP8/DispatchDecorators", 1899 "PEP8/DispatchDecorators",
2235 ) 2253 )
2236 settings.setValue( 2254 settings.setValue(
2237 "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked() 2255 "PEP8/CheckFutureAnnotations", self.simplifiedTypesCheckBox.isChecked()
2238 ) 2256 )
2239 settings.setValue( 2257 settings.setValue(
2258 "PEP8/RespectTypeIgnore", self.typeIgnoreCheckBox.isChecked()
2259 )
2260 settings.setValue(
2240 "PEP8/DispatchDecorators", 2261 "PEP8/DispatchDecorators",
2241 [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")], 2262 [d.strip() for d in self.dispatchDecoratorEdit.text().split(",")],
2242 ) 2263 )
2243 settings.setValue( 2264 settings.setValue(
2244 "PEP8/OverloadDecorators", 2265 "PEP8/OverloadDecorators",
2447 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"], 2468 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"],
2448 ) 2469 )
2449 settings.setValue( 2470 settings.setValue(
2450 "PEP8/CheckFutureAnnotations", 2471 "PEP8/CheckFutureAnnotations",
2451 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], 2472 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
2473 )
2474 settings.setValue(
2475 "PEP8/RespectTypeIgnore",
2476 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"],
2452 ) 2477 )
2453 settings.setValue( 2478 settings.setValue(
2454 "PEP8/DispatchDecorators", 2479 "PEP8/DispatchDecorators",
2455 defaultParameters["AnnotationsChecker"]["DispatchDecorators"], 2480 defaultParameters["AnnotationsChecker"]["DispatchDecorators"],
2456 ) 2481 )

eric ide

mercurial