src/eric7/Preferences/ConfigurationPages/TemplatesPage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/Preferences/ConfigurationPages/TemplatesPage.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/TemplatesPage.py	Wed Jul 13 14:55:47 2022 +0200
@@ -20,6 +20,7 @@
     """
     Class implementing the Templates configuration page.
     """
+
     def __init__(self):
         """
         Constructor
@@ -27,53 +28,58 @@
         super().__init__()
         self.setupUi(self)
         self.setObjectName("TemplatesPage")
-        
+
         # set initial values
         self.templatesAutoOpenGroupsCheckBox.setChecked(
-            Preferences.getTemplates("AutoOpenGroups"))
+            Preferences.getTemplates("AutoOpenGroups")
+        )
         self.templatesSeparatorCharEdit.setText(
-            Preferences.getTemplates("SeparatorChar"))
+            Preferences.getTemplates("SeparatorChar")
+        )
         if Preferences.getTemplates("SingleDialog"):
             self.templatesSingleDialogButton.setChecked(True)
         else:
             self.templatesMultiDialogButton.setChecked(True)
         self.templatesToolTipCheckBox.setChecked(
-            Preferences.getTemplates("ShowTooltip"))
+            Preferences.getTemplates("ShowTooltip")
+        )
         self.editorFont = Preferences.getTemplates("EditorFont")
         self.editorFontSample.setFont(self.editorFont)
-        
+
     def save(self):
         """
         Public slot to save the Templates configuration.
         """
         Preferences.setTemplates(
-            "AutoOpenGroups",
-            self.templatesAutoOpenGroupsCheckBox.isChecked())
+            "AutoOpenGroups", self.templatesAutoOpenGroupsCheckBox.isChecked()
+        )
         sepChar = self.templatesSeparatorCharEdit.text()
         if sepChar:
             Preferences.setTemplates("SeparatorChar", sepChar)
         Preferences.setTemplates(
-            "SingleDialog",
-            self.templatesSingleDialogButton.isChecked())
+            "SingleDialog", self.templatesSingleDialogButton.isChecked()
+        )
         Preferences.setTemplates(
-            "ShowTooltip",
-            self.templatesToolTipCheckBox.isChecked())
+            "ShowTooltip", self.templatesToolTipCheckBox.isChecked()
+        )
         Preferences.setTemplates("EditorFont", self.editorFont)
-    
+
     @pyqtSlot()
     def on_editorFontButton_clicked(self):
         """
         Private method used to select the font to be used by the code editor.
         """
         self.editorFont = self.selectFont(
-            self.editorFontSample, self.editorFont,
-            options=QFontDialog.FontDialogOption.MonospacedFonts)
-    
+            self.editorFontSample,
+            self.editorFont,
+            options=QFontDialog.FontDialogOption.MonospacedFonts,
+        )
+
 
 def create(dlg):
     """
     Module function to create the configuration page.
-    
+
     @param dlg reference to the configuration dialog
     @return reference to the instantiated page (ConfigurationPageBase)
     """

eric ide

mercurial