Corrected a few formatting and style issues. server

Thu, 22 Feb 2024 16:34:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 22 Feb 2024 16:34:43 +0100
branch
server
changeset 10597
fbe93720ee9f
parent 10596
ea35c92a3c7c
child 10598
79c6ea2cb2e7

Corrected a few formatting and style issues.

src/eric7/DataViews/CodeMetrics.py file | annotate | diff | comparison | revisions
src/eric7/DataViews/PyCoverageDialog.py file | annotate | diff | comparison | revisions
src/eric7/DataViews/PyProfileDialog.py file | annotate | diff | comparison | revisions
src/eric7/Debugger/DebugServer.py file | annotate | diff | comparison | revisions
src/eric7/Debugger/DebugUI.py file | annotate | diff | comparison | revisions
src/eric7/Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
src/eric7/Graphics/ImportsDiagramBuilder.py file | annotate | diff | comparison | revisions
src/eric7/Project/Project.py file | annotate | diff | comparison | revisions
src/eric7/Project/ProjectBrowserModel.py file | annotate | diff | comparison | revisions
src/eric7/QScintilla/Editor.py file | annotate | diff | comparison | revisions
src/eric7/QScintilla/Shell.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServer/EricServer.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServer/EricServerFileSystemRequestHandler.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServerInterface/EricServerConnectionDialog.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServerInterface/EricServerFileDialog.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServerInterface/EricServerInterface.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServerInterface/EricServerProfilesDialog.py file | annotate | diff | comparison | revisions
src/eric7/SystemUtilities/FileSystemUtilities.py file | annotate | diff | comparison | revisions
src/eric7/ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
src/eric7/eric7_server.py file | annotate | diff | comparison | revisions
--- a/src/eric7/DataViews/CodeMetrics.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/DataViews/CodeMetrics.py	Thu Feb 22 16:34:43 2024 +0100
@@ -232,9 +232,7 @@
             remotefsInterface = (
                 ericApp().getObject("EricServer").getServiceInterface("FileSystem")
             )
-            text = remotefsInterface.readEncodedFile(
-                filename
-            )[0]
+            text = remotefsInterface.readEncodedFile(filename)[0]
         else:
             text = Utilities.readEncodedFile(filename)[0]
     except (OSError, UnicodeError):
--- a/src/eric7/DataViews/PyCoverageDialog.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/DataViews/PyCoverageDialog.py	Thu Feb 22 16:34:43 2024 +0100
@@ -79,11 +79,11 @@
         self.__menu.addAction(self.tr("Erase Coverage Info"), self.__erase)
         self.resultList.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
         self.resultList.customContextMenuRequested.connect(self.__showContextMenu)
- 
+
         # eric-ide server interface
-        self.__serverCoverageInterface = ericApp().getObject(
-            "EricServer"
-        ).getServiceInterface("Coverage")
+        self.__serverCoverageInterface = (
+            ericApp().getObject("EricServer").getServiceInterface("Coverage")
+        )
 
     def __format_lines(self, lines):
         """
@@ -256,13 +256,17 @@
 
                 try:
                     if FileSystemUtilities.isRemoteFileName(self.cfn):
-                        file, statements, excluded, missing, readable = (
-                            self.__serverCoverageInterface.analyzeFile(file)
-                        )
+                        (
+                            file,
+                            statements,
+                            excluded,
+                            missing,
+                            readable,
+                        ) = self.__serverCoverageInterface.analyzeFile(file)
                     else:
-                        statements, excluded, missing, readable = (
-                            cover.analysis2(file)[1:]
-                        )
+                        statements, excluded, missing, readable = cover.analysis2(file)[
+                            1:
+                        ]
                     n = len(statements)
                     m = n - len(missing)
                     pc = 100.0 * m / n if n > 0 else 100.0
--- a/src/eric7/DataViews/PyProfileDialog.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/DataViews/PyProfileDialog.py	Thu Feb 22 16:34:43 2024 +0100
@@ -106,9 +106,9 @@
         self.summaryList.customContextMenuRequested.connect(self.__showContextMenu)
 
         # eric-ide server interface
-        self.__serverFsInterface = ericApp().getObject(
-            "EricServer"
-        ).getServiceInterface("FileSystem")
+        self.__serverFsInterface = (
+            ericApp().getObject("EricServer").getServiceInterface("FileSystem")
+        )
 
     def __createResultItem(
         self,
@@ -272,15 +272,9 @@
 
         fname = "{0}.profile".format(self.basename)
         if (
-            (
-                FileSystemUtilities.isRemoteFileName(fname)
-                and not self.__serverFsInterface.exists(fname)
-            )
-            or (
-                FileSystemUtilities.isPlainFileName(fname)
-                and not os.path.exists(fname)
-            )
-        ):
+            FileSystemUtilities.isRemoteFileName(fname)
+            and not self.__serverFsInterface.exists(fname)
+        ) or (FileSystemUtilities.isPlainFileName(fname) and not os.path.exists(fname)):
             EricMessageBox.warning(
                 self,
                 self.tr("Profile Results"),
--- a/src/eric7/Debugger/DebugServer.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Debugger/DebugServer.py	Thu Feb 22 16:34:43 2024 +0100
@@ -497,7 +497,7 @@
         venvName="",
         workingDir="",
         configOverride=None,
-        startRemote=None
+        startRemote=None,
     ):
         """
         Public method to start a debug client.
