Reformatted source code with 'Black'. eric7

Wed, 21 Sep 2022 16:24:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Sep 2022 16:24:54 +0200
branch
eric7
changeset 159
d4e7f5a389e6
parent 158
24582cac737e
child 160
41b23683d5a1

Reformatted source code with 'Black'.

.hgignore file | annotate | diff | comparison | revisions
PluginProjectPyramid.py file | annotate | diff | comparison | revisions
PluginPyramid.epj file | annotate | diff | comparison | revisions
ProjectPyramid/ConfigurationPage/PyramidPage.py file | annotate | diff | comparison | revisions
ProjectPyramid/CreateParametersDialog.py file | annotate | diff | comparison | revisions
ProjectPyramid/DistributionTypeSelectionDialog.py file | annotate | diff | comparison | revisions
ProjectPyramid/FormSelectionDialog.py file | annotate | diff | comparison | revisions
ProjectPyramid/MigrateSummaryDialog.py file | annotate | diff | comparison | revisions
ProjectPyramid/Project.py file | annotate | diff | comparison | revisions
ProjectPyramid/PyramidDialog.py file | annotate | diff | comparison | revisions
ProjectPyramid/PyramidRoutesDialog.py file | annotate | diff | comparison | revisions
--- a/.hgignore	Thu Dec 30 12:17:44 2021 +0100
+++ b/.hgignore	Wed Sep 21 16:24:54 2022 +0200
@@ -1,6 +1,7 @@
 glob:.eric7project
 glob:.eric6project
 glob:.ropeproject
+glob:.jedi
 glob:.directory
 glob:**.pyc
 glob:**.pyo
--- a/PluginProjectPyramid.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/PluginProjectPyramid.py	Wed Sep 21 16:24:54 2022 +0200
@@ -30,9 +30,7 @@
 className = "ProjectPyramidPlugin"
 packageName = "ProjectPyramid"
 shortDescription = "Project support for Pyramid projects."
-longDescription = (
-    """This plugin implements project support for Pyramid projects."""
-)
+longDescription = """This plugin implements project support for Pyramid projects."""
 needsRestart = False
 pyqtApi = 2
 # End-of-Header
@@ -45,7 +43,7 @@
 def createPyramidPage(configDlg):
     """
     Module function to create the Pyramid configuration page.
-    
+
     @param configDlg reference to the configuration dialog
     @type ConfigurationWidget
     @return reference to the configuration page
@@ -53,41 +51,43 @@
     """
     global pyramidPluginObject
     from ProjectPyramid.ConfigurationPage.PyramidPage import PyramidPage
+
     return PyramidPage(pyramidPluginObject)
-    
+
 
 def getConfigData():
     """
     Module function returning data as required by the configuration dialog.
-    
+
     @return dictionary containing the relevant data
     @rtype dict
     """
     usesDarkPalette = ericApp().usesDarkPalette()
     iconSuffix = "dark" if usesDarkPalette else "light"
-    
+
     return {
         "pyramidPage": [
             QCoreApplication.translate("ProjectPyramidPlugin", "Pyramid"),
-            os.path.join("ProjectPyramid", "icons",
-                         "pyramid-{0}".format(iconSuffix)),
-            createPyramidPage, None, None],
+            os.path.join("ProjectPyramid", "icons", "pyramid-{0}".format(iconSuffix)),
+            createPyramidPage,
+            None,
+            None,
+        ],
     }
 
 
 def apiFiles(language):
     """
     Module function to return the API files made available by this plugin.
-    
+
     @param language language to get APIs for
     @type str
     @return list of API filenames
     @rtype list of str
     """
     if language == "Python3":
-        apisDir = os.path.join(os.path.dirname(__file__),
-                               "ProjectPyramid", "APIs")
-        return glob.glob(os.path.join(apisDir, '*.api'))
+        apisDir = os.path.join(os.path.dirname(__file__), "ProjectPyramid", "APIs")
+        return glob.glob(os.path.join(apisDir, "*.api"))
     else:
         return []
 
@@ -104,8 +104,9 @@
     """
     Class implementing the Pyramid project plugin.
     """
+
     PreferencesKey = "Pyramid"
-    
+
     lexerAssociations = {
         "*.mako": "Pygments|HTML+Mako",
         "*.pt": "Pygments|HTML+Genshi",
@@ -113,28 +114,24 @@
         "*.html": "Pygments|HTML+Genshi",
         "*.htm": "Pygments|HTML+Genshi",
     }
-    
+
     def __init__(self, ui):
         """
         Constructor
-        
+
         @param ui reference to the user interface object
         @type UserInterface
         """
         QObject.__init__(self, ui)
         self.__ui = ui
         self.__initialize()
-        
+
         self.__defaults = {
             "VirtualEnvironmentNamePy3": "",
-            
             "Python3ConsoleType": "python",
-            
             "PyramidDocUrl": "http://docs.pylonsproject.org/projects/"
-                             "pyramid/en/latest/index.html",
-            
+            "pyramid/en/latest/index.html",
             "TranslationsEditor": "",
-            
             "UseExternalBrowser": False,
         }
         if isWindowsPlatform():
@@ -143,110 +140,117 @@
             self.__defaults["ConsoleCommand"] = "xterm -e"
         else:
             self.__defaults["ConsoleCommand"] = "konsole -e"
-        
+
         self.__translator = None
         self.__loadTranslator()
-    
+
     def __initialize(self):
         """
         Private slot to (re)initialize the plugin.
         """
         self.__object = None
-        
+
         self.__mainMenu = None
         self.__mainAct = None
         self.__separatorAct = None
-        
+
         self.__ericProject = ericApp().getObject("Project")
-        
+
         self.__supportedVariants = []
-    
+
     def activate(self):
         """
         Public method to activate this plugin.
-        
+
         @return tuple of None and activation status
         @rtype (None, bool)
         """
         global pyramidPluginObject
         pyramidPluginObject = self
-        
+
         usesDarkPalette = ericApp().usesDarkPalette()
         iconSuffix = "dark" if usesDarkPalette else "light"
-        
+
         self.__object = Project(self, iconSuffix, self.__ui)
         self.__object.initActions()
         ericApp().registerPluginObject("ProjectPyramid", self.__object)
-        
+
         self.__mainMenu = self.__object.initMenu()
-        
+
         self.__supportedVariants = self.__object.supportedPythonVariants()
-        
+
         if self.__supportedVariants:
             self.__ericProject.registerProjectType(
-                "Pyramid", self.tr("Pyramid"),
+                "Pyramid",
+                self.tr("Pyramid"),
                 self.fileTypesCallback,
                 lexerAssociationCallback=self.lexerAssociationCallback,
                 binaryTranslationsCallback=self.binaryTranslationsCallback,
-                progLanguages=self.__supportedVariants[:])
-        
+                progLanguages=self.__supportedVariants[:],
+            )
+
         from Project.ProjectBrowser import (
-            SourcesBrowserFlag, FormsBrowserFlag, TranslationsBrowserFlag,
-            OthersBrowserFlag
+            SourcesBrowserFlag,
+            FormsBrowserFlag,
+            TranslationsBrowserFlag,
+            OthersBrowserFlag,
         )
+
         Preferences.setProjectBrowserFlagsDefault(
             "Pyramid",
-            SourcesBrowserFlag | FormsBrowserFlag |
-            TranslationsBrowserFlag | OthersBrowserFlag,
+            SourcesBrowserFlag
+            | FormsBrowserFlag
+            | TranslationsBrowserFlag
+            | OthersBrowserFlag,
         )
-        
+
         if self.__ericProject.isOpen():
             self.__projectOpened()
             self.__object.projectOpenedHooks()
-        
-        ericApp().getObject("Project").projectOpened.connect(
-            self.__projectOpened)
-        ericApp().getObject("Project").projectClosed.connect(
-            self.__projectClosed)
-        ericApp().getObject("Project").newProject.connect(
-            self.__projectOpened)
-        
+
+        ericApp().getObject("Project").projectOpened.connect(self.__projectOpened)
+        ericApp().getObject("Project").projectClosed.connect(self.__projectClosed)
+        ericApp().getObject("Project").newProject.connect(self.__projectOpened)
+
         ericApp().getObject("Project").projectOpenedHooks.connect(
-            self.__object.projectOpenedHooks)
+            self.__object.projectOpenedHooks
+        )
         ericApp().getObject("Project").projectClosedHooks.connect(
-            self.__object.projectClosedHooks)
+            self.__object.projectClosedHooks
+        )
         ericApp().getObject("Project").newProjectHooks.connect(
-            self.__object.projectOpenedHooks)
-        
+            self.__object.projectOpenedHooks
+        )
+
         return None, True
-    
+
     def deactivate(self):
         """
         Public method to deactivate this plugin.
         """
         ericApp().unregisterPluginObject("ProjectPyramid")
-        
-        ericApp().getObject("Project").projectOpened.disconnect(
-            self.__projectOpened)
-        ericApp().getObject("Project").projectClosed.disconnect(
-            self.__projectClosed)
-        ericApp().getObject("Project").newProject.disconnect(
-            self.__projectOpened)
-        
+
+        ericApp().getObject("Project").projectOpened.disconnect(self.__projectOpened)
+        ericApp().getObject("Project").projectClosed.disconnect(self.__projectClosed)
+        ericApp().getObject("Project").newProject.disconnect(self.__projectOpened)
+
         ericApp().getObject("Project").projectOpenedHooks.disconnect(
-            self.__object.projectOpenedHooks)
+            self.__object.projectOpenedHooks
+        )
         ericApp().getObject("Project").projectClosedHooks.disconnect(
-            self.__object.projectClosedHooks)
+            self.__object.projectClosedHooks
+        )
         ericApp().getObject("Project").newProjectHooks.disconnect(
-            self.__object.projectOpenedHooks)
-        
+            self.__object.projectOpenedHooks
+        )
+
         self.__ericProject.unregisterProjectType("Pyramid")
-        
+
         self.__object.projectClosedHooks()
         self.__projectClosed()
-        
+
         self.__initialize()
-    
+
     def __loadTranslator(self):
         """
         Private method to load the translation file.
@@ -255,7 +259,8 @@
             loc = self.__ui.getLocale()
             if loc and loc != "C":
                 locale_dir = os.path.join(
-                    os.path.dirname(__file__), "ProjectPyramid", "i18n")
+                    os.path.dirname(__file__), "ProjectPyramid", "i18n"
+                )
                 translation = "pyramid_{0}".format(loc)
                 translator = QTranslator(None)
                 loaded = translator.load(translation, locale_dir)
@@ -263,10 +268,13 @@
                     self.__translator = translator
                     ericApp().installTranslator(self.__translator)
                 else:
-                    print("Warning: translation file '{0}' could not be"    # __IGNORE_WARNING__
-                          " loaded.".format(translation))
-                    print("Using default.")                                 # __IGNORE_WARNING__
-    
+                    print(  # __IGNORE_WARNING__
+                        "Warning: translation file '{0}' could not be loaded.".format(
+                            translation
+                        )
+                    )
+                    print("Using default.")  # __IGNORE_WARNING__
+
     def __projectOpened(self):
         """
         Private slot to handle the projectOpened signal.
@@ -275,10 +283,10 @@
             projectToolsMenu = self.__ui.getMenu("project_tools")
             insertBeforeAct = projectToolsMenu.actions()[0]
             self.__mainAct = projectToolsMenu.insertMenu(
-                insertBeforeAct, self.__mainMenu)
-            self.__separatorAct = projectToolsMenu.insertSeparator(
-                insertBeforeAct)
-    
+                insertBeforeAct, self.__mainMenu
+            )
+            self.__separatorAct = projectToolsMenu.insertSeparator(insertBeforeAct)
+
     def __projectClosed(self):
         """
         Private slot to handle the projectClosed signal.
@@ -290,12 +298,12 @@
             self.__mainAct = None
             self.__separatorAct = None
             self.__object.projectClosed()
-    
+
     def fileTypesCallback(self):
         """
         Public method get the filetype associations of the Pyramid project
         type.
-        
+
         @return dictionary with file type associations
         @rtype dict
         """
@@ -313,12 +321,12 @@
             }
         else:
             return {}
-    
+
     def lexerAssociationCallback(self, filename):
         """
         Public method to get the lexer association of the Pyramid project type
         for a file.
-        
+
         @param filename name of the file
         @type str
         @return name of the lexer (Pygments lexers are prefixed with
@@ -328,14 +336,14 @@
         for pattern, language in self.lexerAssociations.items():
             if fnmatch.fnmatch(filename, pattern):
                 return language
-        
+
         return ""
-    
+
     def binaryTranslationsCallback(self, filename):
         """
         Public method to determine the filename of a compiled translation file
         given the translation source file.
-        
+
         @param filename name of the translation source file
         @type str
         @return name of the binary translation file
@@ -343,53 +351,56 @@
         """
         if filename.endswith(".po"):
             return filename.replace(".po", ".mo")
-        
+
         return filename
-    
+
     def getDefaultPreference(self, key):
         """
         Public method to get the default value for a setting.
-        
+
         @param key key of the value to get
         @type str
         @return value of the requested setting
         @rtype Any
         """
         return self.__defaults[key]
-    
+
     def getPreferences(self, key):
         """
         Public method to retrieve the various settings.
-        
+
         @param key key of the value to get
         @type str
         @return value of the requested setting
         @rtype Any
         """
         if key in ["UseExternalBrowser"]:
-            return Preferences.toBool(Preferences.Prefs.settings.value(
-                self.PreferencesKey + "/" + key, self.__defaults[key]))
+            return Preferences.toBool(
+                Preferences.Prefs.settings.value(
+                    self.PreferencesKey + "/" + key, self.__defaults[key]
+                )
+            )
         else:
             return Preferences.Prefs.settings.value(
-                self.PreferencesKey + "/" + key, self.__defaults[key])
-    
+                self.PreferencesKey + "/" + key, self.__defaults[key]
+            )
+
     def setPreferences(self, key, value):
         """
         Public method to store the various settings.
-        
+
         @param key key of the setting to be set
         @type str
         @param value value to be set
         @type Any
         """
-        Preferences.Prefs.settings.setValue(
-            self.PreferencesKey + "/" + key, value)
-        
+        Preferences.Prefs.settings.setValue(self.PreferencesKey + "/" + key, value)
+
         if key in ["VirtualEnvironmentNamePy3"]:
             self.__reregisterProjectType()
         elif key == "TranslationsEditor" and self.__object:
             self.__object.registerOpenHook()
-    
+
     def __reregisterProjectType(self):
         """
         Private method to re-register the project type.
@@ -398,21 +409,23 @@
         if supportedVariants != self.__supportedVariants:
             # step 1: unregister
             self.__ericProject.unregisterProjectType("Pyramid")
-            
+
             # step 2: register again with new language settings
             self.__supportedVariants = supportedVariants
             if self.__supportedVariants:
                 self.__ericProject.registerProjectType(
                     "Pyramid",
-                    self.tr("Pyramid"), self.fileTypesCallback,
+                    self.tr("Pyramid"),
+                    self.fileTypesCallback,
                     lexerAssociationCallback=self.lexerAssociationCallback,
                     binaryTranslationsCallback=self.binaryTranslationsCallback,
-                    progLanguages=self.__supportedVariants[:])
-    
+                    progLanguages=self.__supportedVariants[:],
+                )
+
     def getMenu(self, name):
         """
         Public method to get a reference to the requested menu.
-        
+
         @param name name of the menu
         @type str
         @return reference to the menu or None, if no menu with the given
@@ -423,11 +436,11 @@
             return self.__object.getMenu(name)
         else:
             return None
-    
+
     def getMenuNames(self):
         """
         Public method to get the names of all menus.
-        
+
         @return menu names
         @rtype list of str
         """
@@ -440,11 +453,11 @@
 def installDependencies(pipInstall):
     """
     Function to install dependencies of this plug-in.
-    
+
     @param pipInstall function to be called with a list of package names.
     @type function
     """
     try:
-        import cookiecutter         # __IGNORE_WARNING__
+        import cookiecutter  # __IGNORE_WARNING__
     except ImportError:
         pipInstall(["cookiecutter"])
