eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
eric7
changeset 8802
129a973fc33e
parent 8801
8fbb21be8579
child 8808
033fa34447d0
equal deleted inserted replaced
8801:8fbb21be8579 8802:129a973fc33e
546 SecurityDefaults["check_typed_exception"], 546 SecurityDefaults["check_typed_exception"],
547 } 547 }
548 548
549 if "ImportsChecker" not in self.__data: 549 if "ImportsChecker" not in self.__data:
550 self.__data["ImportsChecker"] = { 550 self.__data["ImportsChecker"] = {
551 "ApplicationModuleNames": [], 551 "ApplicationPackageNames": [],
552 } 552 }
553 553
554 self.__initCategoriesList(self.__data["EnabledCheckerCategories"]) 554 self.__initCategoriesList(self.__data["EnabledCheckerCategories"])
555 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) 555 self.excludeFilesEdit.setText(self.__data["ExcludeFiles"])
556 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"]) 556 self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"])
811 "check_typed_exception": 811 "check_typed_exception":
812 self.typedExceptionsCheckBox.isChecked(), 812 self.typedExceptionsCheckBox.isChecked(),
813 } 813 }
814 814
815 importsArgs = { 815 importsArgs = {
816 "ApplicationModuleNames": 816 "ApplicationPackageNames":
817 sorted(self.appModulesEdit.toPlainText().split()), 817 sorted(self.appPackagesEdit.toPlainText().split()),
818 } 818 }
819 819
820 self.__options = [excludeMessages, includeMessages, repeatMessages, 820 self.__options = [excludeMessages, includeMessages, repeatMessages,
821 fixCodes, noFixCodes, fixIssues, maxLineLength, 821 fixCodes, noFixCodes, fixIssues, maxLineLength,
822 maxDocLineLength, blankLines, hangClosing, 822 maxDocLineLength, blankLines, hangClosing,
1248 self.ecMediumRiskCombo.currentText(), 1248 self.ecMediumRiskCombo.currentText(),
1249 "CheckTypedException": 1249 "CheckTypedException":
1250 self.typedExceptionsCheckBox.isChecked(), 1250 self.typedExceptionsCheckBox.isChecked(),
1251 }, 1251 },
1252 "ImportsChecker": { 1252 "ImportsChecker": {
1253 "ApplicationModuleNames": 1253 "ApplicationPackageNames":
1254 sorted(self.appModulesEdit.toPlainText().split()) 1254 sorted(self.appPackagesEdit.toPlainText().split())
1255 }, 1255 },
1256 } 1256 }
1257 if ( 1257 if (
1258 json.dumps(data, sort_keys=True) != 1258 json.dumps(data, sort_keys=True) !=
1259 json.dumps(self.__data, sort_keys=True) 1259 json.dumps(self.__data, sort_keys=True)
1594 Preferences.getSettings().value( 1594 Preferences.getSettings().value(
1595 "PEP8/CheckTypedException", 1595 "PEP8/CheckTypedException",
1596 SecurityDefaults["check_typed_exception"]))), 1596 SecurityDefaults["check_typed_exception"]))),
1597 1597
1598 # Imports Checker 1598 # Imports Checker
1599 self.appModulesEdit.setPlainText(" ".join( 1599 self.appPackagesEdit.setPlainText(" ".join(
1600 sorted(Preferences.toList(Preferences.getSettings().value( 1600 sorted(Preferences.toList(Preferences.getSettings().value(
1601 "PEP8/ApplicationModuleNames", []))))) 1601 "PEP8/ApplicationPackageNames", [])))))
1602 1602
1603 self.__cleanupData() 1603 self.__cleanupData()
1604 1604
1605 @pyqtSlot() 1605 @pyqtSlot()
1606 def on_storeDefaultButton_clicked(self): 1606 def on_storeDefaultButton_clicked(self):
1736 "PEP8/CheckTypedException", 1736 "PEP8/CheckTypedException",
1737 self.typedExceptionsCheckBox.isChecked()), 1737 self.typedExceptionsCheckBox.isChecked()),
1738 1738
1739 # Imports Checker 1739 # Imports Checker
1740 Preferences.getSettings().setValue( 1740 Preferences.getSettings().setValue(
1741 "PEP8/ApplicationModuleNames", 1741 "PEP8/ApplicationPackageNames",
1742 sorted(self.appModulesEdit.toPlainText().split())) 1742 sorted(self.appPackagesEdit.toPlainText().split()))
1743 1743
1744 @pyqtSlot() 1744 @pyqtSlot()
1745 def on_resetDefaultButton_clicked(self): 1745 def on_resetDefaultButton_clicked(self):
1746 """ 1746 """
1747 Private slot to reset the configuration values to their default values. 1747 Private slot to reset the configuration values to their default values.
1865 "PEP8/CheckTypedException", 1865 "PEP8/CheckTypedException",
1866 SecurityDefaults["check_typed_exception"]) 1866 SecurityDefaults["check_typed_exception"])
1867 1867
1868 # Imports Checker 1868 # Imports Checker
1869 Preferences.getSettings().setValue( 1869 Preferences.getSettings().setValue(
1870 "PEP8/ApplicationModuleNames", []) 1870 "PEP8/ApplicationPackageNames", [])
1871 1871
1872 # Update UI with default values 1872 # Update UI with default values
1873 self.on_loadDefaultButton_clicked() 1873 self.on_loadDefaultButton_clicked()
1874 1874
1875 @pyqtSlot() 1875 @pyqtSlot()

eric ide

mercurial