src/eric7/VirtualEnv/VirtualenvManager.py

branch
server
changeset 10770
8b4ff92221da
parent 10766
d35d6f96c24b
child 10931
56f41b1e163a
--- 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