--- a/PluginPyramid.epj	Thu Dec 30 12:17:44 2021 +0100
+++ b/PluginPyramid.epj	Wed Sep 21 16:24:54 2022 +0200
@@ -1,19 +1,21 @@
 {
   "header": {
     "comment": "eric project file for project PluginPyramid",
-    "copyright": "Copyright (C) 2021 Detlev Offenbach, detlev@die-offenbachs.de"
+    "copyright": "Copyright (C) 2022 Detlev Offenbach, detlev@die-offenbachs.de"
   },
   "project": {
     "AUTHOR": "Detlev Offenbach",
     "CHECKERSPARMS": {
       "Pep8Checker": {
         "AnnotationsChecker": {
+          "AllowStarArgAny": false,
           "AllowUntypedDefs": false,
           "AllowUntypedNested": false,
           "DispatchDecorators": [
             "singledispatch",
             "singledispatchmethod"
           ],
+          "ForceFutureAnnotations": false,
           "MaximumComplexity": 3,
           "MaximumLength": 7,
           "MinimumCoverage": 75,
@@ -59,20 +61,25 @@
         },
         "CopyrightAuthor": "",
         "CopyrightMinFileSize": 0,
-        "DocstringType": "eric",
+        "DocstringType": "eric_black",
         "EnabledCheckerCategories": "C, D, E, M, N, S, Y, W",
         "ExcludeFiles": "*/Ui_*.py, */*_rc.py",
-        "ExcludeMessages": "C101,E265,E266,E305,E402,M201,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,N802,N803,N807,N808,N821,W293,W504,Y401,Y402",
+        "ExcludeMessages": "C101,E265,E266,E305,E402,M201,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,N802,N803,N807,N808,N821,W293,W503,Y401,Y402",
         "FixCodes": "",
         "FixIssues": false,
         "FutureChecker": "",
         "HangClosing": false,
+        "ImportsChecker": {
+          "ApplicationPackageNames": [],
+          "BanRelativeImports": "",
+          "BannedModules": []
+        },
         "IncludeMessages": "",
         "LineComplexity": 25,
         "LineComplexityScore": 10,
         "MaxCodeComplexity": 10,
-        "MaxDocLineLength": 79,
-        "MaxLineLength": 79,
+        "MaxDocLineLength": 88,
+        "MaxLineLength": 88,
         "NoFixCodes": "E501",
         "RepeatMessages": true,
         "SecurityChecker": {
@@ -129,6 +136,7 @@
       }
     },
     "EMAIL": "detlev@die-offenbachs.de",
+    "EMBEDDED_VENV": false,
     "EOL": 1,
     "FILETYPES": {
       "*.epj": "OTHERS",
@@ -156,9 +164,9 @@
       "ProjectPyramid/CreateParametersDialog.ui",
       "ProjectPyramid/DistributionTypeSelectionDialog.ui",
       "ProjectPyramid/FormSelectionDialog.ui",
+      "ProjectPyramid/MigrateSummaryDialog.ui",
       "ProjectPyramid/PyramidDialog.ui",
-      "ProjectPyramid/PyramidRoutesDialog.ui",
-      "ProjectPyramid/MigrateSummaryDialog.ui"
+      "ProjectPyramid/PyramidRoutesDialog.ui"
     ],
     "HASH": "16b809c49f4985b2bd6959b37c5612f6b30e89b4",
     "IDLPARAMS": {
@@ -168,6 +176,7 @@
     },
     "INTERFACES": [],
     "LEXERASSOCS": {},
+    "LICENSE": "GNU General Public License v3 or later (GPLv3+)",
     "MAINSCRIPT": "PluginProjectPyramid.py",
     "MAKEPARAMS": {
       "MakeEnabled": false,
@@ -183,12 +192,6 @@
       "ChangeLog",
       "PKGLIST",
       "PluginProjectPyramid.zip",
-      "ProjectPyramid/Documentation/LICENSE.GPL3",
-      "ProjectPyramid/Documentation/source",
-      "ProjectPyramid/icons/pyramid-dark.svg",
-      "ProjectPyramid/icons/pyramid-light.svg",
-      "ProjectPyramid/icons/pyramid64-dark.svg",
-      "ProjectPyramid/icons/pyramid64-light.svg",
       "PluginPyramid.epj",
       "ProjectPyramid/APIs/Chameleon-3.9.1.api",
       "ProjectPyramid/APIs/Chameleon-3.9.1.bas",
@@ -200,6 +203,10 @@
       "ProjectPyramid/APIs/MarkupSafe-2.0.1.bas",
       "ProjectPyramid/APIs/PasteDeploy-2.1.1.api",
       "ProjectPyramid/APIs/PasteDeploy-2.1.1.bas",
+      "ProjectPyramid/APIs/Pyramid-2.0.api",
+      "ProjectPyramid/APIs/Pyramid-2.0.bas",
+      "ProjectPyramid/APIs/PyramidDebugToolbar-4.9.api",
+      "ProjectPyramid/APIs/PyramidDebugToolbar-4.9.bas",
       "ProjectPyramid/APIs/Pyramid_Chameleon-0.3.api",
       "ProjectPyramid/APIs/Pyramid_Chameleon-0.3.bas",
       "ProjectPyramid/APIs/Pyramid_Jinja2-2.8.api",
@@ -212,10 +219,6 @@
       "ProjectPyramid/APIs/Pyramid_TM-2.4.bas",
       "ProjectPyramid/APIs/Pyramid_ZODBConn-0.8.1.api",
       "ProjectPyramid/APIs/Pyramid_ZODBConn-0.8.1.bas",
-      "ProjectPyramid/APIs/Pyramid-2.0.api",
-      "ProjectPyramid/APIs/Pyramid-2.0.bas",
-      "ProjectPyramid/APIs/PyramidDebugToolbar-4.9.api",
-      "ProjectPyramid/APIs/PyramidDebugToolbar-4.9.bas",
       "ProjectPyramid/APIs/SQLAlchemy-1.4.17.api",
       "ProjectPyramid/APIs/SQLAlchemy-1.4.17.bas",
       "ProjectPyramid/APIs/TranslationString-1.4.api",
@@ -231,9 +234,32 @@
       "ProjectPyramid/APIs/ZODBPickle-2.0.0.api",
       "ProjectPyramid/APIs/ZODBPickle-2.0.0.bas",
       "ProjectPyramid/APIs/ZODBUri-2.5.0.api",
-      "ProjectPyramid/APIs/ZODBUri-2.5.0.bas"
+      "ProjectPyramid/APIs/ZODBUri-2.5.0.bas",
+      "ProjectPyramid/Documentation/LICENSE.GPL3",
+      "ProjectPyramid/Documentation/source",
+      "ProjectPyramid/icons/pyramid-dark.svg",
+      "ProjectPyramid/icons/pyramid-light.svg",
+      "ProjectPyramid/icons/pyramid64-dark.svg",
+      "ProjectPyramid/icons/pyramid64-light.svg"
     ],
-    "OTHERTOOLSPARMS": {},
+    "OTHERTOOLSPARMS": {
+      "Black": {
+        "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|_build|buck-out|build|dist|__pypackages__)/",
+        "extend-exclude": "",
+        "force-exclude": "",
+        "line-length": 88,
+        "skip-magic-trailing-comma": false,
+        "skip-string-normalization": false,
+        "source": "project",
+        "target-version": [
+          "py311",
+          "py310",
+          "py39",
+          "py38",
+          "py37"
+        ]
+      }
+    },
     "PACKAGERSPARMS": {},
     "PROGLANGUAGE": "Python3",
     "PROJECTTYPE": "E7Plugin",
@@ -253,28 +279,29 @@
       "ProjectPyramid/CreateParametersDialog.py",
       "ProjectPyramid/DistributionTypeSelectionDialog.py",
       "ProjectPyramid/FormSelectionDialog.py",
+      "ProjectPyramid/MigrateSummaryDialog.py",
       "ProjectPyramid/Project.py",
       "ProjectPyramid/PyramidDialog.py",
       "ProjectPyramid/PyramidRoutesDialog.py",
       "ProjectPyramid/__init__.py",
-      "__init__.py",
-      "ProjectPyramid/MigrateSummaryDialog.py"
+      "__init__.py"
     ],
     "SPELLEXCLUDES": "",
     "SPELLLANGUAGE": "en_US",
     "SPELLWORDS": "",
+    "TESTING_FRAMEWORK": "",
     "TRANSLATIONEXCEPTIONS": [],
     "TRANSLATIONPATTERN": "ProjectPyramid/i18n/pyramid_%language%.ts",
     "TRANSLATIONS": [
       "ProjectPyramid/i18n/pyramid_de.qm",
       "ProjectPyramid/i18n/pyramid_de.ts",
+      "ProjectPyramid/i18n/pyramid_empty.ts",
       "ProjectPyramid/i18n/pyramid_en.qm",
       "ProjectPyramid/i18n/pyramid_en.ts",
       "ProjectPyramid/i18n/pyramid_es.qm",
       "ProjectPyramid/i18n/pyramid_es.ts",
       "ProjectPyramid/i18n/pyramid_ru.qm",
-      "ProjectPyramid/i18n/pyramid_ru.ts",
-      "ProjectPyramid/i18n/pyramid_empty.ts"
+      "ProjectPyramid/i18n/pyramid_ru.ts"
     ],
     "TRANSLATIONSBINPATH": "",
     "UICPARAMS": {
--- a/ProjectPyramid/ConfigurationPage/PyramidPage.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/ConfigurationPage/PyramidPage.py	Wed Sep 21 16:24:54 2022 +0200
@@ -12,9 +12,7 @@
 from EricWidgets.EricApplication import ericApp
 from EricWidgets.EricPathPicker import EricPathPickerModes
 
-from Preferences.ConfigurationPages.ConfigurationPageBase import (
-    ConfigurationPageBase
-)
+from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase
 from .Ui_PyramidPage import Ui_PyramidPage
 
 import UI.PixmapCache
@@ -26,19 +24,20 @@
     """
     Class implementing the Pyramid configuration page.
     """
+
     def __init__(self, plugin):
         """
         Constructor
-        
+
         @param plugin reference to the plugin object
         @type ProjectPyramidPlugin
         """
         super().__init__()
         self.setupUi(self)
         self.setObjectName("PyramidPage")
-        
+
         self.__plugin = plugin
-        
+
         consoleList = []
         if isWindowsPlatform():
             consoleList.append("cmd.exe /c")
@@ -53,72 +52,78 @@
             consoleList.append("xfce4-terminal -e")
             consoleList.append("xterm -e")
         self.consoleCommandCombo.addItems(consoleList)
-        
+
         self.urlResetButton.setIcon(UI.PixmapCache.getIcon("editUndo"))
-        
+
         self.py3ShellCombo.addItem(self.tr("Plain Python"), "python")
         self.py3ShellCombo.addItem(self.tr("IPython"), "ipython")
         self.py3ShellCombo.addItem(self.tr("bpython"), "bpython")
-        
+
         venvManager = ericApp().getObject("VirtualEnvManager")
-        
+
         self.py3VenvNameComboBox.addItems(
-            [""] + sorted(venvManager.getVirtualenvNames()))
-        
-        self.translationsEditorPicker.setMode(
-            EricPathPickerModes.OPEN_FILE_MODE)
+            [""] + sorted(venvManager.getVirtualenvNames())
+        )
+
+        self.translationsEditorPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
         self.translationsEditorPicker.setFilters(self.tr("All Files (*)"))
-        
+
         # set initial values
         self.consoleCommandCombo.setEditText(
-            self.__plugin.getPreferences("ConsoleCommand"))
-        
+            self.__plugin.getPreferences("ConsoleCommand")
+        )
+
         self.externalBrowserCheckBox.setChecked(
-            self.__plugin.getPreferences("UseExternalBrowser"))
-        
-        venvName = self.__plugin.getPreferences(
-            "VirtualEnvironmentNamePy3")
+            self.__plugin.getPreferences("UseExternalBrowser")
+        )
+
+        venvName = self.__plugin.getPreferences("VirtualEnvironmentNamePy3")
         if venvName:
             index = self.py3VenvNameComboBox.findText(venvName)
             if index < 0:
                 index = 0
             self.py3VenvNameComboBox.setCurrentIndex(index)
-        self.py3ShellCombo.setCurrentIndex(self.py3ShellCombo.findData(
-            self.__plugin.getPreferences("Python3ConsoleType")))
-        
-        self.urlEdit.setText(
-            self.__plugin.getPreferences("PyramidDocUrl"))
-        
+        self.py3ShellCombo.setCurrentIndex(
+            self.py3ShellCombo.findData(
+                self.__plugin.getPreferences("Python3ConsoleType")
+            )
+        )
+
+        self.urlEdit.setText(self.__plugin.getPreferences("PyramidDocUrl"))
+
         self.translationsEditorPicker.setText(
-            self.__plugin.getPreferences("TranslationsEditor"))
-    
+            self.__plugin.getPreferences("TranslationsEditor")
+        )
+
     def save(self):
         """
         Public slot to save the Pyramid configuration.
         """
         self.__plugin.setPreferences(
-            "ConsoleCommand", self.consoleCommandCombo.currentText())
-        
+            "ConsoleCommand", self.consoleCommandCombo.currentText()
+        )
+
         self.__plugin.setPreferences(
-            "UseExternalBrowser", self.externalBrowserCheckBox.isChecked())
-        
+            "UseExternalBrowser", self.externalBrowserCheckBox.isChecked()
+        )
+
         self.__plugin.setPreferences(
-            "VirtualEnvironmentNamePy3",
-            self.py3VenvNameComboBox.currentText())
+            "VirtualEnvironmentNamePy3", self.py3VenvNameComboBox.currentText()
+        )
         self.__plugin.setPreferences(
             "Python3ConsoleType",
-            self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex()))
-        
+            self.py3ShellCombo.itemData(self.py3ShellCombo.currentIndex()),
+        )
+
+        self.__plugin.setPreferences("PyramidDocUrl", self.urlEdit.text())
+
         self.__plugin.setPreferences(
-            "PyramidDocUrl", self.urlEdit.text())
-        
-        self.__plugin.setPreferences(
-            "TranslationsEditor", self.translationsEditorPicker.text())
-    
+            "TranslationsEditor", self.translationsEditorPicker.text()
+        )
+
     @pyqtSlot()
     def on_urlResetButton_clicked(self):
         """
         Private slot to reset the Pyramid documentation URL.
         """
-        self.urlEdit.setText(
-            self.__plugin.getDefaultPreference("PyramidDocUrl"))
+        self.urlEdit.setText(self.__plugin.getDefaultPreference("PyramidDocUrl"))
--- a/ProjectPyramid/CreateParametersDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/CreateParametersDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -17,101 +17,104 @@
     """
     Class implementing a dialog for entering the create parameters.
     """
+
     PyramidStarterGH = "gh:Pylons/pyramid-cookiecutter-starter"
     PyramidStarter = "pyramid-cookiecutter-starter"
     PyramidStarterZip = "pyramid-cookiecutter-starter.zip"
-    
+
     def __init__(self, parent=None):
         """
         Constructor
-        
+
         @param parent reference to the parent widget
         @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
-        
-        self.__okButton = self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok)
+
+        self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
         self.__okButton.setEnabled(False)
-        
-        self.templateCombo.addItems([
-            "",
-            CreateParametersDialog.PyramidStarter,
-            CreateParametersDialog.PyramidStarterGH,
-            CreateParametersDialog.PyramidStarterZip,
-        ])
-        
+
+        self.templateCombo.addItems(
+            [
+                "",
+                CreateParametersDialog.PyramidStarter,
+                CreateParametersDialog.PyramidStarterGH,
+                CreateParametersDialog.PyramidStarterZip,
+            ]
+        )
+
         self.templateLanguageCombo.addItem("Jinja2", "jinja")
         self.templateLanguageCombo.addItem("Chameleon", "chameleon")
         self.templateLanguageCombo.addItem("Mako", "mako")
-        
+
         self.backendCombo.addItem(self.tr("No Database"), "none")
         self.backendCombo.addItem("SQLAlchemy", "sqlalchemy")
         self.backendCombo.addItem("ZODB", "zodb")
-        
+
         self.starterGroupBox.setEnabled(False)
-        
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-    
+
     @pyqtSlot(str)
     def on_templateCombo_currentTextChanged(self, text):
         """
         Private slot to handle changes of the selected scaffold.
-        
+
         @param text text of the combo box
         @type str
         """
         self.__updateUi()
-    
+
     def __updateUi(self):
         """
         Private slot to update the dialog.
         """
         template = self.templateCombo.currentText()
-        
+
         self.__okButton.setEnabled(bool(template))
-        
+
         self.starterGroupBox.setEnabled(
-            CreateParametersDialog.PyramidStarter in template)
-        
-        self.versionEdit.setEnabled(
-            template == CreateParametersDialog.PyramidStarterGH)
-    
+            CreateParametersDialog.PyramidStarter in template
+        )
+
+        self.versionEdit.setEnabled(template == CreateParametersDialog.PyramidStarterGH)
+
     def getData(self):
         """
         Public method to get the data.
-        
+
         @return tuple giving the template name, an optional template version,
             a flag indicating to overwrite existing files and a dictionary
             containing additional context data
         @rtype tuple of (str, str, bool)
         """
         template = self.templateCombo.currentText()
-        
+
         contextData = (
             {
                 "project_name": self.projectEdit.text(),
                 "repo_name": (
-                    self.projectEdit.text().lower().strip().replace(' ', '_')
-                    .replace(':', '_').replace('-', '_').replace('!', '_')),
+                    self.projectEdit.text()
+                    .lower()
+                    .strip()
+                    .replace(" ", "_")
+                    .replace(":", "_")
+                    .replace("-", "_")
+                    .replace("!", "_")
+                ),
                 "template_language": self.templateLanguageCombo.currentData(),
                 "backend": self.backendCombo.currentData(),
             }
-            if CreateParametersDialog.PyramidStarter in template else
-            {}
+            if CreateParametersDialog.PyramidStarter in template
+            else {}
         )
-        
+
         version = (
             self.versionEdit.text()
-            if template == CreateParametersDialog.PyramidStarterGH else
-            ""
+            if template == CreateParametersDialog.PyramidStarterGH
+            else ""
         )
-        
-        return (
-            template,
-            version,
-            self.overwriteCheckBox.isChecked(),
-            contextData
-        )
+
+        return (template, version, self.overwriteCheckBox.isChecked(), contextData)
--- a/ProjectPyramid/DistributionTypeSelectionDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/DistributionTypeSelectionDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -12,22 +12,20 @@
 
 from EricWidgets import EricMessageBox
 
-from .Ui_DistributionTypeSelectionDialog import (
-    Ui_DistributionTypeSelectionDialog
-)
+from .Ui_DistributionTypeSelectionDialog import Ui_DistributionTypeSelectionDialog
 
 import Preferences
 
 
-class DistributionTypeSelectionDialog(
-        QDialog, Ui_DistributionTypeSelectionDialog):
+class DistributionTypeSelectionDialog(QDialog, Ui_DistributionTypeSelectionDialog):
     """
     Class implementing a dialog to select the distribution file formats.
     """
+
     def __init__(self, project, projectPath, parent=None):
         """
         Constructor
-        
+
         @param project reference to the project object
         @type Project
         @param projectPath path of the Pyramid project
@@ -37,12 +35,11 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         errMsg = ""
         proc = QProcess()
         cmd = project.getPyramidCommand(
-            "python",
-            virtualEnv=project.getProjectVirtualEnvironment()
+            "python", virtualEnv=project.getProjectVirtualEnvironment()
         )
         args = []
         args.append("setup.py")
@@ -54,37 +51,37 @@
         if procStarted:
             finished = proc.waitForFinished(30000)
             if finished and proc.exitCode() == 0:
-                output = str(proc.readAllStandardOutput(),
-                             Preferences.getSystem("IOEncoding"),
-                             'replace')
+                output = str(
+                    proc.readAllStandardOutput(),
+                    Preferences.getSystem("IOEncoding"),
+                    "replace",
+                )
             else:
                 if not finished:
                     errMsg = self.tr(
-                        "The python setup.py command did not finish within"
-                        " 30s.")
+                        "The python setup.py command did not finish within" " 30s."
+                    )
         else:
             errMsg = self.tr("Could not start the python executable.")
         if not errMsg:
             for line in output.splitlines():
                 line = line.strip()
                 if line.startswith("--formats="):
-                    fileFormat, description = (
-                        line.replace("--formats=", "").split(None, 1))
+                    fileFormat, description = line.replace("--formats=", "").split(
+                        None, 1
+                    )
                     itm = QListWidgetItem(
-                        "{0} ({1})".format(fileFormat, description),
-                        self.formatsList)
+                        "{0} ({1})".format(fileFormat, description), self.formatsList
+                    )
                     itm.setFlags(itm.flags() | Qt.ItemFlag.ItemIsUserCheckable)
                     itm.setCheckState(Qt.CheckState.Unchecked)
         else:
