src/eric7/Preferences/ConfigurationPages/EditorDocViewerPage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Preferences/ConfigurationPages/EditorDocViewerPage.py
--- a/src/eric7/Preferences/ConfigurationPages/EditorDocViewerPage.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/EditorDocViewerPage.py	Wed Jul 13 14:55:47 2022 +0200
@@ -19,6 +19,7 @@
     """
     Class implementing the Editor Documentation Viewer configuration page.
     """
+
     def __init__(self):
         """
         Constructor
@@ -26,21 +27,22 @@
         super().__init__()
         self.setupUi(self)
         self.setObjectName("EditorExportersPage")
-        
+
         try:
             providers = ericApp().getObject("DocuViewer").getProviders()
             for provider, text in providers:
                 self.providerComboBox.addItem(text, provider)
-            
+
             self.infoLabel.clear()
-            
+
             # set initial values
             self.parenthesisCheckBox.setChecked(
-                Preferences.getDocuViewer("ShowInfoOnOpenParenthesis"))
-            
+                Preferences.getDocuViewer("ShowInfoOnOpenParenthesis")
+            )
+
             provider = Preferences.getDocuViewer("Provider")
             self.viewerGroupBox.setChecked(provider != "disabled")
-                
+
             index = self.providerComboBox.findData(provider)
             if index >= 0:
                 self.providerComboBox.setCurrentIndex(index)
@@ -48,11 +50,14 @@
             # documentation viewer is globally disabled
             self.viewerGroupBox.setChecked(False)
             self.viewerGroupBox.setEnabled(False)
-            self.infoLabel.setText(self.tr(
-                "The Documentation Viewer is disabled globally. Re-enable it"
-                " on the Interface/Interface configuration page and restart"
-                " the eric."))
-    
+            self.infoLabel.setText(
+                self.tr(
+                    "The Documentation Viewer is disabled globally. Re-enable it"
+                    " on the Interface/Interface configuration page and restart"
+                    " the eric."
+                )
+            )
+
     def save(self):
         """
         Public slot to save the Editor Typing configuration.
@@ -60,12 +65,11 @@
         enabled = self.viewerGroupBox.isChecked()
         if enabled:
             Preferences.setDocuViewer(
-                "ShowInfoOnOpenParenthesis",
-                self.parenthesisCheckBox.isChecked())
+                "ShowInfoOnOpenParenthesis", self.parenthesisCheckBox.isChecked()
+            )
             Preferences.setDocuViewer(
                 "Provider",
-                self.providerComboBox.itemData(
-                    self.providerComboBox.currentIndex())
+                self.providerComboBox.itemData(self.providerComboBox.currentIndex()),
             )
         else:
             Preferences.setDocuViewer("Provider", "disabled")
@@ -74,7 +78,7 @@
 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