@@ -745,14 +745,11 @@
                     self.__reportedBreakpointIssues.remove((fn, lineno))
 
                 if (
-                    (
-                        self.__ericServerDebugging
-                        and FileSystemUtilities.isRemoteFileName(fn)
-                    )
-                    or (
-                        not self.__ericServerDebugging
-                        and FileSystemUtilities.isPlainFileName(fn)
-                    )
+                    self.__ericServerDebugging
+                    and FileSystemUtilities.isRemoteFileName(fn)
+                ) or (
+                    not self.__ericServerDebugging
+                    and FileSystemUtilities.isPlainFileName(fn)
                 ):
                     self.remoteBreakpoint(debuggerId, fn, lineno, True, cond, temp)
                     if not enabled:
--- a/src/eric7/Debugger/DebugUI.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Debugger/DebugUI.py	Thu Feb 22 16:34:43 2024 +0100
@@ -3220,4 +3220,3 @@
                 " server is connected. Aborting...</p>"
             ),
         )
-        
--- a/src/eric7/Debugger/DebuggerInterfacePython.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Debugger/DebuggerInterfacePython.py	Thu Feb 22 16:34:43 2024 +0100
@@ -52,9 +52,9 @@
 
         self.__ericServerDebugging = False  # are we debugging via the eric-ide server?
         try:
-            self.__ericServerDebuggerInterface = ericApp().getObject(
-                "EricServer"
-            ).getServiceInterface("Debugger")
+            self.__ericServerDebuggerInterface = (
+                ericApp().getObject("EricServer").getServiceInterface("Debugger")
+            )
             self.__ericServerDebuggerInterface.debugClientResponse.connect(
                 lambda jsonStr: self.handleJsonCommand(jsonStr, None)
             )
@@ -219,17 +219,15 @@
         global origPathEnv
 
         if (
-            (
-                startRemote is True
-                or (
-                    startRemote is None and (
-                        venvName == self.debugServer.getEricServerEnvironmentString()
-                        or self.__ericServerDebugging
-                    )
+            startRemote is True
+            or (
+                startRemote is None
+                and (
+                    venvName == self.debugServer.getEricServerEnvironmentString()
+                    or self.__ericServerDebugging
                 )
             )
-            and ericApp().getObject("EricServer").isServerConnected()
-        ):
+        ) and ericApp().getObject("EricServer").isServerConnected():
             # TODO change this once server environment definitions are supported
             startRemote = True
             venvName = self.debugServer.getEricServerEnvironmentString()
@@ -360,7 +358,10 @@
             if callTraceOptimization:
                 args.append(callTraceOptimization)
             self.__ericServerDebuggerInterface.startClient(
-                interpreter, originalPathString, args, workingDir=workingDir,
+                interpreter,
+                originalPathString,
+                args,
+                workingDir=workingDir,
             )
             self.__startedVenv = venvName
 
--- a/src/eric7/Graphics/ImportsDiagramBuilder.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Graphics/ImportsDiagramBuilder.py	Thu Feb 22 16:34:43 2024 +0100
@@ -73,11 +73,9 @@
         ppath = self.packagePath
 
         if FileSystemUtilities.isRemoteFileName(self.packagePath):
-            self.package = (
-                self.__remotefsInterface.splitdrive(self.packagePath)[1][
-                    1:
-                ].replace(self.__remotefsInterface.separator(), ".")
-            )
+            self.package = self.__remotefsInterface.splitdrive(self.packagePath)[1][
+                1:
+            ].replace(self.__remotefsInterface.separator(), ".")
             while hasInit:
                 ppath = self.__remotefsInterface.dirname(ppath)
                 globPattern = self.__remotefsInterface.join(ppath, "__init__.*")
--- a/src/eric7/Project/Project.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Project/Project.py	Thu Feb 22 16:34:43 2024 +0100
@@ -1348,9 +1348,7 @@
                 return
         else:
             fn1, _ext = os.path.splitext(os.path.basename(self.pfile))
-            fn = os.path.join(
-                self.getProjectManagementDir(), f"{fn1}{indicator}.esj"
-            )
+            fn = os.path.join(self.getProjectManagementDir(), f"{fn1}{indicator}.esj")
             if not os.path.exists(fn):
                 return
 
@@ -1385,9 +1383,7 @@
             )
         else:
             fn1, _ext = os.path.splitext(os.path.basename(self.pfile))