-            EricMessageBox.critical(
-                None,
-                self.tr('Process Generation Error'),
-                errMsg)
-    
+            EricMessageBox.critical(None, self.tr("Process Generation Error"), errMsg)
+
     def getFormats(self):
         """
         Public method to retrieve the checked formats.
-        
+
         @return list of selected formats
         @rtype list of str
         """
@@ -95,5 +92,5 @@
                 fileFormat = itm.text().split(None, 1)[0].strip()
                 if fileFormat:
                     formats.append(fileFormat)
-        
+
         return formats
--- a/ProjectPyramid/FormSelectionDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/FormSelectionDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -17,152 +17,152 @@
     """
     Class implementing a dialog to select the template type.
     """
+
     def __init__(self, parent=None):
         """
         Constructor
-        
+
         @param parent reference to the parent widget
         @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.__templates = {
             "html5": [
                 self.tr("Standard HTML 5 template"),
-                '''<!DOCTYPE html>\n'''
-                '''  <head>\n'''
-                '''    <title></title>\n'''
-                '''    <style>\n'''
-                '''    </style>\n'''
-                '''  </head>\n'''
-                '''\n'''
-                '''  <body>\n'''
-                '''  </body>\n'''
-                '''</html>\n'''
+                """<!DOCTYPE html>\n"""
+                """  <head>\n"""
+                """    <title></title>\n"""
+                """    <style>\n"""
+                """    </style>\n"""
+                """  </head>\n"""
+                """\n"""
+                """  <body>\n"""
+                """  </body>\n"""
+                """</html>\n""",
             ],
             "simple": [
                 self.tr("Standard HTML template"),
-                '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n'''
-                ''' "http://www.w3.org/TR/html4/strict.dtd">\n'''
-                '''  <head>\n'''
-                '''    <title></title>\n'''
-                '''    <style>\n'''
-                '''    </style>\n'''
-                '''  </head>\n'''
-                '''\n'''
-                '''  <body>\n'''
-                '''  </body>\n'''
-                '''</html>\n'''
+                """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n"""
+                """ "http://www.w3.org/TR/html4/strict.dtd">\n"""
+                """  <head>\n"""
+                """    <title></title>\n"""
+                """    <style>\n"""
+                """    </style>\n"""
+                """  </head>\n"""
+                """\n"""
+                """  <body>\n"""
+                """  </body>\n"""
+                """</html>\n""",
             ],
             "complex": [
                 self.tr("Chameleon template"),
-                '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0'''
-                ''' Strict//EN"\n'''
-                ''' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'''
+                """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0"""
+                """ Strict//EN"\n"""
+                """ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n"""
                 '''<html xmlns="http://www.w3.org/1999/xhtml"'''
-                ''' xml:lang="en"\n'''
-                '''      xmlns:tal="http://xml.zope.org/namespaces/tal">\n'''
-                '''      xmlns:metal="http://xml.zope.org/namespaces/'''
-                '''metal">\n'''
-                '''<head>\n'''
-                '''  <title>The Pyramid Web Application Development'''
-                ''' Framework</title>\n'''
-                '''  <meta http-equiv="Content-Type"\n'''
-                '''    content="text/html;charset=UTF-8"/>\n'''
+                """ xml:lang="en"\n"""
+                """      xmlns:tal="http://xml.zope.org/namespaces/tal">\n"""
+                """      xmlns:metal="http://xml.zope.org/namespaces/"""
+                """metal">\n"""
+                """<head>\n"""
+                """  <title>The Pyramid Web Application Development"""
+                """ Framework</title>\n"""
+                """  <meta http-equiv="Content-Type"\n"""
+                """    content="text/html;charset=UTF-8"/>\n"""
                 '''  <meta name="keywords" content="python web application"'''
-                ''' />\n'''
-                '''  <meta name="description" content="pyramid web'''
-                ''' application" />\n'''
-                '''  <link rel="shortcut icon"\n'''
-                '''    href="${request.static_url('site:static/'''
-                '''favicon.ico')}" />\n'''
-                '''  <link rel="stylesheet"\n'''
-                '''    href="${request.static_url('site:static/'''
-                '''pylons.css')}"\n'''
-                '''    type="text/css" media="screen" charset="utf-8" />\n'''
-                '''  <link rel="stylesheet"\n'''
-                '''    href="http://static.pylonsproject.org/fonts/nobile/'''
-                '''stylesheet.css"\n'''
-                '''    media="screen" />\n'''
-                '''  <link rel="stylesheet"\n'''
-                '''    href="http://static.pylonsproject.org/fonts/neuton/'''
-                '''stylesheet.css"\n'''
-                '''    media="screen" />\n'''
-                '''  <!--[if lte IE 6]>\n'''
-                '''  <link rel="stylesheet"\n'''
-                '''    href="${request.static_url('site:static/ie6.css')}"\n'''
-                '''    type="text/css" media="screen" charset="utf-8" />\n'''
-                '''  <![endif]-->\n'''
-                '''</head>\n'''
-                '''<body>\n'''
-                '''  <div id="wrap">\n'''
-                '''    <div id="top">\n'''
-                '''    </div>\n'''
-                '''    <div id="middle">\n'''
-                '''    </div>\n'''
-                '''    <div id="bottom">\n'''
-                '''    </div>\n'''
-                '''  </div>\n'''
-                '''  <div id="footer">\n'''
-                '''    <div class="footer">&copy; Copyright 2012, Somebody.'''
-                '''</div>\n'''
-                '''  </div>\n'''
-                '''</body>\n'''
-                '''</html>\n'''
+                """ />\n"""
+                """  <meta name="description" content="pyramid web"""
+                """ application" />\n"""
+                """  <link rel="shortcut icon"\n"""
+                """    href="${request.static_url('site:static/"""
+                """favicon.ico')}" />\n"""
+                """  <link rel="stylesheet"\n"""
+                """    href="${request.static_url('site:static/"""
+                """pylons.css')}"\n"""
+                """    type="text/css" media="screen" charset="utf-8" />\n"""
+                """  <link rel="stylesheet"\n"""
+                """    href="http://static.pylonsproject.org/fonts/nobile/"""
+                """stylesheet.css"\n"""
+                """    media="screen" />\n"""
+                """  <link rel="stylesheet"\n"""
+                """    href="http://static.pylonsproject.org/fonts/neuton/"""
+                """stylesheet.css"\n"""
+                """    media="screen" />\n"""
+                """  <!--[if lte IE 6]>\n"""
+                """  <link rel="stylesheet"\n"""
+                """    href="${request.static_url('site:static/ie6.css')}"\n"""
+                """    type="text/css" media="screen" charset="utf-8" />\n"""
+                """  <![endif]-->\n"""
+                """</head>\n"""
+                """<body>\n"""
+                """  <div id="wrap">\n"""
+                """    <div id="top">\n"""
+                """    </div>\n"""
+                """    <div id="middle">\n"""
+                """    </div>\n"""
+                """    <div id="bottom">\n"""
+                """    </div>\n"""
+                """  </div>\n"""
+                """  <div id="footer">\n"""
+                """    <div class="footer">&copy; Copyright 2012, Somebody."""
+                """</div>\n"""
+                """  </div>\n"""
+                """</body>\n"""
+                """</html>\n""",
             ],
             "sections": [
                 self.tr("Mako template with sections"),
-                '''## -*- coding: utf-8 -*-\n'''
-                '''\n'''
-                '''<!DOCTYPE html>\n'''
-                '''<html>\n'''
-                '''<head>\n'''
-                '''    <title>${self.title()}</title>\n'''
-                '''    ${self.head()}\n'''
-                '''</head>\n'''
-                '''<body>\n'''
-                '''    ${self.header()}\n'''
-                '''    ${self.tabs()}\n'''
-                '''    ${self.menu()}\n'''
-                '''    ${self.heading()}\n'''
-                '''    ${self.breadcrumbs()}\n'''
-                '''    ${next.body()}\n'''
-                '''    ${self.footer()}\n'''
-                '''</body>\n'''
-                '''</html>\n'''
-                '''\n'''
-                '''<%def name="title()">SimpleSite</%def>\n'''
-                '''<%def name="head()"></%def>\n'''
-                '''<%def name="header()"><a name="top"></a></%def>\n'''
-                '''<%def name="tabs()"></%def>\n'''
-                '''<%def name="menu()"></%def>\n'''
-                '''<%def name="heading()"><h1>${c.heading or 'No Title'}'''
-                '''</h1></%def>\n'''
-                '''<%def name="breadcrumbs()"></%def>\n'''
-                '''<%def name="footer()"><p><a href="#top">Top ^</a></p>'''
-                '''</%def>\n'''
+                """## -*- coding: utf-8 -*-\n"""
+                """\n"""
+                """<!DOCTYPE html>\n"""
+                """<html>\n"""
+                """<head>\n"""
+                """    <title>${self.title()}</title>\n"""
+                """    ${self.head()}\n"""
+                """</head>\n"""
+                """<body>\n"""
+                """    ${self.header()}\n"""
+                """    ${self.tabs()}\n"""
+                """    ${self.menu()}\n"""
+                """    ${self.heading()}\n"""
+                """    ${self.breadcrumbs()}\n"""
+                """    ${next.body()}\n"""
+                """    ${self.footer()}\n"""
+                """</body>\n"""
+                """</html>\n"""
+                """\n"""
+                """<%def name="title()">SimpleSite</%def>\n"""
+                """<%def name="head()"></%def>\n"""
+                """<%def name="header()"><a name="top"></a></%def>\n"""
+                """<%def name="tabs()"></%def>\n"""
+                """<%def name="menu()"></%def>\n"""
+                """<%def name="heading()"><h1>${c.heading or 'No Title'}"""
+                """</h1></%def>\n"""
+                """<%def name="breadcrumbs()"></%def>\n"""
+                """<%def name="footer()"><p><a href="#top">Top ^</a></p>"""
+                """</%def>\n""",
             ],
         }
-        
-        self.__okButton = self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok)
+
+        self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
         self.__okButton.setEnabled(False)
-        
+
         templates = {}
         for templateType in self.__templates:
             templates[self.__templates[templateType][0]] = templateType
-        
+
         self.typeCombo.addItem("")
         for templateString, templateType in sorted(templates.items()):
             self.typeCombo.addItem(templateString, templateType)
         self.typeCombo.setCurrentIndex(0)
-    
+
     @pyqtSlot(int)
     def on_typeCombo_currentIndexChanged(self, index):
         """
         Private slot to act upon a change of the selected template type.
-        
+
         @param index selected index
         @type int
         """
@@ -177,7 +177,7 @@
     def getTemplateText(self):
         """
         Public method to get the template text.
-        
+
         @return text of the template
         @rtype str
         """
--- a/ProjectPyramid/MigrateSummaryDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/MigrateSummaryDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -10,8 +10,11 @@
 from PyQt6.QtCore import pyqtSlot, Qt, QProcess, QEventLoop, QTimer
 from PyQt6.QtGui import QGuiApplication
 from PyQt6.QtWidgets import (
-    QDialog, QDialogButtonBox, QAbstractButton, QTreeWidgetItem,
-    QAbstractItemView
+    QDialog,
+    QDialogButtonBox,
+    QAbstractButton,
+    QTreeWidgetItem,
+    QAbstractItemView,
 )
 
 from EricGui.EricOverrideCursor import EricOverrideCursor, EricOverridenCursor
@@ -24,10 +27,11 @@
     """
     Class implementing a dialog showing a summary of all created.migrations.
     """
+
     def __init__(self, project, parent=None):
         """
         Constructor
-        
+
         @param project reference to the project object
         @type Project
         @param parent reference to the parent widget
@@ -35,53 +39,51 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
+
         self.__refreshButton = self.buttonBox.addButton(
-            self.tr("Refresh"), QDialogButtonBox.ButtonRole.ActionRole)
+            self.tr("Refresh"), QDialogButtonBox.ButtonRole.ActionRole
+        )
         self.__refreshButton.clicked.connect(self.showSummary)
-        
+
         self.__project = project
-        
+
         self.__process = None
         self.__currentItemIndex = 1000000
         self.__currentRevision = ""
-    
+
     def showSummary(self):
         """
         Public method to show the migrations summary.
         """
         projectPath = self.__project.projectPath()
-        
+
         self.show()
         self.raise_()
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setFocus(
-                Qt.FocusReason.OtherFocusReason)
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
         QGuiApplication.processEvents(
-            QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents)
-        
+            QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents
+        )
+
         command = self.__project.getAlembicCommand()
-        
+
         self.__process = QProcess()
         self.__process.setWorkingDirectory(projectPath)
-        
+
         args = ["-c", "development.ini", "history", "--indicate-current"]
-        
+
         with EricOverrideCursor():
             self.__process.start(command, args)
             ok = self.__process.waitForStarted(10000)
             if ok:
                 ok = self.__process.waitForFinished(10000)
                 if ok:
-                    out = str(self.__process.readAllStandardOutput(),
-                              "utf-8")
+                    out = str(self.__process.readAllStandardOutput(), "utf-8")
                     self.__processOutput(out)
                     self.__selectItem(self.__currentRevision)
                 else:
@@ -89,33 +91,35 @@
                         EricMessageBox.critical(
                             None,
                             self.tr("Migrations Summary"),
-                            self.tr("""The 'alembic' process did not finish"""
-                                    """ within 10 seconds."""))
+                            self.tr(
+                                """The 'alembic' process did not finish"""
+                                """ within 10 seconds."""
+                            ),
+                        )
             else:
                 with EricOverridenCursor():
                     EricMessageBox.critical(
                         None,
                         self.tr("Migrations Summary"),
-                        self.tr("""The 'alembic' process could not be"""
-                                """ started."""))
+                        self.tr(
+                            """The 'alembic' process could not be""" """ started."""
+                        ),
+                    )
             for column in range(self.summaryWidget.columnCount()):
                 self.summaryWidget.resizeColumnToContents(column)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setFocus(
-                Qt.FocusReason.OtherFocusReason)
-    
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
+
     def __processOutput(self, output):
         """
         Private method to process the flask output and populate the summary
         list.
-        
+
         @param output output of the flask process
         @type str
         """
@@ -123,7 +127,7 @@
         self.upDownButton.setEnabled(False)
         self.__currentItemIndex = 1000000
         self.__currentRevision = ""
-        
+
         lines = output.splitlines()
         for line in lines:
             isCurrent = False
@@ -132,32 +136,32 @@
             newRev, *labels = rest.split()
             if labels:
                 labelList = [
-                    label.replace("(", "").replace(")", "")
-                    for label in labels
+                    label.replace("(", "").replace(")", "") for label in labels
                 ]
                 labelsStr = ", ".join(labelList)
                 if "current" in labelList:
                     isCurrent = True
             else:
                 labelsStr = ""
-            
-            itm = QTreeWidgetItem(self.summaryWidget, [
-                oldRev.strip(),
-                newRev.strip(),
-                message.strip(),
-                labelsStr,
-            ])
+
+            itm = QTreeWidgetItem(
+                self.summaryWidget,
+                [
+                    oldRev.strip(),
+                    newRev.strip(),
+                    message.strip(),
+                    labelsStr,
+                ],
+            )
             if isCurrent:
                 font = itm.font(0)
                 font.setBold(True)
                 for column in range(self.summaryWidget.columnCount()):
                     itm.setFont(column, font)
-                
-                self.__currentItemIndex = (
-                    self.summaryWidget.indexOfTopLevelItem(itm)
-                )
+
+                self.__currentItemIndex = self.summaryWidget.indexOfTopLevelItem(itm)
                 self.__currentRevision = newRev.strip()
-    
+
     @pyqtSlot()
     def on_summaryWidget_itemSelectionChanged(self):
         """
@@ -173,7 +177,7 @@
             self.upDownButton.setEnabled(index != self.__currentItemIndex)
         else:
             self.upDownButton.setEnabled(False)
-    
+
     @pyqtSlot()
     def on_upDownButton_clicked(self):
         """
@@ -186,47 +190,45 @@
         else:
             self.__project.downgradeDatabase(revision=rev)
         self.showSummary()
-    
+
     @pyqtSlot(QAbstractButton)
     def on_buttonBox_clicked(self, button):
         """
         Private slot handling a button press of the button box.
-        
+
         @param button reference to the pressed button
         @type QAbstractButton
         """
-        if button is self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel
-        ):
+        if button is self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
             self.__cancelProcess()
-    
+
     @pyqtSlot()
     def __cancelProcess(self):
         """
         Private slot to terminate the current process.
         """
         if (
-            self.__process is not None and
-            self.__process.state() != QProcess.ProcessState.NotRunning
+            self.__process is not None
+            and self.__process.state() != QProcess.ProcessState.NotRunning
         ):
             self.__process.terminate()
             QTimer.singleShot(2000, self.__process.kill)
             self.__process.waitForFinished(3000)
-        
+
         self.__process = None
-    
+
     def __selectItem(self, revision):
         """
         Private method to select an item given its revision.
-        
+
         @param revision revision of the item to select
         @type str
         """
         if revision:
-            items = self.summaryWidget.findItems(
-                revision, Qt.MatchFlag.MatchExactly, 1)
+            items = self.summaryWidget.findItems(revision, Qt.MatchFlag.MatchExactly, 1)
             if items:
                 # select the first item
                 items[0].setSelected(True)
                 self.summaryWidget.scrollToItem(
-                    items[0], QAbstractItemView.ScrollHint.PositionAtCenter)
+                    items[0], QAbstractItemView.ScrollHint.PositionAtCenter
+                )
--- a/ProjectPyramid/Project.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/Project.py	Wed Sep 21 16:24:54 2022 +0200
@@ -12,12 +12,10 @@
 import glob
 import os
 import re
-import subprocess       # secok
+import subprocess  # secok
 import sys
 
-from PyQt6.QtCore import (
-    pyqtSlot, QObject, QFileInfo, QTimer, QUrl, QIODeviceBase
-)
+from PyQt6.QtCore import pyqtSlot, QObject, QFileInfo, QTimer, QUrl, QIODeviceBase
 from PyQt6.QtGui import QDesktopServices
 from PyQt6.QtWidgets import QMenu, QDialog, QInputDialog, QLineEdit
 from PyQt6.QtCore import QProcess as QProcessPyQt
@@ -34,10 +32,11 @@
 import UI.PixmapCache
 
 
-class PyramidNoProjectSelectedException(Exception):
+class PyramidNoProjectSelectedError(Exception):
     """
     Exception thrown to signal, that there is no current Pyramid project.
     """
+
     pass
 
 
@@ -45,11 +44,12 @@
     """
     Class transforming the call arguments in case of gnome-terminal.
     """
+
     def start(self, cmd, args=None, mode=QIODeviceBase.OpenModeFlag.ReadWrite):
         """
         Public method to start the given program (cmd) in a new process, if
         none is already running, passing the command line arguments in args.
