Plugins/CheckerPlugins/Pep8/Pep8Dialog.py

changeset 2878
61042247f793
parent 2876
bfa39cf40277
child 2881
e942480a6130
equal deleted inserted replaced
2876:bfa39cf40277 2878:61042247f793
619 "PEP8/ExcludeFilePatterns")) 619 "PEP8/ExcludeFilePatterns"))
620 self.excludeMessagesEdit.setText(Preferences.Prefs.settings.value( 620 self.excludeMessagesEdit.setText(Preferences.Prefs.settings.value(
621 "PEP8/ExcludeMessages", pep8.DEFAULT_IGNORE)) 621 "PEP8/ExcludeMessages", pep8.DEFAULT_IGNORE))
622 self.includeMessagesEdit.setText(Preferences.Prefs.settings.value( 622 self.includeMessagesEdit.setText(Preferences.Prefs.settings.value(
623 "PEP8/IncludeMessages")) 623 "PEP8/IncludeMessages"))
624 self.repeatCheckBox.setChecked(Preferences.toBool(
625 Preferences.Prefs.settings.value("PEP8/RepeatMessages")))
624 self.fixIssuesEdit.setText(Preferences.Prefs.settings.value( 626 self.fixIssuesEdit.setText(Preferences.Prefs.settings.value(
625 "PEP8/FixCodes")) 627 "PEP8/FixCodes"))
626 self.noFixIssuesEdit.setText(Preferences.Prefs.settings.value( 628 self.noFixIssuesEdit.setText(Preferences.Prefs.settings.value(
627 "PEP8/NoFixCodes")) 629 "PEP8/NoFixCodes", "E501"))
628 self.fixIssuesCheckBox.setChecked(Preferences.toBool( 630 self.fixIssuesCheckBox.setChecked(Preferences.toBool(
629 Preferences.Prefs.settings.value("PEP8/FixIssues"))) 631 Preferences.Prefs.settings.value("PEP8/FixIssues")))
630 self.lineLengthSpinBox.setValue(int(Preferences.Prefs.settings.value( 632 self.lineLengthSpinBox.setValue(int(Preferences.Prefs.settings.value(
631 "PEP8/MaxLineLength", pep8.MAX_LINE_LENGTH))) 633 "PEP8/MaxLineLength", pep8.MAX_LINE_LENGTH)))
632 self.hangClosingCheckBox.setChecked(Preferences.toBool( 634 self.hangClosingCheckBox.setChecked(Preferences.toBool(
642 self.excludeFilesEdit.text()) 644 self.excludeFilesEdit.text())
643 Preferences.Prefs.settings.setValue("PEP8/ExcludeMessages", 645 Preferences.Prefs.settings.setValue("PEP8/ExcludeMessages",
644 self.excludeMessagesEdit.text()) 646 self.excludeMessagesEdit.text())
645 Preferences.Prefs.settings.setValue("PEP8/IncludeMessages", 647 Preferences.Prefs.settings.setValue("PEP8/IncludeMessages",
646 self.includeMessagesEdit.text()) 648 self.includeMessagesEdit.text())
649 Preferences.Prefs.settings.setValue("PEP8/RepeatMessages",
650 self.repeatCheckBox.isChecked())
647 Preferences.Prefs.settings.setValue("PEP8/FixCodes", 651 Preferences.Prefs.settings.setValue("PEP8/FixCodes",
648 self.fixIssuesEdit.text()) 652 self.fixIssuesEdit.text())
649 Preferences.Prefs.settings.setValue("PEP8/NoFixCodes", 653 Preferences.Prefs.settings.setValue("PEP8/NoFixCodes",
650 self.noFixIssuesEdit.text()) 654 self.noFixIssuesEdit.text())
651 Preferences.Prefs.settings.setValue("PEP8/FixIssues", 655 Preferences.Prefs.settings.setValue("PEP8/FixIssues",
652 self.fixIssuesCheckBox.isChecked()) 656 self.fixIssuesCheckBox.isChecked())
653 Preferences.Prefs.settings.setValue("PEP8/MaxLineLength", 657 Preferences.Prefs.settings.setValue("PEP8/MaxLineLength",
654 self.lineLengthSpinBox.value()) 658 self.lineLengthSpinBox.value())
655 Preferences.Prefs.settings.setValue("PEP8/HangClosing", 659 Preferences.Prefs.settings.setValue("PEP8/HangClosing",
656 self.hangClosingCheckBox.isChecked()) 660 self.hangClosingCheckBox.isChecked())
661
662 @pyqtSlot()
663 def on_resetDefaultButton_clicked(self):
664 """
665 Slot documentation goes here.
666 """
667 raise NotImplementedError
668 Preferences.Prefs.settings.setValue("PEP8/ExcludeFilePatterns", "")
669 Preferences.Prefs.settings.setValue("PEP8/ExcludeMessages",
670 pep8.DEFAULT_IGNORE)
671 Preferences.Prefs.settings.setValue("PEP8/IncludeMessages", "")
672 Preferences.Prefs.settings.setValue("PEP8/RepeatMessages", False)
673 Preferences.Prefs.settings.setValue("PEP8/FixCodes", "")
674 Preferences.Prefs.settings.setValue("PEP8/NoFixCodes", "E501")
675 Preferences.Prefs.settings.setValue("PEP8/FixIssues", False)
676 Preferences.Prefs.settings.setValue("PEP8/MaxLineLength",
677 pep8.MAX_LINE_LENGTH)
678 Preferences.Prefs.settings.setValue("PEP8/HangClosing", False)
657 679
658 @pyqtSlot(QAbstractButton) 680 @pyqtSlot(QAbstractButton)
659 def on_buttonBox_clicked(self, button): 681 def on_buttonBox_clicked(self, button):
660 """ 682 """
661 Private slot called by a button of the button box clicked. 683 Private slot called by a button of the button box clicked.

eric ide

mercurial