-            fn = os.path.join(
-                self.getProjectManagementDir(), f"{fn1}{indicator}.esj"
-            )
+            fn = os.path.join(self.getProjectManagementDir(), f"{fn1}{indicator}.esj")
 
         self.__sessionFile.writeFile(fn)
 
@@ -1836,22 +1832,20 @@
             qmFile = self.__binaryTranslationFile(langFile)
             if qmFile:
                 if FileSystemUtilities.isRemoteFileName(self.ppath):
-                    if (
-                        qmFile not in self.__pdata["TRANSLATIONS"]
-                        and self.__remotefsInterface.exists(
-                            self.__remotefsInterface.join(self.ppath, qmFile)
-                        )
+                    if qmFile not in self.__pdata[
+                        "TRANSLATIONS"
+                    ] and self.__remotefsInterface.exists(
+                        self.__remotefsInterface.join(self.ppath, qmFile)
                     ):
                         self.appendFile(qmFile)
                     if tbPath:
                         qmFile = self.__remotefsInterface.join(
                             tbPath, self.__remotefsInterface.basename(qmFile)
                         )
-                        if (
-                            qmFile not in self.__pdata["TRANSLATIONS"]
-                            and self.__remotefsInterface.exists(
-                                self.__remotefsInterface.join(self.ppath, qmFile)
-                            )
+                        if qmFile not in self.__pdata[
+                            "TRANSLATIONS"
+                        ] and self.__remotefsInterface.exists(
+                            self.__remotefsInterface.join(self.ppath, qmFile)
                         ):
                             self.appendFile(qmFile)
                 else:
@@ -1861,10 +1855,9 @@
                         self.appendFile(qmFile)
                     if tbPath:
                         qmFile = os.path.join(tbPath, os.path.basename(qmFile))
-                        if (
-                            qmFile not in self.__pdata["TRANSLATIONS"]
-                            and os.path.exists(os.path.join(self.ppath, qmFile))
-                        ):
+                        if qmFile not in self.__pdata[
+                            "TRANSLATIONS"
+                        ] and os.path.exists(os.path.join(self.ppath, qmFile)):
                             self.appendFile(qmFile)
 
     def removeLanguageFile(self, langFile):
@@ -4342,11 +4335,7 @@
         @return flag indicating membership
         @rtype bool
         """
-        newfn = (
-            fn
-            if FileSystemUtilities.isRemoteFileName(fn)
-            else os.path.abspath(fn)
-        )
+        newfn = fn if FileSystemUtilities.isRemoteFileName(fn) else os.path.abspath(fn)
         newfn = self.getRelativePath(newfn)
         if newfn in self.__pdata[group] or (
             group == "OTHERS"
@@ -7447,5 +7436,6 @@
         if fn:
             self.openProject(fn=fn)
 
+
 #
 # eflag: noqa = M601
--- a/src/eric7/Project/ProjectBrowserModel.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/Project/ProjectBrowserModel.py	Thu Feb 22 16:34:43 2024 +0100
@@ -138,7 +138,9 @@
     Class implementing the data structure for project browser directory items.
     """
 
-    def __init__(self, parent, dinfo, projectType, full=True, bold=False, fsInterface=None):
+    def __init__(
+        self, parent, dinfo, projectType, full=True, bold=False, fsInterface=None
+    ):
         """
         Constructor
 
@@ -168,7 +170,14 @@
     """
 
     def __init__(
-        self, parent, finfo, projectType, full=True, bold=False, sourceLanguage="", fsInterface=None
+        self,
+        parent,
+        finfo,
+        projectType,
+        full=True,
+        bold=False,
+        sourceLanguage="",
+        fsInterface=None,
     ):
         """
         Constructor
--- a/src/eric7/QScintilla/Editor.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/QScintilla/Editor.py	Thu Feb 22 16:34:43 2024 +0100
@@ -3523,10 +3523,11 @@
                 if FileSystemUtilities.isRemoteFileName(fn) or isRemote:
                     title = self.tr("Open Remote File")
                     if encoding:
-                        txt, self.encoding = (
-                            self.__remotefsInterface.readEncodedFileWithEncoding(
-                                fn, encoding, create=True
-                            )
+                        (
+                            txt,
+                            self.encoding,
+                        ) = self.__remotefsInterface.readEncodedFileWithEncoding(
+                            fn, encoding, create=True
                         )
                     else:
                         txt, self.encoding = self.__remotefsInterface.readEncodedFile(
--- a/src/eric7/QScintilla/Shell.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/QScintilla/Shell.py	Thu Feb 22 16:34:43 2024 +0100
@@ -2663,5 +2663,6 @@
                 self.dbs.startClient(False)
                 self.__getBanner()
 
+
 #
 # eflag: noqa = M601
--- a/src/eric7/RemoteServer/EricServer.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServer/EricServer.py	Thu Feb 22 16:34:43 2024 +0100
@@ -339,7 +339,7 @@
     def __closeIdeConnection(self, shutdown=False):
         """
         Private method to close the connection to an eric-ide.
-        
+
         @param shutdown flag indicating a shutdown process
         @type bool
         """
@@ -364,7 +364,7 @@
     def __serviceIdeConnection(self, key):
         """
         Private method to service the eric-ide connection.
-        
+
         @param key reference to the SelectorKey object associated with the connection
             to be serviced
         @type selectors.SelectorKey
@@ -424,7 +424,7 @@
                 traceback.print_tb(exctb, None, tbinfofile)
                 tbinfofile.seek(0)
                 tbinfo = tbinfofile.read()
-                
+
                 print(f"{str(exctype)} / {str(excval)} / {tbinfo}")
 
                 self.__shouldStop = True
--- a/src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py	Thu Feb 22 16:34:43 2024 +0100
@@ -31,11 +31,11 @@
         @type EricServer
         """
         self.__server = server
-        
+
         self.__requestMethodMapping = {
             "StartClient": self.__startClient,
             "StopClient": self.__stopClient,
-            "DebugClientCommand": self.__relayDebugClientCommand
+            "DebugClientCommand": self.__relayDebugClientCommand,
         }
 
         self.__mainClientId = None
@@ -122,7 +122,7 @@
     def __serviceDbgClientConnection(self, key):
         """
         Private method to service the debug client connection.
-        
+
         @param key reference to the SelectorKey object associated with the connection
             to be serviced
         @type selectors.SelectorKey
@@ -138,7 +138,7 @@
 
             # 1. process debug client messages before relaying
             if method == "DebuggerId" and sock in self.__pendingConnections:
-                debuggerId = data['params']['debuggerId']
+                debuggerId = data["params"]["debuggerId"]
                 self.__connections[debuggerId] = sock
                 self.__pendingConnections.remove(sock)
                 if self.__mainClientId is None:
@@ -156,7 +156,7 @@
                 reply="DebugClientResponse",
                 params={"response": jsonStr},
             )
-            
+
             # 3. process debug client messages after relaying
             if method == "ResponseExit":
                 for sock in list(self.__connections.values()):
--- a/src/eric7/RemoteServer/EricServerFileSystemRequestHandler.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServer/EricServerFileSystemRequestHandler.py	Thu Feb 22 16:34:43 2024 +0100
@@ -82,7 +82,7 @@
                 reqestUuid=reqestUuid,
             )
 