-        
+
         @param cmd start the given program cmd
         @type str
         @param args list of parameters
@@ -59,24 +59,25 @@
         """
         if args is None:
             args = []
-        
+
         if (
-            cmd.endswith(('gnome-terminal', 'konsole', 'xfce4-terminal',
-                          'mate-terminal')) and
-            '-e' in args
+            cmd.endswith(
+                ("gnome-terminal", "konsole", "xfce4-terminal", "mate-terminal")
+            )
+            and "-e" in args
         ):
-            index = args.index('-e') + 1
-            cargs = ' '.join(args[index:])
+            index = args.index("-e") + 1
+            cargs = " ".join(args[index:])
             args[index:] = [cargs]
-        
+
         super().start(cmd, args, mode)
-    
+
     @staticmethod
-    def startDetached(cmd, args=None, path=''):
+    def startDetached(cmd, args=None, path=""):
         """
         Public static method to start the given program (cmd) in a new process,
         if none is already running, passing the command line arguments in args.
-        
+
         @param cmd start the given program cmd
         @type str
         @param args list of parameters
@@ -88,16 +89,17 @@
         """
         if args is None:
             args = []
-        
+
         if (
-            cmd.endswith(('gnome-terminal', 'konsole', 'xfce4-terminal',
-                          'mate-terminal')) and
-            '-e' in args
+            cmd.endswith(
+                ("gnome-terminal", "konsole", "xfce4-terminal", "mate-terminal")
+            )
+            and "-e" in args
         ):
-            index = args.index('-e') + 1
-            cargs = ' '.join(args[index:])
+            index = args.index("-e") + 1
+            cargs = " ".join(args[index:])
             args[index:] = [cargs]
-        
+
         return QProcessPyQt.startDetached(cmd, args, path)
 
 
@@ -105,10 +107,11 @@
     """
     Class implementing the Pyramid project support.
     """
+
     def __init__(self, plugin, iconSuffix, parent=None):
         """
         Constructor
-        
+
         @param plugin reference to the plugin object
         @type ProjectPyramidPlugin
         @param iconSuffix suffix for the icons
@@ -117,341 +120,438 @@
         @type QObject
         """
         super().__init__(parent)
-        
+
         self.__plugin = plugin
         self.__iconSuffix = iconSuffix
         self.__ui = parent
         self.__ericProject = ericApp().getObject("Project")
         self.__virtualEnvManager = ericApp().getObject("VirtualEnvManager")
         self.__hooksInstalled = False
-        
-        self.__menus = {}   # dictionary with references to menus
-        
+
+        self.__menus = {}  # dictionary with references to menus
+
         self.__serverProc = None
-        
+
         self.__pyramidVersion = ""
-        
+
         self.__migrationSummaryDialog = None
-    
+
     def initActions(self):
         """
         Public method to define the Pyramid actions.
         """
         self.actions = []
-    
+
         self.selectProjectAct = EricAction(
-            self.tr('Current Pyramid Project'),
+            self.tr("Current Pyramid Project"),
             "",
-            0, 0,
-            self, 'pyramid_current_project')
-        self.selectProjectAct.setStatusTip(self.tr(
-            'Selects the current Pyramid project'))
-        self.selectProjectAct.setWhatsThis(self.tr(
-            """<b>Current Pyramid Project</b>"""
-            """<p>Selects the Pyramid project. Used for multi-project """
-            """Pyramid projects to switch between the projects.</p>"""
-        ))
+            0,
+            0,
+            self,
+            "pyramid_current_project",
+        )
+        self.selectProjectAct.setStatusTip(
+            self.tr("Selects the current Pyramid project")
+        )
+        self.selectProjectAct.setWhatsThis(
+            self.tr(
+                """<b>Current Pyramid Project</b>"""
+                """<p>Selects the Pyramid project. Used for multi-project """
+                """Pyramid projects to switch between the projects.</p>"""
+            )
+        )
         self.selectProjectAct.triggered.connect(self.__selectProject)
         self.actions.append(self.selectProjectAct)
-        
+
         ###############################
         ## create actions below      ##
         ###############################
-        
+
         self.createProjectAct = EricAction(
-            self.tr('Create Pyramid Project'),
-            self.tr('Create Pyramid &Project'),
-            0, 0,
-            self, 'pyramid_create_project')
-        self.createProjectAct.setStatusTip(self.tr(
-            'Creates a new Pyramid project'))
-        self.createProjectAct.setWhatsThis(self.tr(
-            """<b>Create Pyramid Project</b>"""
-            """<p>Creates a new Pyramid project using "pcreate".</p>"""
-        ))
+            self.tr("Create Pyramid Project"),
+            self.tr("Create Pyramid &Project"),
+            0,
+            0,
+            self,
+            "pyramid_create_project",
+        )
+        self.createProjectAct.setStatusTip(self.tr("Creates a new Pyramid project"))
+        self.createProjectAct.setWhatsThis(
+            self.tr(
+                """<b>Create Pyramid Project</b>"""
+                """<p>Creates a new Pyramid project using "pcreate".</p>"""
+            )
+        )
         self.createProjectAct.triggered.connect(self.__createProject)
         self.actions.append(self.createProjectAct)
-        
+
         ##############################
         ## run actions below        ##
         ##############################
-        
+
         self.runServerAct = EricAction(
-            self.tr('Run Server'),
-            self.tr('Run &Server'),
-            0, 0,
-            self, 'pyramid_run_server')
-        self.runServerAct.setStatusTip(self.tr(
-            'Starts the Pyramid Web server'))
-        self.runServerAct.setWhatsThis(self.tr(
-            """<b>Run Server</b>"""
-            """<p>Starts the Pyramid Web server using"""
-            """ "pserve --reload development.ini".</p>"""
-        ))
+            self.tr("Run Server"),
+            self.tr("Run &Server"),
+            0,
+            0,
+            self,
+            "pyramid_run_server",
+        )
+        self.runServerAct.setStatusTip(self.tr("Starts the Pyramid Web server"))
+        self.runServerAct.setWhatsThis(
+            self.tr(
+                """<b>Run Server</b>"""
+                """<p>Starts the Pyramid Web server using"""
+                """ "pserve --reload development.ini".</p>"""
+            )
+        )
         self.runServerAct.triggered.connect(self.__runServer)
         self.actions.append(self.runServerAct)
-        
+
         self.runBrowserAct = EricAction(
-            self.tr('Run Web-Browser'),
-            self.tr('Run &Web-Browser'),
-            0, 0,
-            self, 'pyramid_run_browser')
-        self.runBrowserAct.setStatusTip(self.tr(
-            'Starts the default Web-Browser with the URL of the Pyramid Web'
-            ' server'))
-        self.runBrowserAct.setWhatsThis(self.tr(
-            """<b>Run Web-Browser</b>"""
-            """<p>Starts the default Web-Browser with the URL of the """
-            """Pyramid Web server.</p>"""
-        ))
+            self.tr("Run Web-Browser"),
+            self.tr("Run &Web-Browser"),
+            0,
+            0,
+            self,
+            "pyramid_run_browser",
+        )
+        self.runBrowserAct.setStatusTip(
+            self.tr(
+                "Starts the default Web-Browser with the URL of the Pyramid Web"
+                " server"
+            )
+        )
+        self.runBrowserAct.setWhatsThis(
+            self.tr(
+                """<b>Run Web-Browser</b>"""
+                """<p>Starts the default Web-Browser with the URL of the """
+                """Pyramid Web server.</p>"""
+            )
+        )
         self.runBrowserAct.triggered.connect(self.__runBrowser)
         self.actions.append(self.runBrowserAct)
-    
+
         self.runPythonShellAct = EricAction(
-            self.tr('Start Pyramid Python Console'),
-            self.tr('Start Pyramid &Python Console'),
-            0, 0,
-            self, 'pyramid_python_console')
-        self.runPythonShellAct.setStatusTip(self.tr(
-            'Starts an interactive Python interpreter'))
-        self.runPythonShellAct.setWhatsThis(self.tr(
-            """<b>Start Pyramid Python Console</b>"""
-            """<p>Starts an interactive Python interpreter.</p>"""
-        ))
+            self.tr("Start Pyramid Python Console"),
+            self.tr("Start Pyramid &Python Console"),
+            0,
+            0,
+            self,
+            "pyramid_python_console",
+        )
+        self.runPythonShellAct.setStatusTip(
+            self.tr("Starts an interactive Python interpreter")
+        )
+        self.runPythonShellAct.setWhatsThis(
+            self.tr(
+                """<b>Start Pyramid Python Console</b>"""
+                """<p>Starts an interactive Python interpreter.</p>"""
+            )
+        )
         self.runPythonShellAct.triggered.connect(self.__runPythonShell)
         self.actions.append(self.runPythonShellAct)
-        
+
         ###############################
         ## show actions below        ##
         ###############################
-        
+
         self.showViewsAct = EricAction(
-            self.tr('Show Matching Views'),
-            self.tr('Show Matching &Views'),
-            0, 0,
-            self, 'pyramid_show_views')
-        self.showViewsAct.setStatusTip(self.tr(
-            'Show views matching a given URL'))
-        self.showViewsAct.setWhatsThis(self.tr(
-            """<b>Show Matching Views</b>"""
-            """<p>Show views matching a given URL.</p>"""
-        ))
+            self.tr("Show Matching Views"),
+            self.tr("Show Matching &Views"),
+            0,
+            0,
+            self,
+            "pyramid_show_views",
+        )
+        self.showViewsAct.setStatusTip(self.tr("Show views matching a given URL"))
+        self.showViewsAct.setWhatsThis(
+            self.tr(
+                """<b>Show Matching Views</b>"""
+                """<p>Show views matching a given URL.</p>"""
+            )
+        )
         self.showViewsAct.triggered.connect(self.__showMatchingViews)
         self.actions.append(self.showViewsAct)
-        
+
         self.showRoutesAct = EricAction(
-            self.tr('Show Routes'),
-            self.tr('Show &Routes'),
-            0, 0,
-            self, 'pyramid_show_routes')
-        self.showRoutesAct.setStatusTip(self.tr(
-            'Show all URL dispatch routes used by a Pyramid application'))
-        self.showRoutesAct.setWhatsThis(self.tr(
-            """<b>Show Routes</b>"""
-            """<p>Show all URL dispatch routes used by a Pyramid application"""
-            """ in the order in which they are evaluated.</p>"""
-        ))
+            self.tr("Show Routes"),
+            self.tr("Show &Routes"),
+            0,
+            0,
+            self,
+            "pyramid_show_routes",
+        )
+        self.showRoutesAct.setStatusTip(
+            self.tr("Show all URL dispatch routes used by a Pyramid application")
+        )
+        self.showRoutesAct.setWhatsThis(
+            self.tr(
+                """<b>Show Routes</b>"""
+                """<p>Show all URL dispatch routes used by a Pyramid application"""
+                """ in the order in which they are evaluated.</p>"""
+            )
+        )
         self.showRoutesAct.triggered.connect(self.__showRoutes)
         self.actions.append(self.showRoutesAct)
-        
+
         self.showTweensAct = EricAction(
-            self.tr('Show Tween Objects'),
-            self.tr('Show &Tween Objects'),
-            0, 0,
-            self, 'pyramid_show_routes')
-        self.showTweensAct.setStatusTip(self.tr(
-            'Show all implicit and explicit tween objects used by a Pyramid'
-            ' application'))
-        self.showTweensAct.setWhatsThis(self.tr(
-            """<b>Show Tween Objects</b>"""
-            """<p>Show all implicit and explicit tween objects used by a"""
-            """ Pyramid application.</p>"""
-        ))
+            self.tr("Show Tween Objects"),
+            self.tr("Show &Tween Objects"),
+            0,
+            0,
+            self,
+            "pyramid_show_routes",
+        )
+        self.showTweensAct.setStatusTip(
+            self.tr(
+                "Show all implicit and explicit tween objects used by a Pyramid"
+                " application"
+            )
+        )
+        self.showTweensAct.setWhatsThis(
+            self.tr(
+                """<b>Show Tween Objects</b>"""
+                """<p>Show all implicit and explicit tween objects used by a"""
+                """ Pyramid application.</p>"""
+            )
+        )
         self.showTweensAct.triggered.connect(self.__showTweens)
         self.actions.append(self.showTweensAct)
-        
+
         ##################################
         ## distribution actions below   ##
         ##################################
-        
+
         self.buildDistroAct = EricAction(
-            self.tr('Build Distribution'),
-            self.tr('Build &Distribution'),
-            0, 0,
-            self, 'pyramid_build_distribution')
-        self.buildDistroAct.setStatusTip(self.tr(
-            'Builds a distribution file for the Pyramid project'))
-        self.buildDistroAct.setWhatsThis(self.tr(
-            """<b>Build Distribution</b>"""
-            """<p>Builds a distribution file for the Pyramid project using"""
-            """ "python setup.py sdist".</p>"""
-        ))
+            self.tr("Build Distribution"),
+            self.tr("Build &Distribution"),
+            0,
+            0,
+            self,
+            "pyramid_build_distribution",
+        )
+        self.buildDistroAct.setStatusTip(
+            self.tr("Builds a distribution file for the Pyramid project")
+        )
+        self.buildDistroAct.setWhatsThis(
+            self.tr(
+                """<b>Build Distribution</b>"""
+                """<p>Builds a distribution file for the Pyramid project using"""
+                """ "python setup.py sdist".</p>"""
+            )
+        )
         self.buildDistroAct.triggered.connect(self.__buildDistribution)
         self.actions.append(self.buildDistroAct)
-        
+
         ##################################
         ## documentation action below   ##
         ##################################
-        
+
         self.documentationAct = EricAction(
-            self.tr('Documentation'),
-            self.tr('D&ocumentation'),
-            0, 0,
-            self, 'pyramid_documentation')
-        self.documentationAct.setStatusTip(self.tr(
-            'Shows the help viewer with the Pyramid documentation'))
-        self.documentationAct.setWhatsThis(self.tr(
-            """<b>Documentation</b>"""
-            """<p>Shows the help viewer with the Pyramid documentation.</p>"""
-        ))
+            self.tr("Documentation"),
+            self.tr("D&ocumentation"),
+            0,
+            0,
+            self,
+            "pyramid_documentation",
+        )
+        self.documentationAct.setStatusTip(
+            self.tr("Shows the help viewer with the Pyramid documentation")
+        )
+        self.documentationAct.setWhatsThis(
+            self.tr(
+                """<b>Documentation</b>"""
+                """<p>Shows the help viewer with the Pyramid documentation.</p>"""
+            )
+        )
         self.documentationAct.triggered.connect(self.__showDocumentation)
         self.actions.append(self.documentationAct)
-       
+
         ##############################
         ## about action below       ##
         ##############################
-        
+
         self.aboutPyramidAct = EricAction(
-            self.tr('About Pyramid'),
-            self.tr('About P&yramid'),
-            0, 0,
-            self, 'pyramid_about')
-        self.aboutPyramidAct.setStatusTip(self.tr(
-            'Shows some information about Pyramid'))
-        self.aboutPyramidAct.setWhatsThis(self.tr(
-            """<b>About Pyramid</b>"""
-            """<p>Shows some information about Pyramid.</p>"""
-        ))
+            self.tr("About Pyramid"),
+            self.tr("About P&yramid"),
+            0,
+            0,
+            self,
+            "pyramid_about",
+        )
+        self.aboutPyramidAct.setStatusTip(
+            self.tr("Shows some information about Pyramid")
+        )
+        self.aboutPyramidAct.setWhatsThis(
+            self.tr(
+                """<b>About Pyramid</b>"""
+                """<p>Shows some information about Pyramid.</p>"""
+            )
+        )
         self.aboutPyramidAct.triggered.connect(self.__pyramidInfo)
         self.actions.append(self.aboutPyramidAct)
-        
+
         self.__initDatabaseActions()
-        
+
         self.__setCurrentProject(None)
-    
+
     def __initDatabaseActions(self):
         """
         Private method to initialize the database related actions.
         """
         self.initializeDbAct = EricAction(
-            self.tr('Initialize Database'),
-            self.tr('Initialize &Database'),
-            0, 0,
-            self, 'pyramid_initialize_database')
-        self.initializeDbAct.setStatusTip(self.tr(
-            'Initializes (or re-initializes) the database of the current'
-            ' Pyramid project'))
-        self.initializeDbAct.setWhatsThis(self.tr(
-            """<b>Initialize Database</b>"""
-            """<p>Initializes (or re-initializes) the database of the"""
-            """ current Pyramid project.</p>"""
-        ))
+            self.tr("Initialize Database"),
+            self.tr("Initialize &Database"),
+            0,
+            0,
+            self,
+            "pyramid_initialize_database",
+        )
+        self.initializeDbAct.setStatusTip(
+            self.tr(
+                "Initializes (or re-initializes) the database of the current"
+                " Pyramid project"
+            )
+        )
+        self.initializeDbAct.setWhatsThis(
+            self.tr(
+                """<b>Initialize Database</b>"""
+                """<p>Initializes (or re-initializes) the database of the"""
+                """ current Pyramid project.</p>"""
+            )
+        )
         self.initializeDbAct.triggered.connect(self.__initializeDatabase)
         self.actions.append(self.initializeDbAct)
-        
+
         #########################################################
         ## action to create a new database migration
         #########################################################
-        
+
         self.migrateCreateAct = EricAction(
-            self.tr('Create Migration'),
-            self.tr('&Create Migration'),
-            0, 0,
-            self, 'flask_create_migration')
-        self.migrateCreateAct.setStatusTip(self.tr(
-            'Create a new migration for the current database'))
-        self.migrateCreateAct.setWhatsThis(self.tr(
-            """<b>Create Migration</b>"""
-            """<p>Creates a new migration for the current database"""
-            """ and stores it  in the configured migrations directory.</p>"""
-        ))
-        self.migrateCreateAct.triggered.connect(
-            self.__createMigration)
+            self.tr("Create Migration"),
+            self.tr("&Create Migration"),
+            0,
+            0,
+            self,
+            "flask_create_migration",
+        )
+        self.migrateCreateAct.setStatusTip(
+            self.tr("Create a new migration for the current database")
+        )
+        self.migrateCreateAct.setWhatsThis(
+            self.tr(
+                """<b>Create Migration</b>"""
+                """<p>Creates a new migration for the current database"""
+                """ and stores it  in the configured migrations directory.</p>"""
+            )
+        )
+        self.migrateCreateAct.triggered.connect(self.__createMigration)
         self.actions.append(self.migrateCreateAct)
-        
+
         #########################################################
         ## action to up- and downgrade a databse
         #########################################################
-        
+
         self.upgradeDatabaseAct = EricAction(
-            self.tr('Upgrade Database'),
-            self.tr('&Upgrade Database'),
-            0, 0,
-            self, 'flask_upgrade_database')
-        self.upgradeDatabaseAct.setStatusTip(self.tr(
-            'Upgrade the database to the current migration'))
-        self.upgradeDatabaseAct.setWhatsThis(self.tr(
-            """<b>Upgrade Database</b>"""
-            """<p>Upgrades the database to the current migration.</p>"""
-        ))
-        self.upgradeDatabaseAct.triggered.connect(
-            self.upgradeDatabase)
+            self.tr("Upgrade Database"),
+            self.tr("&Upgrade Database"),
+            0,
+            0,
+            self,
+            "flask_upgrade_database",
+        )
+        self.upgradeDatabaseAct.setStatusTip(
+            self.tr("Upgrade the database to the current migration")
+        )
+        self.upgradeDatabaseAct.setWhatsThis(
+            self.tr(
+                """<b>Upgrade Database</b>"""
+                """<p>Upgrades the database to the current migration.</p>"""
+            )
+        )
+        self.upgradeDatabaseAct.triggered.connect(self.upgradeDatabase)
         self.actions.append(self.upgradeDatabaseAct)
-        
+
         self.downgradeDatabaseAct = EricAction(
-            self.tr('Downgrade Database'),
-            self.tr('&Downgrade Database'),
-            0, 0,
-            self, 'flask_downgrade_database')
-        self.downgradeDatabaseAct.setStatusTip(self.tr(
-            'Downgrade the database to the previous version'))
-        self.downgradeDatabaseAct.setWhatsThis(self.tr(
-            """<b>Downgrade Database</b>"""
-            """<p>Downgrades the database to the previous version.</p>"""
-        ))
-        self.downgradeDatabaseAct.triggered.connect(
-            self.downgradeDatabase)
+            self.tr("Downgrade Database"),
+            self.tr("&Downgrade Database"),
+            0,
+            0,
+            self,
+            "flask_downgrade_database",
+        )
+        self.downgradeDatabaseAct.setStatusTip(
+            self.tr("Downgrade the database to the previous version")
+        )
+        self.downgradeDatabaseAct.setWhatsThis(
+            self.tr(
+                """<b>Downgrade Database</b>"""
+                """<p>Downgrades the database to the previous version.</p>"""
+            )
+        )
+        self.downgradeDatabaseAct.triggered.connect(self.downgradeDatabase)
         self.actions.append(self.downgradeDatabaseAct)
-        
+
         #########################################################
         ## actions to show migrations history information
         #########################################################
-        
+
         self.migrationSummaryAct = EricAction(
-            self.tr('Show Migrations Summary'),
-            self.tr('Show Migrations &Summary'),
-            0, 0,
-            self, 'flask_show_migrations_summary')
-        self.migrationSummaryAct.setStatusTip(self.tr(
-            'Show a summary of the created database migrations'))
-        self.migrationSummaryAct.setWhatsThis(self.tr(
-            """<b>Show Migrations Summary</b>"""
-            """<p>Shows a summary list of the created database"""
-            """ migrations.</p>"""
-        ))
-        self.migrationSummaryAct.triggered.connect(
-            self.__showMigrationsSummary)
+            self.tr("Show Migrations Summary"),
+            self.tr("Show Migrations &Summary"),
+            0,
+            0,
+            self,
+            "flask_show_migrations_summary",
+        )
+        self.migrationSummaryAct.setStatusTip(
+            self.tr("Show a summary of the created database migrations")
+        )
+        self.migrationSummaryAct.setWhatsThis(
+            self.tr(
+                """<b>Show Migrations Summary</b>"""
+                """<p>Shows a summary list of the created database"""
+                """ migrations.</p>"""
+            )
+        )
+        self.migrationSummaryAct.triggered.connect(self.__showMigrationsSummary)
         self.actions.append(self.migrationSummaryAct)
-        
+
         self.migrationHistoryAct = EricAction(
-            self.tr('Show Migrations History'),
-            self.tr('Show Migrations &History'),
-            0, 0,
-            self, 'flask_show_migrations_history')
-        self.migrationHistoryAct.setStatusTip(self.tr(
-            'Show the full history of the created database migrations'))
-        self.migrationHistoryAct.setWhatsThis(self.tr(
-            """<b>Show Migrations History</b>"""
-            """<p>Shows the full history of the created database"""
-            """ migrations.</p>"""
-        ))
-        self.migrationHistoryAct.triggered.connect(
-            self.__showMigrationsHistory)
+            self.tr("Show Migrations History"),
+            self.tr("Show Migrations &History"),
+            0,
+            0,
+            self,
+            "flask_show_migrations_history",
+        )
+        self.migrationHistoryAct.setStatusTip(
+            self.tr("Show the full history of the created database migrations")
+        )
+        self.migrationHistoryAct.setWhatsThis(
+            self.tr(
+                """<b>Show Migrations History</b>"""
+                """<p>Shows the full history of the created database"""
+                """ migrations.</p>"""
+            )
+        )
+        self.migrationHistoryAct.triggered.connect(self.__showMigrationsHistory)
         self.actions.append(self.migrationHistoryAct)
-    
+
     def initMenu(self):
         """
         Public slot to initialize the Pyramid menu.
