src/eric7/DebugClients/Python/SubprocessExtension.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9473
3f23dbf37dbe
--- a/src/eric7/DebugClients/Python/SubprocessExtension.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/DebugClients/Python/SubprocessExtension.py	Wed Jul 13 14:55:47 2022 +0200
@@ -12,8 +12,10 @@
 import shlex
 
 from DebugUtilities import (
-    isPythonProgram, patchArguments, stringToArgumentsWindows,
-    isWindowsPlatform
+    isPythonProgram,
+    patchArguments,
+    stringToArgumentsWindows,
+    isWindowsPlatform,
 )
 
 _debugClient = None
@@ -22,22 +24,23 @@
 def patchSubprocess(module, debugClient):
     """
     Function to patch the subprocess module.
-    
+
     @param module reference to the imported module to be patched
     @type module
     @param debugClient reference to the debug client object
     @type DebugClient
-    """     # __IGNORE_WARNING_D234__
+    """  # __IGNORE_WARNING_D234__
     global _debugClient
-    
+
     class PopenWrapper(module.Popen):
         """
         Wrapper class for subprocess.Popen.
         """
+
         def __init__(self, arguments, *args, **kwargs):
             """
             Constructor
-            
+
             @param arguments command line arguments for the new process
             @type list of str or str
             @param args constructor arguments of Popen
@@ -46,16 +49,16 @@
             @type dict
             """
             if (
-                _debugClient.debugging and
-                _debugClient.multiprocessSupport and
-                isinstance(arguments, (str, list))
+                _debugClient.debugging
+                and _debugClient.multiprocessSupport
+                and isinstance(arguments, (str, list))
             ):
                 if isinstance(arguments, str):
                     # convert to arguments list
                     arguments = (
                         stringToArgumentsWindows(arguments)
-                        if isWindowsPlatform() else
-                        shlex.split(arguments)
+                        if isWindowsPlatform()
+                        else shlex.split(arguments)
                     )
                 else:
                     # create a copy of the arguments
@@ -67,8 +70,8 @@
                         arguments = patchArguments(
                             _debugClient, arguments, noRedirect=True
                         )
-            
+
             super().__init__(arguments, *args, **kwargs)
-    
+
     _debugClient = debugClient
     module.Popen = PopenWrapper

eric ide

mercurial