-    def __getPathSeparator(self, params):
+    def __getPathSeparator(self, params):  # noqa: U100
         """
         Private method to report the path separator.
 
--- a/src/eric7/RemoteServerInterface/EricServerConnectionDialog.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerConnectionDialog.py	Thu Feb 22 16:34:43 2024 +0100
@@ -38,8 +38,9 @@
         self.setupUi(self)
 
         self.timeoutSpinBox.setToolTip(
-            self.tr("Enter the timeout for the connection attempt (default: {0} s.")
-            .format(Preferences.getEricServer("ConnectionTimeout"))
+            self.tr(
+                "Enter the timeout for the connection attempt (default: {0} s."
+            ).format(Preferences.getEricServer("ConnectionTimeout"))
         )
 
         self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
@@ -58,14 +59,6 @@
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
 
-    @pyqtSlot(str)
-    def on_hostnameEdit_textChanged(self, hostname):
-        """
-        Private slot handling a change of the hostname.
-
-        @param hostname text of the host name field
-        @type str
-        """
     @pyqtSlot()
     def __updateOK(self):
         """
--- a/src/eric7/RemoteServerInterface/EricServerFileDialog.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerFileDialog.py	Thu Feb 22 16:34:43 2024 +0100
@@ -95,8 +95,8 @@
 
         self.__contextMenu = QMenu(self)
 