-        
+
         @return the menu generated
         @rtype QMenu
         """
-        self.__menus = {}   # clear menus references
-        
+        self.__menus = {}  # clear menus references
+
         # Database menu
         dbMenu = QMenu(self.tr("Database"))
         dbMenu.setTearOffEnabled(True)
-        
+
         dbMenu.addAction(self.initializeDbAct)
         dbMenu.addSeparator()
         dbMenu.addAction(self.migrateCreateAct)
@@ -461,11 +561,11 @@
         dbMenu.addSeparator()
         dbMenu.addAction(self.migrationSummaryAct)
         dbMenu.addAction(self.migrationHistoryAct)
-        
+
         # main Pyramid menu
-        menu = QMenu(self.tr('P&yramid'), self.__ui)
+        menu = QMenu(self.tr("P&yramid"), self.__ui)
         menu.setTearOffEnabled(True)
-        
+
         menu.addAction(self.selectProjectAct)
         menu.addSeparator()
         menu.addAction(self.runServerAct)
@@ -486,18 +586,18 @@
         menu.addAction(self.documentationAct)
         menu.addSeparator()
         menu.addAction(self.aboutPyramidAct)
-        
+
         self.__menus["main"] = menu
         self.__menus["database"] = dbMenu
-        
+
         self.__setCurrentProject(None)
-        
+
         return menu
-    
+
     def getMenu(self, name):
         """
         Public method to get a reference to the requested menu.
-        
+
         @param name name of the menu
         @type str
         @return reference to the menu or None, if no menu with the given
@@ -508,16 +608,16 @@
             return self.__menus[name]
         else:
             return None
-    
+
     def getMenuNames(self):
         """
         Public method to get the names of all menus.
-        
+
         @return menu names
         @rtype list of str
         """
         return list(self.__menus.keys())
-    
+
     def registerOpenHook(self):
         """
         Public method to register the open hook to open a translations file
@@ -527,48 +627,55 @@
             editor = self.__plugin.getPreferences("TranslationsEditor")
             if editor:
                 self.__translationsBrowser.addHookMethodAndMenuEntry(
-                    "open", self.openPOEditor,
-                    self.tr("Open with {0}").format(
-                        os.path.basename(editor)))
+                    "open",
+                    self.openPOEditor,
+                    self.tr("Open with {0}").format(os.path.basename(editor)),
+                )
             else:
                 self.__translationsBrowser.removeHookMethod("open")
-    
+
     def projectOpenedHooks(self):
         """
         Public method to add our hook methods.
         """
         if self.__ericProject.getProjectType() == "Pyramid":
             self.__formsBrowser = (
-                ericApp().getObject("ProjectBrowser")
-                .getProjectBrowser("forms"))
+                ericApp().getObject("ProjectBrowser").getProjectBrowser("forms")
+            )
             self.__formsBrowser.addHookMethodAndMenuEntry(
-                "newForm", self.newForm, self.tr("New template..."))
-            
+                "newForm", self.newForm, self.tr("New template...")
+            )
+
             self.__ericProject.projectLanguageAddedByCode.connect(
-                self.__projectLanguageAdded)
+                self.__projectLanguageAdded
+            )
             self.__translationsBrowser = (
-                ericApp().getObject("ProjectBrowser")
-                .getProjectBrowser("translations"))
+                ericApp().getObject("ProjectBrowser").getProjectBrowser("translations")
+            )
             self.__translationsBrowser.addHookMethodAndMenuEntry(
-                "extractMessages", self.extractMessages,
-                self.tr("Extract Messages"))
+                "extractMessages", self.extractMessages, self.tr("Extract Messages")
+            )
             self.__translationsBrowser.addHookMethodAndMenuEntry(
-                "releaseAll", self.compileCatalogs,
-                self.tr("Compile All Catalogs"))
+                "releaseAll", self.compileCatalogs, self.tr("Compile All Catalogs")
+            )
             self.__translationsBrowser.addHookMethodAndMenuEntry(
-                "releaseSelected", self.compileSelectedCatalogs,
-                self.tr("Compile Selected Catalogs"))
+                "releaseSelected",
+                self.compileSelectedCatalogs,
+                self.tr("Compile Selected Catalogs"),
+            )
             self.__translationsBrowser.addHookMethodAndMenuEntry(
-                "generateAll", self.updateCatalogs,
-                self.tr("Update All Catalogs"))
+                "generateAll", self.updateCatalogs, self.tr("Update All Catalogs")
+            )
             self.__translationsBrowser.addHookMethodAndMenuEntry(
-                "generateSelected", self.updateSelectedCatalogs,
-                self.tr("Update Selected Catalogs"))
-            
+                "generateSelected",
+                self.updateSelectedCatalogs,
+                self.tr("Update Selected Catalogs"),
+            )
+
             self.__hooksInstalled = True
-        
+
             self.registerOpenHook()
-    
+
     def projectClosedHooks(self):
         """
         Public method to remove our hook methods.
@@ -576,9 +683,10 @@
         if self.__hooksInstalled:
             self.__formsBrowser.removeHookMethod("newForm")
             self.__formsBrowser = None
-            
+
             self.__ericProject.projectLanguageAddedByCode.disconnect(
-                self.__projectLanguageAdded)
+                self.__projectLanguageAdded
+            )
             self.__translationsBrowser.removeHookMethod("extractMessages")
             self.__translationsBrowser.removeHookMethod("releaseAll")
             self.__translationsBrowser.removeHookMethod("releaseSelected")
@@ -586,22 +694,22 @@
             self.__translationsBrowser.removeHookMethod("generateSelected")
             self.__translationsBrowser.removeHookMethod("open")
             self.__translationsBrowser = None
-        
+
         self.__hooksInstalled = False
-    
+
     def newForm(self, path):
         """
         Public method to create a new form.
-        
+
         @param path full directory path for the new form file
         @type str
         """
         from .FormSelectionDialog import FormSelectionDialog
-        
+
         dlg = FormSelectionDialog()
         if dlg.exec() == QDialog.DialogCode.Accepted:
             template = dlg.getTemplateText()
-            
+
             fileFilters = self.tr(
                 "Chameleon Templates (*.pt);;"
                 "Chameleon Text Templates (*.txt);;"
@@ -609,32 +717,34 @@
                 "Mako Templates (*.mak);;"
                 "HTML Files (*.html);;"
                 "HTML Files (*.htm);;"
-                "All Files (*)")
+                "All Files (*)"
+            )
             fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter(
                 self.__ui,
                 self.tr("New Form"),
                 path,
                 fileFilters,
                 None,
-                EricFileDialog.DontConfirmOverwrite)
+                EricFileDialog.DontConfirmOverwrite,
+            )
             if fname:
                 ext = QFileInfo(fname).suffix()
                 if not ext:
                     ex = selectedFilter.split("(*")[1].split(")")[0]
                     if ex:
                         fname += ex
-            
+
                 if os.path.exists(fname):
                     res = EricMessageBox.yesNo(
                         self.__ui,
                         self.tr("New Form"),
-                        self.tr("""The file already exists! Overwrite"""
-                                """ it?"""),
-                        icon=EricMessageBox.Warning)
+                        self.tr("""The file already exists! Overwrite""" """ it?"""),
+                        icon=EricMessageBox.Warning,
+                    )
                     if not res:
                         # user selected to not overwrite
                         return
-                
+
                 try:
                     with open(fname, "w", encoding="utf-8") as f:
                         f.write(template)
@@ -642,18 +752,20 @@
                     EricMessageBox.critical(
                         self.__ui,
                         self.tr("New Form"),
-                        self.tr("<p>The new form file <b>{0}</b> could"
-                                " not be created.<br/> Problem: {1}</p>")
-                        .format(fname, e))
+                        self.tr(
+                            "<p>The new form file <b>{0}</b> could"
+                            " not be created.<br/> Problem: {1}</p>"
+                        ).format(fname, e),
+                    )
                     return
-                
+
                 self.__ericProject.appendFile(fname)
                 self.__formsBrowser.sourceFile.emit(fname)
 
     ##################################################################
     ## methods below implement general functionality
     ##################################################################
-    
+
     def projectClosed(self):
         """
         Public method to handle the closing of a project.
@@ -661,16 +773,16 @@
         if self.__serverProc is not None:
             self.__serverProcFinished()
         self.__setCurrentProject(None)
-        
+
         for dlg in (self.__migrationSummaryDialog,):
             if dlg is not None:
                 dlg.close()
-    
+
     def __getExecutablePaths(self, file):
         """
         Private method to build all full paths of an executable file from
         the environment.
-        
+
         @param file filename of the executable
         @type str
         @return list of full executable names, if the executable file is
@@ -679,19 +791,19 @@
         @rtype list of str
         """
         paths = []
-        
+
         if os.path.isabs(file):
             if os.access(file, os.X_OK):
                 return [file]
             else:
                 return []
-            
+
         cur_path = os.path.join(os.curdir, file)
         if os.path.exists(cur_path) and os.access(cur_path, os.X_OK):
             paths.append(cur_path)
 
-        path = os.getenv('PATH')
-        
+        path = os.getenv("PATH")
+
         # environment variable not defined
         if path is not None:
             dirs = path.split(os.pathsep)
@@ -699,20 +811,20 @@
                 exe = os.path.join(directory, file)
                 if os.access(exe, os.X_OK) and exe not in paths:
                     paths.append(exe)
-        
+
         return paths
-    
+
     def supportedPythonVariants(self):
         """
         Public method to get the supported Python variants.
-        
+
         @return list of supported Python variants
         @rtype list of str
         """
         variants = []
         cmd = "cookiecutter"
-        
-        for variant in ['Python3']:
+
+        for variant in ["Python3"]:
             virtEnv = self.__getVirtualEnvironment(variant)
             if virtEnv:
                 fullCmd = self.getPyramidCommand(cmd, variant)
@@ -731,21 +843,21 @@
                             fullCmds = self.__getExecutablePaths(cmd)
                         for fullCmd in fullCmds:
                             try:
-                                with open(fullCmd, 'r', encoding='utf-8') as f:
+                                with open(fullCmd, "r", encoding="utf-8") as f:
                                     l0 = f.readline()
                             except OSError:
                                 l0 = ""
                             if self.__isSuitableForVariant(variant, l0):
                                 variants.append(variant)
                                 break
-        
+
         return variants
-    
+
     def __isSuitableForVariant(self, variant, line0):
         """
         Private method to test, if a detected command file is suitable for the
         given Python variant.
-        
+
         @param variant Python variant to test for
         @type str
         @param line0 first line of the executable
@@ -754,16 +866,15 @@
         @rtype bool
         """
         l0 = line0.lower()
-        ok = (variant.lower() in l0 or
-              "{0}.".format(variant[-1]) in l0)
+        ok = variant.lower() in l0 or "{0}.".format(variant[-1]) in l0
         ok |= "pypy3" in l0
-        
+
         return ok
-    
+
     def __getVirtualEnvironment(self, language=""):
         """
         Private method to get the path of the virtual environment.
-        
+
         @param language Python variant to get the virtual environment
             for (one of '' or 'Python3')
         @type str
@@ -774,30 +885,28 @@
             language = self.__ericProject.getProjectLanguage()
         if self.__virtualEnvManager:
             if language == "Python3":
-                venvName = self.__plugin.getPreferences(
-                    "VirtualEnvironmentNamePy3")
+                venvName = self.__plugin.getPreferences("VirtualEnvironmentNamePy3")
             else:
                 venvName = ""
             if venvName:
-                virtEnv = self.__virtualEnvManager.getVirtualenvDirectory(
-                    venvName)
+                virtEnv = self.__virtualEnvManager.getVirtualenvDirectory(venvName)
                 if not virtEnv:
                     virtEnv = os.path.dirname(
-                        self.__virtualEnvManager.getVirtualenvInterpreter(
-                            venvName))
+                        self.__virtualEnvManager.getVirtualenvInterpreter(venvName)
+                    )
                     if virtEnv.endswith(("Scripts", "bin")):
                         virtEnv = os.path.dirname(virtEnv)
             else:
                 virtEnv = ""
-        
+
         if virtEnv and not os.path.exists(virtEnv):
             virtEnv = ""
-        return virtEnv      # __IGNORE_WARNING_M834__
+        return virtEnv  # __IGNORE_WARNING_M834__
 
     def __getDebugEnvironment(self, language=""):
         """
         Private method to get the path of the debugger environment.
-        
+
         @param language Python variant to get the debugger environment
             for (one of '' or 'Python3')
         @type str
@@ -813,26 +922,25 @@
                     venvName = Preferences.getDebugger("Python3VirtualEnv")
                 else:
                     venvName = ""
-                
+
                 if venvName:
-                    return self.__virtualEnvManager.getVirtualenvDirectory(
-                        venvName)
-        
+                    return self.__virtualEnvManager.getVirtualenvDirectory(venvName)
+
         return ""
 
     def getProjectVirtualEnvironment(self):
         """
         Public method to generate the path of the project virtual environment.
-        
+
         @return path of the Pyramid project virtual environment
         @rtype str
         """
         return os.path.join(self.projectPath(), "env")
-    
+
     def getPyramidCommand(self, cmd, language="", virtualEnv=""):
         """
         Public method to build a Pyramid command.
