Corrected some code style and formatting issues. server

Mon, 10 Jun 2024 16:34:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 10 Jun 2024 16:34:28 +0200
branch
server
changeset 10770
8b4ff92221da
parent 10769
33edb81a63b4
child 10771
69dfb1339451

Corrected some code style and formatting issues.

src/eric7/Debugger/StartDialog.py file | annotate | diff | comparison | revisions
src/eric7/Project/Project.py file | annotate | diff | comparison | revisions
src/eric7/RemoteServerInterface/EricServerFileSystemInterface.py file | annotate | diff | comparison | revisions
src/eric7/VirtualEnv/VirtualenvManager.py file | annotate | diff | comparison | revisions
--- a/src/eric7/Debugger/StartDialog.py	Mon Jun 10 16:28:21 2024 +0200
+++ b/src/eric7/Debugger/StartDialog.py	Mon Jun 10 16:34:28 2024 +0200
@@ -146,9 +146,9 @@
         else:
             self.venvComboBox.addItems(
                 sorted(
-                    ericApp().getObject("VirtualEnvManager").getVirtualenvNames(
-                        noServer=True
-                    )
+                    ericApp()
+                    .getObject("VirtualEnvManager")
+                    .getVirtualenvNames(noServer=True)
                 )
             )
 
--- a/src/eric7/Project/Project.py	Mon Jun 10 16:28:21 2024 +0200
+++ b/src/eric7/Project/Project.py	Mon Jun 10 16:34:28 2024 +0200
@@ -4614,9 +4614,8 @@
         @return path name of the embedded virtual environment
         @rtype str
         """
-        if (
-            self.__pdata["EMBEDDED_VENV"]
-            and not FileSystemUtilities.isRemoteFileName(self.ppath)
+        if self.__pdata["EMBEDDED_VENV"] and not FileSystemUtilities.isRemoteFileName(
+            self.ppath
         ):
             return self.__findEmbeddedEnvironment()
         else:
--- a/src/eric7/RemoteServerInterface/EricServerFileSystemInterface.py	Mon Jun 10 16:28:21 2024 +0200
+++ b/src/eric7/RemoteServerInterface/EricServerFileSystemInterface.py	Mon Jun 10 16:34:28 2024 +0200
@@ -9,6 +9,7 @@
 
 import base64
 import contextlib
+import logging
 import os
 import re
 import stat
@@ -1409,7 +1410,9 @@
                 _RemoteFsCache[FileSystemUtilities.remoteFileName(entry["path"])] = (
                     entry
                 )
-            print(f"Remote Cache Size: {len(_RemoteFsCache)} entries")
+            logging.getLogger(__name__).debug(
+                f"Remote Cache Size: {len(_RemoteFsCache)} entries"
+            )
         except OSError as err:
             print("Error in 'populateFsCache()':", str(err))  # noqa: M801
 
@@ -1423,4 +1426,6 @@
         for entryPath in list(_RemoteFsCache.keys()):
             if entryPath.startswith(directory):
                 del _RemoteFsCache[entryPath]
-        print(f"Remote Cache Size: {len(_RemoteFsCache)} entries")
+        logging.getLogger(__name__).debug(
+            f"Remote Cache Size: {len(_RemoteFsCache)} entries"
+        )
--- a/src/eric7/VirtualEnv/VirtualenvManager.py	Mon Jun 10 16:28:21 2024 +0200
+++ b/src/eric7/VirtualEnv/VirtualenvManager.py	Mon Jun 10 16:34:28 2024 +0200
@@ -736,17 +736,19 @@
         @param venvName logical name of the virtual environment
         @type str
         @param host name of the host to check for or empty string to just check for
-            an eric-ide server environment
+            an eric-ide server environment (defaults to "")
+        @type str (optional)
         @return flag indicating an eric-ide server environment
         @rtype bool
         """
         try:
             if host:
-                return (
-                    self.__virtualEnvironments[venvName].is_eric_server
-                    and self.__virtualEnvironments[venvName].eric_server.startswith(
-                        f"{host}:"
-                    )
+                return self.__virtualEnvironments[
+                    venvName
+                ].is_eric_server and self.__virtualEnvironments[
+                    venvName
+                ].eric_server.startswith(
+                    f"{host}:"
                 )
             else:
                 return self.__virtualEnvironments[venvName].is_eric_server

eric ide

mercurial