src/eric7/Debugger/DebuggerInterfaceNone.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9473
3f23dbf37dbe
--- a/src/eric7/Debugger/DebuggerInterfaceNone.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Debugger/DebuggerInterfaceNone.py	Wed Jul 13 14:55:47 2022 +0200
@@ -11,7 +11,7 @@
 
 
 ClientDefaultCapabilities = 0
-    
+
 ClientTypeAssociations = []
 
 
@@ -19,30 +19,38 @@
     """
     Class implementing a dummy debugger interface for the debug server.
     """
+
     def __init__(self, debugServer, passive):
         """
         Constructor
-        
+
         @param debugServer reference to the debug server
         @type DebugServer
         @param passive flag indicating passive connection mode
         @type bool
         """
         super().__init__()
-        
+
         self.debugServer = debugServer
         self.passive = passive
-        
+
         self.qsock = None
         self.queue = []
         # set default values for capabilities of clients
         self.clientCapabilities = ClientDefaultCapabilities
-        
-    def startRemote(self, port, runInConsole, venvName, originalPathString,
-                    workingDir=None, configOverride=None):
+
+    def startRemote(
+        self,
+        port,
+        runInConsole,
+        venvName,
+        originalPathString,
+        workingDir=None,
+        configOverride=None,
+    ):
         """
         Public method to start a remote Python interpreter.
-        
+
         @param port port number the debug server is listening on
         @type int
         @param runInConsole flag indicating to start the debugger in a
@@ -63,12 +71,18 @@
         """
         return None, True, ""
 
-    def startRemoteForProject(self, port, runInConsole, venvName,
-                              originalPathString, workingDir=None,
-                              configOverride=None):
+    def startRemoteForProject(
+        self,
+        port,
+        runInConsole,
+        venvName,
+        originalPathString,
+        workingDir=None,
+        configOverride=None,
+    ):
         """
         Public method to start a remote Python interpreter for a project.
-        
+
         @param port port number the debug server is listening on
         @type int
         @param runInConsole flag indicating to start the debugger in a
@@ -92,65 +106,72 @@
     def getClientCapabilities(self):
         """
         Public method to retrieve the debug clients capabilities.
-        
+
         @return debug client capabilities
         @rtype int
         """
         return self.clientCapabilities
-        
+
     def newConnection(self, sock):
         """
         Public slot to handle a new connection.
-        
+
         @param sock reference to the socket object
         @type QTcpSocket
         @return flag indicating success
         @rtype bool
         """
         return False
-    
+
     def getDebuggerIds(self):
         """
         Public method to return the IDs of the connected debugger backends.
-        
+
         @return list of connected debugger backend IDs
         @rtype list of str
         """
         return []
-        
+
     def shutdown(self):
         """
         Public method to cleanly shut down.
-        
+
         It closes our socket and shuts down the debug client.
         (Needed on Win OS)
         """
         self.qsock = None
         self.queue = []
-        
+
     def isConnected(self):
         """
         Public method to test, if a debug client has connected.
-        
+
         @return flag indicating the connection status
         @rtype bool
         """
         return self.qsock is not None
-        
+
     def remoteEnvironment(self, env):
         """
         Public method to set the environment for a program to debug, run, ...
-        
+
         @param env environment settings
         @type dict
         """
         return
-        
-    def remoteLoad(self, fn, argv, wd, traceInterpreter=False,
-                   autoContinue=True, enableMultiprocess=False):
+
+    def remoteLoad(
+        self,
+        fn,
+        argv,
+        wd,
+        traceInterpreter=False,
+        autoContinue=True,
+        enableMultiprocess=False,
+    ):
         """
         Public method to load a new program to debug.
-        
+
         @param fn the filename to debug
         @type str
         @param argv the commandline arguments to pass to the program
@@ -168,11 +189,11 @@
         @type bool
         """
         return
-        
+
     def remoteRun(self, fn, argv, wd):
         """
         Public method to load a new program to run.
-        
+
         @param fn the filename to run
         @type str
         @param argv the commandline arguments to pass to the program
@@ -181,11 +202,11 @@
         @type str
         """
         return
-        
+
     def remoteCoverage(self, fn, argv, wd, erase=False):
         """
         Public method to load a new program to collect coverage data.
-        
+
         @param fn the filename to run
         @type str
         @param argv the commandline arguments to pass to the program
@@ -201,7 +222,7 @@
     def remoteProfile(self, fn, argv, wd, erase=False):
         """
         Public method to load a new program to collect profiling data.
-        
+
         @param fn the filename to run
         @type str
         @param argv the commandline arguments to pass to the program
@@ -217,7 +238,7 @@
     def remoteStatement(self, debuggerId, stmt):
         """
         Public method to execute a Python statement.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param stmt the Python statement to execute.
@@ -229,7 +250,7 @@
     def remoteStep(self, debuggerId):
         """
         Public method to single step the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
@@ -238,7 +259,7 @@
     def remoteStepOver(self, debuggerId):
         """
         Public method to step over the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
@@ -247,7 +268,7 @@
     def remoteStepOut(self, debuggerId):
         """
         Public method to step out the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
@@ -256,7 +277,7 @@
     def remoteStepQuit(self, debuggerId):
         """
         Public method to stop the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
@@ -265,7 +286,7 @@
     def remoteContinue(self, debuggerId, special=False):
         """
         Public method to continue the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param special flag indicating a special continue operation
@@ -277,7 +298,7 @@
         """
         Public method to continue the debugged program to the given line
         or until returning from the current frame.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param line the new line, where execution should be continued to