-        
+
         @param cmd command
         @type str
         @param language Python variant to get the virtual environment
@@ -845,16 +953,16 @@
         """
         if not language:
             language = self.__ericProject.getProjectLanguage()
-        
+
         if not virtualEnv:
             virtualEnv = self.__getVirtualEnvironment(language)
             if not virtualEnv:
                 virtualEnv = self.__getDebugEnvironment(language)
         if isWindowsPlatform():
             fullCmds = [
-                os.path.join(virtualEnv, "Scripts", cmd + '.exe'),
-                os.path.join(virtualEnv, "bin", cmd + '.exe'),
-                cmd     # fall back to just cmd
+                os.path.join(virtualEnv, "Scripts", cmd + ".exe"),
+                os.path.join(virtualEnv, "bin", cmd + ".exe"),
+                cmd,  # fall back to just cmd
             ]
             for cmd in fullCmds:
                 if os.path.exists(cmd):
@@ -864,18 +972,18 @@
                 os.path.join(virtualEnv, "bin", cmd),
                 os.path.join(virtualEnv, "local", "bin", cmd),
                 Utilities.getExecutablePath(cmd),
-                cmd     # fall back to just cmd
+                cmd,  # fall back to just cmd
             ]
             for cmd in fullCmds:
                 if os.path.exists(cmd):
                     break
         return cmd
-    
+
     def __assemblePyramidCommand(self, cmd, virtualEnv):
         """
         Private method to assemble the full pyramid command for a given virtual
         environment.
-        
+
         @param cmd command
         @type str
         @param virtualEnv path of the project's Python virtual environment
@@ -884,44 +992,42 @@
         @rtype str
         """
         return (
-            os.path.join(virtualEnv, "Scripts", cmd + '.exe')
-            if isWindowsPlatform() else
-            os.path.join(virtualEnv, "bin", cmd)
+            os.path.join(virtualEnv, "Scripts", cmd + ".exe")
+            if isWindowsPlatform()
+            else os.path.join(virtualEnv, "bin", cmd)
         )
-    
+
     def getPythonCommand(self):
         """
         Public method to build the Python command.
-        
+
         @return python command
         @rtype str
         """
         language = self.__ericProject.getProjectLanguage()
         if self.__virtualEnvManager:
             if language == "Python3":
-                venvName = self.__plugin.getPreferences(
-                    "VirtualEnvironmentNamePy3")
+                venvName = self.__plugin.getPreferences("VirtualEnvironmentNamePy3")
                 if not venvName:
                     # if none configured, use the global one
                     venvName = Preferences.getDebugger("Python3VirtualEnv")
             else:
                 venvName = ""
             if venvName:
-                return self.__virtualEnvManager.getVirtualenvInterpreter(
-                    venvName)
-        
+                return self.__virtualEnvManager.getVirtualenvInterpreter(venvName)
+
         return ""
-    
+
     def __pyramidInfo(self):
         """
         Private slot to show some info about Pyramid.
         """
         try:
             version = self.getPyramidVersionString()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             version = self.tr("not available")
         url = "http://www.pylonsproject.org/projects/pyramid/about"
-        
+
         msgBox = EricMessageBox.EricMessageBox(
             EricMessageBox.Question,
             self.tr("About Pyramid"),
@@ -931,32 +1037,35 @@
                 " design.</p>"
                 "<p><table>"
                 "<tr><td>Version:</td><td>{0}</td></tr>"
-                "<tr><td>URL:</td><td><a href=\"{1}\">"
+                '<tr><td>URL:</td><td><a href="{1}">'
                 "{1}</a></td></tr>"
                 "</table></p>"
             ).format(version, url),
             modal=True,
-            buttons=EricMessageBox.Ok)
-        msgBox.setIconPixmap(UI.PixmapCache.getPixmap(
-            os.path.join("ProjectPyramid", "icons",
-                         "pyramid64-{0}".format(self.__iconSuffix))
-        ))
+            buttons=EricMessageBox.Ok,
+        )
+        msgBox.setIconPixmap(
+            UI.PixmapCache.getPixmap(
+                os.path.join(
+                    "ProjectPyramid", "icons", "pyramid64-{0}".format(self.__iconSuffix)
+                )
+            )
+        )
         msgBox.exec()
-    
+
     def getPyramidVersionString(self):
         """
         Public method to get the Pyramid version as a string.
-        
+
         @return Pyramid version
         @rtype str
         """
         if not self.__pyramidVersion:
             cmd = self.getPyramidCommand(
-                "pdistreport",
-                virtualEnv=self.getProjectVirtualEnvironment()
+                "pdistreport", virtualEnv=self.getProjectVirtualEnvironment()
             )
             try:
-                output = subprocess.check_output([cmd])     # secok
+                output = subprocess.check_output([cmd])  # secok
                 outputLines = output.decode().splitlines()
                 for line in outputLines:
                     if line.startswith("Pyramid version:"):
@@ -964,13 +1073,13 @@
                         break
             except (OSError, subprocess.CalledProcessError):
                 self.__pyramidVersion = ""
-        
+
         return self.__pyramidVersion
-    
+
     def getPyramidVersion(self):
         """
         Public method to get the Pyramid version as a tuple.
-        
+
         @return Pyramid version
         @rtype tuple of int
         """
@@ -982,20 +1091,20 @@
                     pyramidVersionList.append(int(part))
                 except ValueError:
                     pyramidVersionList.append(part)
-        
+
         return tuple(pyramidVersionList)
-    
+
     def isSpawningConsole(self, consoleCmd):
         """
         Public method to check, if the given console is a spawning console.
-        
+
         @param consoleCmd console command
         @type str
         @return tuple of two entries giving an indication, if the console
             is spawning (boolean) and the (possibly) cleaned console command
         @rtype str
         """
-        if consoleCmd and consoleCmd[0] == '@':
+        if consoleCmd and consoleCmd[0] == "@":
             return (True, consoleCmd[1:])
         else:
             return (False, consoleCmd)
@@ -1003,7 +1112,7 @@
     def __adjustWorkingDirectory(self, args, wd):
         """
         Private method to adjust the working directory in the arguments list.
-        
+
         @param args list of arguments to be modified
         @type list of str
         @param wd working directory
@@ -1017,21 +1126,21 @@
                 if args[index].startswith("--working-directory="):
                     args[index] = "--working-directory={0}".format(wd)
                     break
-    
+
     ##################################################################
     ## slots below implement creation functions
     ##################################################################
-    
+
     def __createProject(self):
         """
         Private slot to create a new Pyramid project.
         """
         from .CreateParametersDialog import CreateParametersDialog
-        
+
         dlg = CreateParametersDialog(self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             template, version, overwrite, contextData = dlg.getData()
-            
+
             cmd = self.getPyramidCommand("cookiecutter")
             args = ["--no-input"]
             if overwrite:
@@ -1041,75 +1150,93 @@
             args.append(template)
             for context, data in contextData.items():
                 args.append("{0}={1}".format(context, data))
-            dlg = PyramidDialog(self.tr("Create Pyramid Project"),
-                                parent=self.__ui)
-            if dlg.startProcess(
-                cmd, args, self.__ericProject.getProjectPath()
-            ):
+            dlg = PyramidDialog(self.tr("Create Pyramid Project"), parent=self.__ui)
+            if dlg.startProcess(cmd, args, self.__ericProject.getProjectPath()):
                 dlg.exec()
                 if dlg.normalExit() and "repo_name" in contextData:
                     # search for files created by cookiecutter and add them
                     # to the project
                     projectPath = os.path.join(
-                        self.__ericProject.getProjectPath(),
-                        contextData["repo_name"])
+                        self.__ericProject.getProjectPath(), contextData["repo_name"]
+                    )
                     for entry in os.walk(projectPath):
                         for fileName in entry[2]:
                             fullName = os.path.join(entry[0], fileName)
                             self.__ericProject.appendFile(fullName)
-                    
+
                     # create the base directory for translations
                     i18nPath = os.path.join(
-                        projectPath, contextData["repo_name"].lower(),
-                        "i18n")
+                        projectPath, contextData["repo_name"].lower(), "i18n"
+                    )
                     if not os.path.exists(i18nPath):
                         os.makedirs(i18nPath)
                     self.__ericProject.setDirty(True)
-                    
+
                     combinedOutput = False
                     argsLists = []
-                    
+
                     # 1. create a Python virtual environment for the project
                     argsLists.append([sys.executable, "-m", "venv", "env"])
                     # 2. upgrade packaging tools
                     python = self.__assemblePyramidCommand(
-                        "python", os.path.join(projectPath, "env"))
-                    argsLists.append([python, "-m", "pip", "install",
-                                      "--upgrade", "pip", "setuptools"])
+                        "python", os.path.join(projectPath, "env")
+                    )
+                    argsLists.append(
+                        [
+                            python,
+                            "-m",
+                            "pip",
+                            "install",
+                            "--upgrade",
+                            "pip",
+                            "setuptools",
+                        ]
+                    )
                     # 3. install project in editable mode with testing
-                    argsLists.append([python, "-m", "pip", "install", "-e",
-                                      ".[testing]"])
-                    
+                    argsLists.append(
+                        [python, "-m", "pip", "install", "-e", ".[testing]"]
+                    )
+
                     if (
-                        "backend" in contextData and
-                        contextData["backend"] == "sqlalchemy"
+                        "backend" in contextData
+                        and contextData["backend"] == "sqlalchemy"
                     ):
                         # only SQLAlchemy needs initialization of alembic
                         combinedOutput = True
-                        
+
                         # 4. initialize database
                         alembic = self.__assemblePyramidCommand(
-                            "alembic", os.path.join(projectPath, "env"))
-                        argsLists.append([alembic, "-c", "development.ini",
-                                          "revision", "--autogenerate",
-                                          "--message", "initialized database"])
+                            "alembic", os.path.join(projectPath, "env")
+                        )
+                        argsLists.append(
+                            [
+                                alembic,
+                                "-c",
+                                "development.ini",
+                                "revision",
+                                "--autogenerate",
+                                "--message",
+                                "initialized database",
+                            ]
+                        )
                         # 5. upgrade database to initial version
-                        argsLists.append([alembic, "-c", "development.ini",
-                                          "upgrade", "head"])
-                    
+                        argsLists.append(
+                            [alembic, "-c", "development.ini", "upgrade", "head"]
+                        )
+
                     dlg = PyramidDialog(
                         self.tr("Initializing Pyramid Project"),
                         combinedOutput=combinedOutput,
-                        parent=self.__ui)
-                    if dlg.startBatchProcesses(argsLists,
-                                               workingDir=projectPath):
+                        parent=self.__ui,
+                    )
+                    if dlg.startBatchProcesses(argsLists, workingDir=projectPath):
                         dlg.exec()
-                    
+
                     self.__setCurrentProject(contextData["repo_name"])
-                    
+
                     if (
-                        "backend" in contextData and
-                        contextData["backend"] == "sqlalchemy"
+                        "backend" in contextData
+                        and contextData["backend"] == "sqlalchemy"
                     ):
                         # add the alembic files created above to the project
                         migrationsPath = self.migrationsPath()
@@ -1117,29 +1244,26 @@
                             for fileName in entry[2]:
                                 fullName = os.path.join(entry[0], fileName)
                                 self.__ericProject.appendFile(fullName)
-    
+
     ##################################################################
     ## methods below implement site related functions
     ##################################################################
-    
+
     def __findProjects(self):
         """
         Private method to determine the relative path of all Pyramid
         projects (= top level dirs).
-        
+
         @return list of projects
         @rtype list of str
         """
         projects = []
         ppath = self.__ericProject.getProjectPath()
         for entry in os.listdir(ppath):
-            if (
-                entry[0] not in "._" and
-                os.path.isdir(os.path.join(ppath, entry))
-            ):
+            if entry[0] not in "._" and os.path.isdir(os.path.join(ppath, entry)):
                 projects.append(entry)
         return sorted(projects)
-    
+
     def __selectProject(self):
         """
         Private method to select a Pyramid project to work with.
@@ -1162,33 +1286,36 @@
                 self.tr("Select Pyramid Project"),
                 self.tr("Select the Pyramid project to work with."),
                 projects,
-                cur, False)
+                cur,
+                False,
+            )
             if not ok:
                 projects = None
         self.__setCurrentProject(project)
-    
+
     def projectPath(self):
         """
         Public method to calculate the full path of the Pyramid project.
-        
+
         @return path of the project
         @rtype str
-        @exception PyramidNoProjectSelectedException raised, if no project is
+        @exception PyramidNoProjectSelectedError raised, if no project is
             selected
         """
         if self.__currentProject is None:
             self.__selectProject()
-        
+
         if self.__currentProject is None:
-            raise PyramidNoProjectSelectedException
+            raise PyramidNoProjectSelectedError
         else:
-            return os.path.join(self.__ericProject.getProjectPath(),
-                                self.__currentProject)
-    
+            return os.path.join(
+                self.__ericProject.getProjectPath(), self.__currentProject
+            )
+
     def __setCurrentProject(self, project):
         """
         Private slot to set the current project.
-        
+
         @param project name of the project
         @type str
         """
@@ -1196,15 +1323,14 @@
             self.__currentProject = None
         else:
             self.__currentProject = project
-        
+
         curProject = (
-            self.tr("None")
-            if self.__currentProject is None else
-            self.__currentProject
+            self.tr("None") if self.__currentProject is None else self.__currentProject
         )
         self.selectProjectAct.setText(
-            self.tr('&Current Pyramid Project ({0})').format(curProject))
-        
+            self.tr("&Current Pyramid Project ({0})").format(curProject)
+        )
+
         if self.__currentProject is None:
             self.__ericProject.setTranslationPattern("")
         else:
@@ -1214,16 +1340,21 @@
             try:
                 outputDir = config.get("init_catalog", "output_dir")
             except (configparser.NoOptionError, configparser.NoSectionError):
-                outputDir = '{0}/locale'.format(lowerProject)
+                outputDir = "{0}/locale".format(lowerProject)
             try:
                 domain = config.get("init_catalog", "domain")
             except (configparser.NoOptionError, configparser.NoSectionError):
                 domain = lowerProject
             self.__ericProject.setTranslationPattern(
-                os.path.join(project, outputDir, "%language%",
-                             "LC_MESSAGES", "{0}.po".format(domain))
+                os.path.join(
+                    project,
+                    outputDir,
+                    "%language%",
+                    "LC_MESSAGES",
+                    "{0}.po".format(domain),
+                )
             )
-        
+
         if self.__currentProject is None:
             self.initializeDbAct.setEnabled(False)
             with contextlib.suppress(KeyError):
@@ -1231,12 +1362,12 @@
         else:
             initCmd = self.__getInitDbCommand()
             self.initializeDbAct.setEnabled(os.path.exists(initCmd))
-            
+
             alembicDir = os.path.join(
-                self.projectPath(), self.__currentProject,
-                "alembic", "versions")
+                self.projectPath(), self.__currentProject, "alembic", "versions"
+            )
             self.__menus["database"].setEnabled(os.path.exists(alembicDir))
-        
+
         self.runServerAct.setEnabled(project is not None)
         self.runBrowserAct.setEnabled(project is not None)
         self.runPythonShellAct.setEnabled(project is not None)
@@ -1244,61 +1375,67 @@
         self.showRoutesAct.setEnabled(project is not None)
         self.showTweensAct.setEnabled(project is not None)
         self.buildDistroAct.setEnabled(project is not None)
-    
+
     def __project(self):
         """
         Private method to get the name of the current Pyramid project.
-        
+
         @return name of the project
         @rtype str