-        self.__fsInterface = ericApp().getObject("EricServer").getServiceInterface(
-            "FileSystem"
+        self.__fsInterface = (
+            ericApp().getObject("EricServer").getServiceInterface("FileSystem")
         )
 
         # set some default values
@@ -335,9 +335,7 @@
         @param column column number (unused)
         @type int
         """
-        if (
-            item.data(0, EricServerFileDialog.IsDirectoryRole)
-        ):
+        if item.data(0, EricServerFileDialog.IsDirectoryRole):
             self.setDirectory(self.__getFullPath(item.text(0)))
         else:
             self.accept()
@@ -365,9 +363,7 @@
         if len(selected) == 1:
             self.nameEdit.setText(selected[0])
         elif len(selected) > 1:
-            self.nameEdit.setText(
-                '"{0}"'.format('" "'.join(selected))
-            )
+            self.nameEdit.setText('"{0}"'.format('" "'.join(selected)))
 
         self.__updateOkButton()
 
@@ -445,14 +441,10 @@
         elif self.__fileMode == FileMode.AnyFile:
             self.okButton.setEnabled(bool(self.nameEdit.text()))
         elif self.__fileMode == FileMode.ExistingFile:
-            self.okButton.setEnabled(
-                self.nameEdit.text() in self.__filenameCache
-            )
+            self.okButton.setEnabled(self.nameEdit.text() in self.__filenameCache)
         elif self.__fileMode == FileMode.ExistingFiles:
             names = self.__getNames()
-            self.okButton.setEnabled(
-                all(n in self.__filenameCache for n in names)
-            )
+            self.okButton.setEnabled(all(n in self.__filenameCache for n in names))
         elif self.__fileMode == FileMode.Directory:
             self.okButton.setEnabled(True)
         else:
@@ -517,7 +509,7 @@
             for dirEntry in sorted(
                 dirListing,
                 key=lambda d: (
-                    " " + d['name'].lower() if d["is_dir"] else d["name"].lower()
+                    " " + d["name"].lower() if d["is_dir"] else d["name"].lower()
                 ),
             ):
                 if dirEntry["is_dir"]:
@@ -531,8 +523,7 @@
                     sizeStr = dataString(dirEntry["size"], QLocale.system())
                     self.__filenameCache.append(dirEntry["name"])
                 itm = QTreeWidgetItem(
-                    self.listing,
-                    [dirEntry["name"], sizeStr, type_, dirEntry["mtime"]]
+                    self.listing, [dirEntry["name"], sizeStr, type_, dirEntry["mtime"]]
                 )
                 itm.setIcon(0, EricPixmapCache.getIcon(iconName))
                 itm.setTextAlignment(1, Qt.AlignmentFlag.AlignRight)
@@ -635,8 +626,7 @@
                     self,
                     title,
                     self.tr(
-                        "<p>The renaming operation failed.</p>"
-                        "<p>Reason: {0}</p>"
+                        "<p>The renaming operation failed.</p><p>Reason: {0}</p>"
                     ).format(error if error else self.tr("Unknown")),
                 )
 
@@ -675,8 +665,7 @@
                     self,
                     title,
                     self.tr(
-                        "<p>The deletion operation failed.</p>"
-                        "<p>Reason: {0}</p>"
+                        "<p>The deletion operation failed.</p><p>Reason: {0}</p>"
                     ).format(error if error else self.tr("Unknown")),
                 )
 
@@ -695,7 +684,7 @@
     def selectedFiles(self):
         """
         Public method to get the selected files or the current viewport path.
-        
+
         @return selected files or current viewport path
         @rtype str
         """
@@ -707,7 +696,7 @@
     def selectedNameFilter(self):
         """
         Public method to get the selected name filter.
-        
+
         @return selected name filter
         @rtype str
         """
@@ -737,9 +726,8 @@
         for row in range(self.listing.topLevelItemCount()):
             itm = self.listing.topLevelItem(row)
             name = itm.text(0)
-            if (
-                self.__dirsOnly
-                and not itm.data(0, EricServerFileDialog.IsDirectoryRole)
+            if self.__dirsOnly and not itm.data(
+                0, EricServerFileDialog.IsDirectoryRole
             ):
                 itm.setHidden(True)
             elif not self.__showHidden and self.__isHidden(name):
@@ -755,14 +743,19 @@
         for column in range(4):
             self.listing.resizeColumnToContents(column)
 
+
 ###########################################################################
 ## Module functions mimicing the interface of EricFileDialog/QFileDialog
 ###########################################################################
 
 
 def getOpenFileName(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get the name of a file for opening it.
@@ -789,8 +782,12 @@
 
 
 def getOpenFileNameAndFilter(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get the name of a file for opening it and the selected
@@ -832,8 +829,12 @@
 
 
 def getOpenFileNames(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get a list of names of files for opening.
@@ -860,8 +861,12 @@
 
 
 def getOpenFileNamesAndFilter(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get a list of names of files for opening and the
@@ -905,8 +910,12 @@
 
 
 def getSaveFileName(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get the name of a file for saving.
@@ -933,8 +942,12 @@
 
 
 def getSaveFileNameAndFilter(
-    parent=None, caption="", directory="", filterStr="", initialFilter="",
-    withRemote=True
+    parent=None,
+    caption="",
+    directory="",
+    filterStr="",
+    initialFilter="",
+    withRemote=True,
 ):
     """
     Module function to get the name of a file for saving and the selected file name
--- a/src/eric7/RemoteServerInterface/EricServerInterface.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerInterface.py	Thu Feb 22 16:34:43 2024 +0100
@@ -119,18 +119,21 @@
                     from .EricServerFileSystemInterface import (  # noqa: I101
                         EricServerFileSystemInterface,
                     )
-                    self.__serviceInterfaces[lname] = (
-                        EricServerFileSystemInterface(self)
+
+                    self.__serviceInterfaces[lname] = EricServerFileSystemInterface(
+                        self
                     )
                 elif lname == "debugger":
                     from .EricServerDebuggerInterface import (  # noqa: I101
                         EricServerDebuggerInterface,
                     )
+
                     self.__serviceInterfaces[lname] = EricServerDebuggerInterface(self)
                 elif lname == "coverage":
                     from .EricServerCoverageInterface import (  # noqa: I101
                         EricServerCoverageInterface,
                     )
+
                     self.__serviceInterfaces[lname] = EricServerCoverageInterface(self)
                 elif lname == "project":
                     # TODO: 'Project Interface' not implemented yet
@@ -183,7 +186,7 @@
                     self.__connection.errorString(),
                 ),
             )