@@ -288,7 +309,7 @@
     def remoteMoveIP(self, debuggerId, line):
         """
         Public method to move the instruction pointer to a different line.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param line the new line, where execution should be continued
@@ -296,11 +317,12 @@
         """
         return
 
-    def remoteBreakpoint(self, debuggerId, fn, line, setBreakpoint, cond=None,
-                         temp=False):
+    def remoteBreakpoint(
+        self, debuggerId, fn, line, setBreakpoint, cond=None, temp=False
+    ):
         """
         Public method to set or clear a breakpoint.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param fn filename the breakpoint belongs to
@@ -315,11 +337,11 @@
         @type bool
         """
         return
-        
+
     def remoteBreakpointEnable(self, debuggerId, fn, line, enable):
         """
         Public method to enable or disable a breakpoint.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param fn filename the breakpoint belongs to
@@ -330,11 +352,11 @@
         @type bool
         """
         return
-        
+
     def remoteBreakpointIgnore(self, debuggerId, fn, line, count):
         """
         Public method to ignore a breakpoint the next couple of occurrences.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param fn filename the breakpoint belongs to
@@ -345,11 +367,11 @@
         @type int
         """
         return
-        
+
     def remoteWatchpoint(self, debuggerId, cond, setWatch, temp=False):
         """
         Public method to set or clear a watch expression.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param cond expression of the watch expression
@@ -360,11 +382,11 @@
         @type bool
         """
         return
-    
+
     def remoteWatchpointEnable(self, debuggerId, cond, enable):
         """
         Public method to enable or disable a watch expression.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param cond expression of the watch expression
@@ -373,12 +395,12 @@
         @type bool
         """
         return
-    
+
     def remoteWatchpointIgnore(self, debuggerId, cond, count):
         """
         Public method to ignore a watch expression the next couple of
         occurrences.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param cond expression of the watch expression
@@ -387,52 +409,53 @@
         @type int
         """
         return
-    
+
     def remoteRawInput(self, debuggerId, inputString):
         """
         Public method to send the raw input to the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param inputString the raw input
         @type str
         """
         return
-        
+
     def remoteThreadList(self, debuggerId):
         """
         Public method to request the list of threads from the client.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
         return
-        
+
     def remoteSetThread(self, debuggerId, tid):
         """
         Public method to request to set the given thread as current thread.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param tid id of the thread
         @type int
         """
         return
-    
+
     def remoteClientStack(self, debuggerId):
         """
         Public method to request the stack of the main thread.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
         return
-    
-    def remoteClientVariables(self, debuggerId, scope, filterList, framenr=0,
-                              maxSize=0):
+
+    def remoteClientVariables(
+        self, debuggerId, scope, filterList, framenr=0, maxSize=0
+    ):
         """
         Public method to request the variables of the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param scope the scope of the variables (0 = local, 1 = global)
@@ -447,12 +470,13 @@
         @type int
         """
         return
-        
-    def remoteClientVariable(self, debuggerId, scope, filterList, var,
-                             framenr=0, maxSize=0):
+
+    def remoteClientVariable(
+        self, debuggerId, scope, filterList, var, framenr=0, maxSize=0
+    ):
         """
         Public method to request the variables of the debugged program.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param scope the scope of the variables (0 = local, 1 = global)
@@ -469,20 +493,20 @@
         @type int
         """
         return
-    
+
     def remoteClientDisassembly(self, debuggerId):
         """
         Public method to ask the client for the latest traceback disassembly.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
         return
-        
+
     def remoteClientSetFilter(self, debuggerId, scope, filterStr):
         """
         Public method to set a variables filter list.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param scope the scope of the variables (0 = local, 1 = global)
@@ -491,52 +515,52 @@
         @type str
         """
         return
-        
+
     def setCallTraceEnabled(self, debuggerId, on):
         """
         Public method to set the call trace state.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param on flag indicating to enable the call trace function
         @type bool
         """
         return
-    
+
     def remoteNoDebugList(self, debuggerId, noDebugList):
         """
         Public method to set a list of programs not to be debugged.
-        
+
         The programs given in the list will not be run under the control
         of the multi process debugger.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param noDebugList list of Python programs not to be debugged
         @type list of str
         """
         return
-    
+
     def remoteBanner(self):
         """
         Public slot to get the banner info of the remote client.
         """
         return
-        
+
     def remoteCapabilities(self, debuggerId):
         """
         Public slot to get the debug clients capabilities.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         """
         return
-        
+
     def remoteCompletion(self, debuggerId, text):
         """
         Public slot to get the a list of possible commandline completions
         from the remote client.
-        
+
         @param debuggerId ID of the debugger backend
         @type str
         @param text the text to be completed
@@ -548,8 +572,8 @@
 def createDebuggerInterfaceNone(debugServer, passive):
     """
     Module function to create a debugger interface instance.
-    
-        
+
+
     @param debugServer reference to the debug server
     @type DebugServer
     @param passive flag indicating passive connection mode
@@ -563,11 +587,17 @@
 def getRegistryData():
     """
     Module function to get characterizing data for the debugger interface.
-    
+
     @return list of tuples containing the client type, the client capabilities,
         the client file type associations and a reference to the creation
         function
     @rtype list of tuple of (str, int, list of str, function)
     """
-    return [("None", ClientDefaultCapabilities, ClientTypeAssociations,
-            createDebuggerInterfaceNone)]
+    return [
+        (
+            "None",
+            ClientDefaultCapabilities,
+            ClientTypeAssociations,
+            createDebuggerInterfaceNone,
+        )
+    ]

eric ide

mercurial