-        @exception PyramidNoProjectSelectedException raised, if no project is
+        @exception PyramidNoProjectSelectedError raised, if no project is
             selected
         """
         if self.__currentProject is None:
             self.__selectProject()
-        
+
         if self.__currentProject is None:
-            raise PyramidNoProjectSelectedException
+            raise PyramidNoProjectSelectedError
         else:
             return self.__currentProject
-    
+
     ##################################################################
     ## slots below implement run functions
     ##################################################################
-    
+
     def __runServer(self):
         """
         Private slot to start the Pyramid Web server.
         """
         consoleCmd = self.isSpawningConsole(
-            self.__plugin.getPreferences("ConsoleCommand"))[1]
+            self.__plugin.getPreferences("ConsoleCommand")
+        )[1]
         if consoleCmd:
             try:
                 projectPath = self.projectPath()
-            except PyramidNoProjectSelectedException:
+            except PyramidNoProjectSelectedError:
                 EricMessageBox.warning(
                     self.__ui,
-                    self.tr('Run Server'),
-                    self.tr('No current Pyramid project selected or no'
-                            ' Pyramid project created yet. Aborting...'))
+                    self.tr("Run Server"),
+                    self.tr(
+                        "No current Pyramid project selected or no"
+                        " Pyramid project created yet. Aborting..."
+                    ),
+                )
                 return
-            
+
             args = Utilities.parseOptionString(consoleCmd)
             args[0] = Utilities.getExecutablePath(args[0])
-            args.append(self.getPyramidCommand(
-                "pserve",
-                virtualEnv=self.getProjectVirtualEnvironment()
-            ))
+            args.append(
+                self.getPyramidCommand(
+                    "pserve", virtualEnv=self.getProjectVirtualEnvironment()
+                )
+            )
             args.append("--reload")
             args.append(os.path.join(projectPath, "development.ini"))
-            
+
             if isWindowsPlatform():
                 serverProcStarted, pid = QProcess.startDetached(
-                    args[0], args[1:], projectPath)
+                    args[0], args[1:], projectPath
+                )
             else:
                 if self.__serverProc is not None:
                     self.__serverProcFinished()
-                
+
                 self.__serverProc = QProcess()
                 self.__serverProc.finished.connect(self.__serverProcFinished)
                 self.__serverProc.setWorkingDirectory(projectPath)
@@ -1307,36 +1444,40 @@
             if not serverProcStarted:
                 EricMessageBox.critical(
                     self.__ui,
-                    self.tr('Process Generation Error'),
-                    self.tr('The Pyramid server could not be started.'))
-    
+                    self.tr("Process Generation Error"),
+                    self.tr("The Pyramid server could not be started."),
+                )
+
     def __serverProcFinished(self):
         """
         Private slot connected to the finished signal.
         """
         if (
-            self.__serverProc is not None and
-            self.__serverProc.state() != QProcess.ProcessState.NotRunning
+            self.__serverProc is not None
+            and self.__serverProc.state() != QProcess.ProcessState.NotRunning
         ):
             self.__serverProc.terminate()
             QTimer.singleShot(2000, self.__serverProc.kill)
             self.__serverProc.waitForFinished(3000)
         self.__serverProc = None
-    
+
     def __runBrowser(self):
         """
         Private slot to start the default web browser with the server URL.
         """
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
-                self.tr('Run Web-Browser'),
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr("Run Web-Browser"),
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         config = configparser.ConfigParser()
         config.read(os.path.join(projectPath, "development.ini"))
         try:
@@ -1349,53 +1490,59 @@
             if not res:
                 EricMessageBox.critical(
                     self.__ui,
-                    self.tr('Run Web-Browser'),
-                    self.tr('Could not start the web-browser for the URL'
-                            ' "{0}".').format(url.toString()))
+                    self.tr("Run Web-Browser"),
+                    self.tr(
+                        "Could not start the web-browser for the URL" ' "{0}".'
+                    ).format(url.toString()),
+                )
         else:
             self.__ui.launchHelpViewer(url)
-    
+
     def __runPythonShell(self):
         """
         Private slot to start a Python console for a Pyramid project.
         """
         consoleCmd = self.isSpawningConsole(
-            self.__plugin.getPreferences("ConsoleCommand"))[1]
+            self.__plugin.getPreferences("ConsoleCommand")
+        )[1]
         if consoleCmd:
             try:
                 projectPath = self.projectPath()
-            except PyramidNoProjectSelectedException:
+            except PyramidNoProjectSelectedError:
                 EricMessageBox.warning(
                     self.__ui,
-                    self.tr('Start Pyramid Python Console'),
-                    self.tr('No current Pyramid project selected or no'
-                            ' Pyramid project created yet. Aborting...'))
+                    self.tr("Start Pyramid Python Console"),
+                    self.tr(
+                        "No current Pyramid project selected or no"
+                        " Pyramid project created yet. Aborting..."
+                    ),
+                )
                 return
-            
+
             args = Utilities.parseOptionString(consoleCmd)
             args[0] = Utilities.getExecutablePath(args[0])
-            args.append(self.getPyramidCommand(
-                "pshell",
-                virtualEnv=self.getProjectVirtualEnvironment()
-            ))
+            args.append(
+                self.getPyramidCommand(
+                    "pshell", virtualEnv=self.getProjectVirtualEnvironment()
+                )
+            )
             consoleType = self.__plugin.getPreferences("Python3ConsoleType")
             args.append("--python-shell={0}".format(consoleType))
             args.append(os.path.join(projectPath, "development.ini"))
-            
+
             self.__adjustWorkingDirectory(args, projectPath)
-            started, pid = QProcess.startDetached(
-                args[0], args[1:], projectPath)
+            started, pid = QProcess.startDetached(args[0], args[1:], projectPath)
             if not started:
                 EricMessageBox.critical(
                     self.__ui,
-                    self.tr('Process Generation Error'),
-                    self.tr('The Pyramid Shell process could not be'
-                            ' started.'))
+                    self.tr("Process Generation Error"),
+                    self.tr("The Pyramid Shell process could not be" " started."),
+                )
 
     ##################################################################
     ## slots below implement distribution functions
     ##################################################################
-    
+
     def __buildDistribution(self):
         """
         Private slot to build a distribution file for the current Pyramid
@@ -1404,43 +1551,43 @@
         title = self.tr("Build Distribution File")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
-        from .DistributionTypeSelectionDialog import (
-            DistributionTypeSelectionDialog
-        )
-        
+
+        from .DistributionTypeSelectionDialog import DistributionTypeSelectionDialog
+
         dlg = DistributionTypeSelectionDialog(self, projectPath, self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             formats = dlg.getFormats()
             cmd = self.getPyramidCommand(
-                "python",
-                virtualEnv=self.getProjectVirtualEnvironment()
+                "python", virtualEnv=self.getProjectVirtualEnvironment()
             )
             args = []
             args.append("setup.py")
             args.append("sdist")
             if formats:
-                args.append("--formats={0}".format(','.join(formats)))
-            
+                args.append("--formats={0}".format(",".join(formats)))
+
             dia = PyramidDialog(
                 title,
-                msgSuccess=self.tr("Python distribution file built"
-                                   " successfully."))
+                msgSuccess=self.tr("Python distribution file built" " successfully."),
+            )
             res = dia.startProcess(cmd, args, projectPath)
             if res:
                 dia.exec()
-    
+
     ##################################################################
     ## slots below implement various debugging functions
     ##################################################################
-    
+
     def __showMatchingViews(self):
         """
         Private slot showing all views that would match a given URL.
@@ -1448,36 +1595,39 @@
         title = self.tr("Show Matching Views")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         url, ok = QInputDialog.getText(
             self.__ui,
             self.tr("Show Matching Views"),
             self.tr("Enter the URL to be matched:"),
             QLineEdit.EchoMode.Normal,
-            "/")
+            "/",
+        )
         if not ok or url == "":
             return
-        
+
         cmd = self.getPyramidCommand(
-            "pviews",
-            virtualEnv=self.getProjectVirtualEnvironment()
+            "pviews", virtualEnv=self.getProjectVirtualEnvironment()
         )
         args = []
         args.append("development.ini")
         args.append(url)
-        
+
         dia = PyramidDialog(title, fixed=True, linewrap=False)
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-    
+
     def __showRoutes(self):
         """
         Private slot showing all URL dispatch routes.
@@ -1485,21 +1635,24 @@
         title = self.tr("Show Routes")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         from .PyramidRoutesDialog import PyramidRoutesDialog
-        
+
         dia = PyramidRoutesDialog(self)
         res = dia.start(projectPath)
         if res:
             dia.exec()
-    
+
     def __showTweens(self):
         """
         Private slot showing all implicit and explicit tween objects.
@@ -1507,17 +1660,19 @@
         title = self.tr("Show Tween Objects")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         cmd = self.getPyramidCommand(
-            "ptweens",
-            virtualEnv=self.getProjectVirtualEnvironment()
+            "ptweens", virtualEnv=self.getProjectVirtualEnvironment()
         )
         args = []
         args.append("development.ini")
@@ -1526,26 +1681,26 @@
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-    
+
     ##################################################################
     ## slots below implement documentation functions
     ##################################################################
-    
+
     def __showDocumentation(self):
         """
         Private slot to show the helpviewer with the Pyramid documentation.
         """
         page = self.__plugin.getPreferences("PyramidDocUrl")
         self.__ui.launchHelpViewer(page)
-    
+
     ##################################################################
     ## slots below implement translation functions
     ##################################################################
-    
+
     def __getLocale(self, filename):
         """
         Private method to extract the locale out of a file name.
-        
+
         @param filename name of the file used for extraction
         @type str
         @return extracted locale or None
@@ -1558,17 +1713,17 @@
             pattern = self.__ericProject.getTranslationPattern()
             pattern = os.path.normpath(pattern)
             pattern = pattern.replace("%language%", "(.*?)")
-            pattern = pattern.replace('\\', '\\\\')
+            pattern = pattern.replace("\\", "\\\\")
             match = re.search(pattern, filename)
             if match is not None:
                 return match.group(1)
-        
+
         return None
-    
+
     def __normalizeList(self, filenames):
         """
         Private method to normalize a list of file names.
-        
+
         @param filenames list of file names to normalize
         @type list of str
         @return normalized file names
@@ -1580,13 +1735,13 @@
                 filename = filename.replace(".mo", ".po")
             if filename not in nfilenames:
                 nfilenames.append(filename)
-        
+
         return nfilenames
-    
+
     def __projectFilteredList(self, filenames):
         """
         Private method to filter a list of file names by Pyramid project.
-        
+
         @param filenames list of file names to be filtered
         @type list of str
         @return file names belonging to the current site
@@ -1597,9 +1752,9 @@
         for filename in filenames:
             if filename.startswith(project + os.sep):
                 nfilenames.append(filename)
-        
+
         return nfilenames
-    
+
     def extractMessages(self):
         """
         Public method to extract the messages catalog template file.
@@ -1607,12 +1762,15 @@
         title = self.tr("Extract messages")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
 
         config = configparser.ConfigParser()
@@ -1623,130 +1781,138 @@
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No setup.cfg found or no "extract_messages"'
-                        ' section found in setup.cfg.'))
+                self.tr(
+                    'No setup.cfg found or no "extract_messages"'
+                    " section found in setup.cfg."
+                ),
+            )
             return
         except configparser.NoOptionError:
             EricMessageBox.warning(
-                self.__ui,
-                title,
-                self.tr('No "output_file" option found in setup.cfg.'))
+                self.__ui, title, self.tr('No "output_file" option found in setup.cfg.')
+            )
             return
-        
+
         with contextlib.suppress(OSError):
             path = os.path.join(projectPath, os.path.dirname(potFile))
             os.makedirs(path)
-        
+
         cmd = self.getPythonCommand()
         args = []
         args.append("setup.py")
         args.append("extract_messages")
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessages extracted successfully."))
+            title, msgSuccess=self.tr("\nMessages extracted successfully.")
+        )
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
             self.__ericProject.appendFile(os.path.join(projectPath, potFile))
-            
+
     def __projectLanguageAdded(self, code):
         """
         Private slot handling the addition of a new language.
-        
+
         @param code language code of the new language
         @type str
         """
-        title = self.tr(
-            "Initializing message catalog for '{0}'").format(code)
+        title = self.tr("Initializing message catalog for '{0}'").format(code)
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         cmd = self.getPythonCommand()
         args = []
         args.append("setup.py")
         args.append("init_catalog")
         args.append("-l")
         args.append(code)
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessage catalog initialized"
-                               " successfully."))
+            title, msgSuccess=self.tr("\nMessage catalog initialized" " successfully.")
+        )
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-            
+
             langFile = self.__ericProject.getTranslationPattern().replace(
-                "%language%", code)
+                "%language%", code
+            )
             self.__ericProject.appendFile(langFile)
-    
+
     def compileCatalogs(self, filenames):
         """
         Public method to compile the message catalogs.
-        
+
         @param filenames list of filenames (not used)
         @type list of str
         """
         title = self.tr("Compiling message catalogs")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         cmd = self.getPythonCommand()
         args = []
         args.append("setup.py")
         args.append("compile_catalog")
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessage catalogs compiled"
-                               " successfully."))
+            title, msgSuccess=self.tr("\nMessage catalogs compiled" " successfully.")
+        )
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-        
+
             for entry in os.walk(projectPath):
                 for fileName in entry[2]:
                     fullName = os.path.join(entry[0], fileName)
-                    if fullName.endswith('.mo'):
+                    if fullName.endswith(".mo"):
                         self.__ericProject.appendFile(fullName)
-    
+
     def compileSelectedCatalogs(self, filenames):
         """
         Public method to update the message catalogs.
-        
+
         @param filenames list of file names
         @type list of str
         """
         title = self.tr("Compiling message catalogs")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         argsLists = []
-        
-        for filename in self.__normalizeList(
-                self.__projectFilteredList(filenames)):
+
+        for filename in self.__normalizeList(self.__projectFilteredList(filenames)):
             locale = self.__getLocale(filename)
             if locale:
                 args = []
@@ -1756,80 +1922,83 @@
                 args.append("-l")
                 args.append(locale)
                 argsLists.append(args)
-        
+
         if len(argsLists) == 0:
             EricMessageBox.warning(
-                self.__ui,
-                title,
-                self.tr('No locales detected. Aborting...'))
+                self.__ui, title, self.tr("No locales detected. Aborting...")
+            )
             return
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessage catalogs compiled"
-                               " successfully."))
+            title, msgSuccess=self.tr("\nMessage catalogs compiled" " successfully.")
+        )
         res = dia.startBatchProcesses(argsLists, projectPath)
         if res:
             dia.exec()
-            
+
             for entry in os.walk(self.__sitePath()):
                 for fileName in entry[2]:
                     fullName = os.path.join(entry[0], fileName)
-                    if fullName.endswith('.mo'):
+                    if fullName.endswith(".mo"):
                         self.__ericProject.appendFile(fullName)
-    
+
     def updateCatalogs(self, filenames):
         """
         Public method to update the message catalogs.
-        
+
         @param filenames list of filenames (not used)
         @type list of str
         """
         title = self.tr("Updating message catalogs")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         cmd = self.getPythonCommand()
         args = []
         args.append("setup.py")
         args.append("update_catalog")
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessage catalogs updated successfully."))
+            title, msgSuccess=self.tr("\nMessage catalogs updated successfully.")
+        )
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-    
+
     def updateSelectedCatalogs(self, filenames):
         """
         Public method to update the message catalogs.
-        
+
         @param filenames list of filenames
         @type list of str
         """
         title = self.tr("Updating message catalogs")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         argsLists = []
-        
-        for filename in self.__normalizeList(
-                self.__projectFilteredList(filenames)):
+
+        for filename in self.__normalizeList(self.__projectFilteredList(filenames)):
             locale = self.__getLocale(filename)
             if locale:
                 args = []
@@ -1839,25 +2008,24 @@
                 args.append("-l")
                 args.append(locale)
                 argsLists.append(args)
-        
+
         if len(argsLists) == 0:
             EricMessageBox.warning(
-                self.__ui,
-                title,
-                self.tr('No locales detected. Aborting...'))
+                self.__ui, title, self.tr("No locales detected. Aborting...")
+            )
             return
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("\nMessage catalogs updated successfully."))
+            title, msgSuccess=self.tr("\nMessage catalogs updated successfully.")
+        )
         res = dia.startBatchProcesses(argsLists, projectPath)
         if res:
             dia.exec()
-    
+
     def openPOEditor(self, poFile):
         """
         Public method to edit the given file in an external .po editor.
-        
+
         @param poFile name of the .po file
         @type str
         """
@@ -1865,66 +2033,69 @@
         if poFile.endswith(".po") and editor:
             try:
                 wd = self.projectPath()
-            except PyramidNoProjectSelectedException:
+            except PyramidNoProjectSelectedError:
                 wd = ""
             started, pid = QProcess.startDetached(editor, [poFile], wd)
             if not started:
                 EricMessageBox.critical(
                     None,
-                    self.tr('Process Generation Error'),
-                    self.tr('The translations editor process ({0}) could'
-                            ' not be started.').format(
-                        os.path.basename(editor)))
-    
+                    self.tr("Process Generation Error"),
+                    self.tr(
+                        "The translations editor process ({0}) could" " not be started."
+                    ).format(os.path.basename(editor)),
+                )
+
     #######################################################################
     ## database related methods and slots below
     #######################################################################
-    
+
     def getAlembicCommand(self):
         """
         Public method to get the path to the alembic executable of the current
         Pyramid project.
-        
+
         @return path to the alembic executable
         @rtype str
         """
         return self.getPyramidCommand(
-            "alembic",
-            virtualEnv=self.getProjectVirtualEnvironment()
+            "alembic", virtualEnv=self.getProjectVirtualEnvironment()
         )
-    
+
     def migrationsPath(self):
         """
         Public method to get the path to the migrations directory of the
         current Pyramid project.
-        
+
         @return pathof the directory containing the migrations
         @rtype str
         """
-        return os.path.join(self.projectPath(), self.__currentProject,
-                            "alembic", "versions")
-    
+        return os.path.join(
+            self.projectPath(), self.__currentProject, "alembic", "versions"
+        )
+
     def __getInitDbCommand(self):
         """
         Private method to create the path to the initialization script.
-        
+
         @return path to the initialization script
         @rtype str
         """
         try:
             cmd = "initialize_{0}_db".format(self.__project())
             return self.getPyramidCommand(
-                cmd,
-                virtualEnv=self.getProjectVirtualEnvironment()
+                cmd, virtualEnv=self.getProjectVirtualEnvironment()
             )
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 self.tr("Initialize Database"),
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return ""
-    
+
     @pyqtSlot()
     def __initializeDatabase(self):
         """
@@ -1933,25 +2104,28 @@
         title = self.tr("Initialize Database")
         try:
             projectPath = self.projectPath()
-        except PyramidNoProjectSelectedException:
+        except PyramidNoProjectSelectedError:
             EricMessageBox.warning(
                 self.__ui,
                 title,
-                self.tr('No current Pyramid project selected or no Pyramid'
-                        ' project created yet. Aborting...'))
+                self.tr(
+                    "No current Pyramid project selected or no Pyramid"
+                    " project created yet. Aborting..."
+                ),
+            )
             return
-        
+
         cmd = self.__getInitDbCommand()
         args = []
         args.append("development.ini")
-        
+
         dia = PyramidDialog(
-            title,
-            msgSuccess=self.tr("Database initialized successfully."))
+            title, msgSuccess=self.tr("Database initialized successfully.")
+        )
         res = dia.startProcess(cmd, args, projectPath)
         if res:
             dia.exec()
-    
+
     @pyqtSlot()
     def __createMigration(self):
         """
@@ -1960,99 +2134,101 @@
         title = self.tr("Create Migration")
         projectPath = self.projectPath()
         migrations = self.migrationsPath()
-        
+
         message, ok = QInputDialog.getText(
             None,
             title,
             self.tr("Enter a short message for the migration:"),
-            QLineEdit.EchoMode.Normal)
+            QLineEdit.EchoMode.Normal,
+        )
         if ok:
             args = ["-c", "development.ini", "revision", "--autogenerate"]
             if migrations:
                 args += ["--version-path", migrations]
             if message:
                 args += ["--message", message]
-            
+
             dlg = PyramidDialog(
                 title,
                 msgSuccess=self.tr("\nMigration created successfully."),
-                linewrap=False, combinedOutput=True,
-                parent=self.__ui
+                linewrap=False,
+                combinedOutput=True,
+                parent=self.__ui,
             )
-            if dlg.startProcess(self.getAlembicCommand(), args,
-                                workingDir=projectPath):
+            if dlg.startProcess(self.getAlembicCommand(), args, workingDir=projectPath):
                 dlg.exec()
                 if dlg.normalExit():
                     versionsPattern = os.path.join(migrations, "*.py")
                     for fileName in glob.iglob(versionsPattern):
                         self.__ericProject.appendFile(fileName)
-    
+
     @pyqtSlot()
     def upgradeDatabase(self, revision=None):
         """
         Public slot to upgrade the database to the head or a given version.