-            
+
             self.__connection = None
             return False
 
@@ -407,11 +410,11 @@
             raise ValueError(f"unsupported reply received ({reply})")
 
         else:
-            hostname = params['hostname']
-            versionText = self.tr(
-                "<h2>{0}Version Numbers</h2><table>"
-            ).format(self.tr("{0} - ").format(hostname) if hostname else "")
-    
+            hostname = params["hostname"]
+            versionText = self.tr("<h2>{0}Version Numbers</h2><table>").format(
+                self.tr("{0} - ").format(hostname) if hostname else ""
+            )
+
             # Python version
             versionText += (
                 """<tr><td><b>Python</b></td><td>{0}, {1}</td></tr>"""
@@ -445,14 +448,16 @@
         """
         if reply == "ClientChecksumException":
             self.__ui.appendToStderr(
-                self.tr("eric-ide Server Checksum Error\nError: {0}\nData:\n{1}\n")
-                .format(params["ExceptionValue"], params["ProtocolData"])
+                self.tr(
+                    "eric-ide Server Checksum Error\nError: {0}\nData:\n{1}\n"
+                ).format(params["ExceptionValue"], params["ProtocolData"])
             )
 
         elif reply == "ClientException":
             self.__ui.appendToStderr(
-                self.tr("eric-ide Server Data Error\nError: {0}\nData:\n{1}\n")
-                .format(params["ExceptionValue"], params["ProtocolData"])
+                self.tr("eric-ide Server Data Error\nError: {0}\nData:\n{1}\n").format(
+                    params["ExceptionValue"], params["ProtocolData"]
+                )
             )
 
         elif reply == "UnsupportedServiceCategory":
--- a/src/eric7/RemoteServerInterface/EricServerProfilesDialog.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerProfilesDialog.py	Thu Feb 22 16:34:43 2024 +0100
@@ -112,9 +112,7 @@
         yes = EricMessageBox.yesNo(
             self,
             self.tr("Remove Selected Entries"),
-            self.tr(
-                "Do you really want to remove the selected entries from the list?"
-            ),
+            self.tr("Do you really want to remove the selected entries from the list?"),
         )
         if yes:
             for itm in self.connectionsList.selectedItems()[:]:
--- a/src/eric7/SystemUtilities/FileSystemUtilities.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/SystemUtilities/FileSystemUtilities.py	Thu Feb 22 16:34:43 2024 +0100
@@ -563,9 +563,8 @@
                 continue
 
             if dirEntry.is_dir():
-                if (
-                    dirEntry.path in ignoreList
-                    or dirEntry.is_symlink() and not followsymlinks
+                if dirEntry.path in ignoreList or (
+                    dirEntry.is_symlink() and not followsymlinks
                 ):
                     continue
                 if recursive:
--- a/src/eric7/ViewManager/ViewManager.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/ViewManager/ViewManager.py	Thu Feb 22 16:34:43 2024 +0100
@@ -794,7 +794,7 @@
         self.saveAsRemoteAct.setStatusTip(
             QCoreApplication.translate(
                 "ViewManager",
-                "Save the current file to a new one on an eric-ide server"
+                "Save the current file to a new one on an eric-ide server",
             )
         )
         self.saveAsRemoteAct.setWhatsThis(
@@ -8190,7 +8190,9 @@
             fn = self.activeWindow().getFileName()
             if forRemote and FileSystemUtilities.isRemoteFileName(fn):
                 return (
-                    ericApp().getObject("EricServer").getServiceInterface("FileSystem")
+                    ericApp()
+                    .getObject("EricServer")
+                    .getServiceInterface("FileSystem")
                     .dirname(fn)
                 )
             if not forRemote and FileSystemUtilities.isPlainFileName(fn):
@@ -8199,9 +8201,8 @@
         # check, if there is an active project and return its path
         if ericApp().getObject("Project").isOpen():
             ppath = ericApp().getObject("Project").ppath
-            if (
-                (forRemote and FileSystemUtilities.isRemoteFileName(ppath))
-                or (not forRemote and FileSystemUtilities.isPlainFileName(ppath))
+            if (forRemote and FileSystemUtilities.isRemoteFileName(ppath)) or (
+                not forRemote and FileSystemUtilities.isPlainFileName(ppath)
             ):
                 return ppath
 
--- a/src/eric7/eric7_server.py	Thu Feb 22 16:26:46 2024 +0100
+++ b/src/eric7/eric7_server.py	Thu Feb 22 16:34:43 2024 +0100
@@ -40,7 +40,7 @@
         "--port",
         type=int,
         default=42024,
-        help="Listen on the given port for connections from an eric IDE."
+        help="Listen on the given port for connections from an eric IDE.",
     )
     parser.add_argument(
         "-6",
@@ -51,7 +51,7 @@
             "This system supports this feature."
             if socket.has_dualstack_ipv6()
             else "This system does not support this feature. Option will be ignored."
-        )
+        ),
     )
     parser.add_argument(
         "-V",

eric ide

mercurial