-        
+
         @param revision migration revision to upgrade to
         @type str
         """
         title = self.tr("Upgrade Database")
         projectPath = self.projectPath()
-        
+
         args = ["-c", "development.ini", "upgrade"]
         if revision:
             args.append(revision)
         else:
             args.append("head")
-        
+
         dlg = PyramidDialog(
             title,
             msgSuccess=self.tr("\nDatabase upgraded successfully."),
-            linewrap=False, combinedOutput=True, parent=self.__ui
+            linewrap=False,
+            combinedOutput=True,
+            parent=self.__ui,
         )
-        if dlg.startProcess(self.getAlembicCommand(), args,
-                            workingDir=projectPath):
+        if dlg.startProcess(self.getAlembicCommand(), args, workingDir=projectPath):
             dlg.exec()
-    
+
     @pyqtSlot()
     def downgradeDatabase(self, revision=None):
         """
         Public slot to downgrade the database to the previous or a given
         version.
-        
+
         @param revision migration revision to downgrade to
         @type str
         """
         title = self.tr("Downgrade Database")
         projectPath = self.projectPath()
-        
+
         args = ["-c", "development.ini", "downgrade"]
         if revision:
             args.append(revision)
         else:
             args.append("-1")
-        
+
         dlg = PyramidDialog(
             title,
             msgSuccess=self.tr("\nDatabase downgraded successfully."),
-            linewrap=False, combinedOutput=True, parent=self.__ui
+            linewrap=False,
+            combinedOutput=True,
+            parent=self.__ui,
         )
-        if dlg.startProcess(self.getAlembicCommand(), args,
-                            workingDir=projectPath):
+        if dlg.startProcess(self.getAlembicCommand(), args, workingDir=projectPath):
             dlg.exec()
-    
+
     @pyqtSlot()
     def __showMigrationsSummary(self):
         """
         Private slot to show a migrations history summary.
         """
         from .MigrateSummaryDialog import MigrateSummaryDialog
-        
+
         if self.__migrationSummaryDialog is None:
-            self.__migrationSummaryDialog = MigrateSummaryDialog(
-                self, parent=self.__ui)
-        
+            self.__migrationSummaryDialog = MigrateSummaryDialog(self, parent=self.__ui)
+
         self.__migrationSummaryDialog.showSummary()
-    
+
     @pyqtSlot()
     def __showMigrationsHistory(self):
         """
@@ -2060,14 +2236,11 @@
         """
         title = self.tr("Migrations History")
         projectPath = self.projectPath()
-        
-        args = ["-c", "development.ini", "history", "--indicate-current",
-                "--verbose"]
-        
+
+        args = ["-c", "development.ini", "history", "--indicate-current", "--verbose"]
+
         dlg = PyramidDialog(
-            title,
-            linewrap=False, combinedOutput=True, parent=self.__ui
+            title, linewrap=False, combinedOutput=True, parent=self.__ui
         )
-        if dlg.startProcess(self.getAlembicCommand(), args,
-                            workingDir=projectPath):
+        if dlg.startProcess(self.getAlembicCommand(), args, workingDir=projectPath):
             dlg.exec()
--- a/ProjectPyramid/PyramidDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/PyramidDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -23,17 +23,25 @@
 class PyramidDialog(QDialog, Ui_PyramidDialog):
     """
     Class implementing a dialog starting a process and showing its output.
-    
+
     It starts a QProcess and displays a dialog that
     shows the output of the process. The dialog is modal,
     which causes a synchronized execution of the process.
     """
-    def __init__(self, text, fixed=False, linewrap=True,
-                 msgSuccess=None, msgError=None,
-                 combinedOutput=False, parent=None):
+
+    def __init__(
+        self,
+        text,
+        fixed=False,
+        linewrap=True,
+        msgSuccess=None,
+        msgError=None,
+        combinedOutput=False,
+        parent=None,
+    ):
         """
         Constructor
-        
+
         @param text text to be shown by the label
         @type str
         @param fixed flag indicating a fixed font should be used
@@ -52,12 +60,10 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
+
         self.__proc = None
         self.__argsLists = []
         self.__workingDir = None
@@ -65,9 +71,9 @@
         self.__msgError = msgError
         self.__combinedOutput = combinedOutput
         self.__batchMode = False
-        
+
         self.outputGroup.setTitle(text)
-        
+
         if fixed:
             if isWindowsPlatform():
                 self.resultbox.setFontFamily("Lucida Console")
@@ -75,86 +81,76 @@
                 self.resultbox.setFontFamily("Menlo")
             else:
                 self.resultbox.setFontFamily("Monospace")
-        
+
         if not linewrap:
             self.resultbox.setLineWrapMode(QTextEdit.LineWrapMode.NoWrap)
-        
+
         self.show()
         QCoreApplication.processEvents()
-    
+
     def finish(self):
         """
         Public slot called when the process finished or the user pressed the
         button.
         """
         if (
-            self.__proc is not None and
-            self.__proc.state() != QProcess.ProcessState.NotRunning
+            self.__proc is not None
+            and self.__proc.state() != QProcess.ProcessState.NotRunning
         ):
             self.__proc.terminate()
             QTimer.singleShot(2000, self.__proc.kill)
             self.__proc.waitForFinished(3000)
-        
+
         self.inputGroup.setEnabled(False)
         self.inputGroup.hide()
-        
+
         self.__proc = None
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setFocus(
-                Qt.FocusReason.OtherFocusReason)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
+
         if self.__argsLists:
             args = self.__argsLists.pop(0)[:]
             self.startProcess(args[0], args[1:], self.__workingDir)
-    
+
     def on_buttonBox_clicked(self, button):
         """
         Private slot called by a button of the button box clicked.
-        
+
         @param button button that was clicked
         @type QAbstractButton
         """
-        if button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close
-        ):
+        if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
             self.close()
-        elif button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel
-        ):
+        elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
             self.finish()
-    
+
     def __procFinished(self, exitCode, exitStatus):
         """
         Private slot connected to the finished signal.
-        
+
         @param exitCode exit code of the process
         @type int
         @param exitStatus exit status of the process
         @type QProcess.ExitStatus
         """
-        self.normal = (
-            exitStatus == QProcess.ExitStatus.NormalExit and
-            exitCode == 0
-        )
+        self.normal = exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0
         self.finish()
-        
+
         if self.normal and self.__msgSuccess:
             self.resultbox.insertPlainText(self.__msgSuccess)
         elif not self.normal and self.__msgError:
             self.resultbox.insertPlainText(self.__msgError)
         self.resultbox.ensureCursorVisible()
-    
+
     def startProcess(self, command, args, workingDir=None, showArgs=True):
         """
         Public slot used to start the process.
-        
+
         @param command command to start
         @type str
         @param args list of arguments for the process
@@ -169,33 +165,31 @@
         self.errorGroup.hide()
         self.normal = False
         self.intercept = False
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setFocus(
-                Qt.FocusReason.OtherFocusReason)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
+
         if self.__batchMode:
-            self.resultbox.append(80 * '#')
-        
+            self.resultbox.append(80 * "#")
+
         if showArgs:
-            self.resultbox.append(command + ' ' + ' '.join(args))
-            self.resultbox.append('')
-        
+            self.resultbox.append(command + " " + " ".join(args))
+            self.resultbox.append("")
+
         self.__proc = QProcess()
         if self.__combinedOutput:
             self.__proc.setProcessChannelMode(
-                QProcess.ProcessChannelMode.MergedChannels)
-        
+                QProcess.ProcessChannelMode.MergedChannels
+            )
+
         self.__proc.finished.connect(self.__procFinished)
         self.__proc.readyReadStandardOutput.connect(self.__readStdout)
         self.__proc.readyReadStandardError.connect(self.__readStderr)
-        
+
         if workingDir:
             self.__proc.setWorkingDirectory(workingDir)
         self.__proc.start(command, args)
@@ -205,20 +199,21 @@
             self.inputGroup.setEnabled(False)
             EricMessageBox.critical(
                 self,
-                self.tr('Process Generation Error'),
+                self.tr("Process Generation Error"),
                 self.tr(
-                    'The process {0} could not be started. '
-                    'Ensure, that it is in the search path.'
-                ).format(command))
+                    "The process {0} could not be started. "
+                    "Ensure, that it is in the search path."
+                ).format(command),
+            )
         else:
             self.inputGroup.setEnabled(True)
             self.inputGroup.show()
         return procStarted
-    
+
     def startBatchProcesses(self, argsLists, workingDir=None):
         """
         Public slot used to start a batch of processes.
-        
+
         @param argsLists list of lists of arguments for the processes
         @type list of list of str
         @param workingDir working directory for the process
@@ -229,71 +224,75 @@
         self.__argsLists = argsLists[:]
         self.__workingDir = workingDir
         self.__batchMode = True
-        
+
         # start the first process
         args = self.__argsLists.pop(0)[:]
         res = self.startProcess(args[0], args[1:], self.__workingDir)
         if not res:
             self.__argsLists = []
-        
+
         return res
-    
+
     def normalExit(self):
         """
         Public method to check for a normal process termination.
-        
+
         @return flag indicating normal process termination
         @rtype bool
         """
         return self.normal
-    
+
     def normalExitWithoutErrors(self):
         """
         Public method to check for a normal process termination without
         error messages.
-        
+
         @return flag indicating normal process termination
         @rtype bool
         """
         return self.normal and self.errors.toPlainText() == ""
-    
+
     def __readStdout(self):
         """
         Private slot to handle the readyReadStandardOutput signal.
-        
+
         It reads the output of the process, formats it and inserts it into
         the contents pane.
         """
         if self.__proc is not None:
-            out = str(self.__proc.readAllStandardOutput(),
-                      Preferences.getSystem("IOEncoding"),
-                      'replace')
+            out = str(
+                self.__proc.readAllStandardOutput(),
+                Preferences.getSystem("IOEncoding"),
+                "replace",
+            )
             self.resultbox.insertPlainText(out)
             self.resultbox.ensureCursorVisible()
-            
+
             QCoreApplication.processEvents()
-    
+
     def __readStderr(self):
         """
         Private slot to handle the readyReadStandardError signal.
-        
+
         It reads the error output of the process and inserts it into the
         error pane.
         """
         if self.__proc is not None:
-            err = str(self.__proc.readAllStandardError(),
-                      Preferences.getSystem("IOEncoding"),
-                      'replace')
+            err = str(
+                self.__proc.readAllStandardError(),
+                Preferences.getSystem("IOEncoding"),
+                "replace",
+            )
             self.errorGroup.show()
             self.errors.insertPlainText(err)
             self.errors.ensureCursorVisible()
-            
+
             QCoreApplication.processEvents()
-    
+
     def on_passwordCheckBox_toggled(self, isOn):
         """
         Private slot to handle the password checkbox toggled.
-        
+
         @param isOn flag indicating the status of the check box
         @type bool
         """
@@ -301,7 +300,7 @@
             self.input.setEchoMode(QLineEdit.EchoMode.Password)
         else:
             self.input.setEchoMode(QLineEdit.EchoMode.Normal)
-    
+
     @pyqtSlot()
     def on_sendButton_clicked(self):
         """
@@ -309,30 +308,30 @@
         """
         inputTxt = self.input.text()
         inputTxt += os.linesep
-        
+
         if self.passwordCheckBox.isChecked():
             self.errors.insertPlainText(os.linesep)
             self.errors.ensureCursorVisible()
         else:
             self.resultbox.insertPlainText(inputTxt)
             self.resultbox.ensureCursorVisible()
-        
+
         self.__proc.write(strToQByteArray(inputTxt))
-        
+
         self.passwordCheckBox.setChecked(False)
         self.input.clear()
-    
+
     def on_input_returnPressed(self):
         """
         Private slot to handle the press of the return key in the input field.
         """
         self.intercept = True
         self.on_sendButton_clicked()
-    
+
     def keyPressEvent(self, evt):
         """
         Protected slot to handle a key press event.
-        
+
         @param evt the key press event
         @type QKeyEvent
         """
--- a/ProjectPyramid/PyramidRoutesDialog.py	Thu Dec 30 12:17:44 2021 +0100
+++ b/ProjectPyramid/PyramidRoutesDialog.py	Wed Sep 21 16:24:54 2022 +0200
@@ -10,9 +10,7 @@
 import os
 
 from PyQt6.QtCore import pyqtSlot, Qt, QProcess, QTimer, QCoreApplication
-from PyQt6.QtWidgets import (
-    QDialog, QDialogButtonBox, QLineEdit, QTreeWidgetItem
-)
+from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLineEdit, QTreeWidgetItem
 
 from EricWidgets import EricMessageBox
 
@@ -26,10 +24,11 @@
     """
     Class implementing a dialog showing the available routes.
     """
+
     def __init__(self, project, parent=None):
         """
         Constructor
-        
+
         @param project reference to the project object
         @type Project
         @param parent reference to the parent widget
@@ -37,85 +36,73 @@
         """
         super().__init__(parent)
         self.setupUi(self)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
+
         self.__project = project
         self.proc = None
         self.buffer = ""
-        
+
         self.show()
         QCoreApplication.processEvents()
-    
+
     def finish(self):
         """
         Public slot called when the process finished or the user pressed the
         button.
         """
         if (
-            self.proc is not None and
-            self.proc.state() != QProcess.ProcessState.NotRunning
+            self.proc is not None
+            and self.proc.state() != QProcess.ProcessState.NotRunning
         ):
             self.proc.terminate()
             QTimer.singleShot(2000, self.proc.kill)
             self.proc.waitForFinished(3000)
-        
+
         self.inputGroup.setEnabled(False)
         self.inputGroup.hide()
-        
+
         self.proc = None
-        
+
         self.__processBuffer()
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setFocus(
-                Qt.FocusReason.OtherFocusReason)
-    
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
+
     def on_buttonBox_clicked(self, button):
         """
         Private slot called by a button of the button box clicked.
-        
+
         @param button button that was clicked (QAbstractButton)
         """
-        if button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close
-        ):
+        if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
             self.close()
-        elif button == self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel
-        ):
+        elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
             self.finish()
-    
+
     def __procFinished(self, exitCode, exitStatus):
         """
         Private slot connected to the finished signal.
-        
+
         @param exitCode exit code of the process
         @type int
         @param exitStatus exit status of the process
         @type QProcess.ExitStatus
         """
-        self.normal = (
-            exitStatus == QProcess.ExitStatus.NormalExit and
-            exitCode == 0
-        )
+        self.normal = exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0
         self.finish()
-    
+
     def __processBuffer(self):
         """
         Private slot to process the output buffer of the proutes command.
         """
         self.routes.clear()
-        
+
         if not self.buffer:
             QTreeWidgetItem(self.routes, [self.tr("No routes found.")])
             self.routes.setHeaderHidden(True)
@@ -141,11 +128,11 @@
                     row += 1
                 for column in range(len(headers)):
                     self.routes.resizeColumnToContents(column)
-    
+
     def start(self, projectPath):
         """
         Public slot used to start the process.
-        
+
         @param projectPath path to the Pyramid project
         @type str
         @return flag indicating a successful start of the process
@@ -153,30 +140,26 @@
         """
         QTreeWidgetItem(self.routes, [self.tr("Getting routes...")])
         self.routes.setHeaderHidden(True)
-        
+
         self.errorGroup.hide()
         self.normal = False
         self.intercept = False
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Close).setEnabled(False)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Cancel).setFocus(
-                Qt.FocusReason.OtherFocusReason)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setFocus(
+            Qt.FocusReason.OtherFocusReason
+        )
+
         self.proc = QProcess()
-        
+
         self.proc.finished.connect(self.__procFinished)
         self.proc.readyReadStandardOutput.connect(self.__readStdout)
         self.proc.readyReadStandardError.connect(self.__readStderr)
-        
+
         cmd = self.__project.getPyramidCommand(
-            "proutes",
-            virtualEnv=self.__project.getProjectVirtualEnvironment()
+            "proutes", virtualEnv=self.__project.getProjectVirtualEnvironment()
         )
         args = []
         args.append("development.ini")
@@ -190,50 +173,55 @@
             self.inputGroup.setEnabled(False)
             EricMessageBox.critical(
                 self,
-                self.tr('Process Generation Error'),
+                self.tr("Process Generation Error"),
                 self.tr(
-                    'The process {0} could not be started. '
-                    'Ensure, that it is in the search path.'
-                ).format(cmd))
+                    "The process {0} could not be started. "
+                    "Ensure, that it is in the search path."
+                ).format(cmd),
+            )
         else:
             self.inputGroup.setEnabled(True)
             self.inputGroup.show()
         return procStarted
-    
+
     def __readStdout(self):
         """
         Private slot to handle the readyReadStandardOutput signal.
-        
+
         It reads the output of the process and appends it to a buffer for
         delayed processing.
         """
         if self.proc is not None:
-            out = str(self.proc.readAllStandardOutput(),
-                      Preferences.getSystem("IOEncoding"),
-                      'replace')
+            out = str(
+                self.proc.readAllStandardOutput(),
+                Preferences.getSystem("IOEncoding"),
+                "replace",
+            )
             self.buffer += out
-    
+
     def __readStderr(self):
         """
         Private slot to handle the readyReadStandardError signal.
-        
+
         It reads the error output of the process and inserts it into the
         error pane.
         """
         if self.proc is not None:
-            err = str(self.proc.readAllStandardError(),
-                      Preferences.getSystem("IOEncoding"),
-                      'replace')
+            err = str(
+                self.proc.readAllStandardError(),
+                Preferences.getSystem("IOEncoding"),
+                "replace",
+            )
             self.errorGroup.show()
             self.errors.insertPlainText(err)
             self.errors.ensureCursorVisible()
-            
+
             QCoreApplication.processEvents()
-    
+
     def on_passwordCheckBox_toggled(self, isOn):
         """
         Private slot to handle the password checkbox toggled.
-        
+
         @param isOn flag indicating the status of the check box
         @type bool
         """
@@ -241,7 +229,7 @@
             self.input.setEchoMode(QLineEdit.EchoMode.Password)
         else:
             self.input.setEchoMode(QLineEdit.EchoMode.Normal)
-    
+
     @pyqtSlot()
     def on_sendButton_clicked(self):
         """
@@ -249,27 +237,27 @@
         """
         inputTxt = self.input.text()
         inputTxt += os.linesep
-        
+
         if self.passwordCheckBox.isChecked():
             self.errors.insertPlainText(os.linesep)
             self.errors.ensureCursorVisible()
-        
+
         self.proc.write(strToQByteArray(inputTxt))
-        
+
         self.passwordCheckBox.setChecked(False)
         self.input.clear()
-    
+
     def on_input_returnPressed(self):
         """
         Private slot to handle the press of the return key in the input field.
         """
         self.intercept = True
         self.on_sendButton_clicked()
-    
+
     def keyPressEvent(self, evt):
         """
         Protected slot to handle a key press event.
-        
+
         @param evt the key press event
         @type QKeyEvent
         """

eric ide

mercurial