diff -r 5d807e997391 -r c6011e501282 src/eric7/DebugClients/Python/DebugClientBase.py --- a/src/eric7/DebugClients/Python/DebugClientBase.py Sat Dec 16 17:52:02 2023 +0100 +++ b/src/eric7/DebugClients/Python/DebugClientBase.py Sun Dec 17 17:15:19 2023 +0100 @@ -81,7 +81,8 @@ """ Replacement for the standard os.close(fd). - @param fd open file descriptor to be closed (integer) + @param fd open file descriptor to be closed + @type int """ if DebugClientInstance is None: DebugClientOrigClose(fd) @@ -101,7 +102,8 @@ """ Replacement for the standard sys.setrecursionlimit(limit). - @param limit recursion limit (integer) + @param limit recursion limit + @type int """ rl = max(limit, 64) setRecursionLimit(rl) @@ -207,7 +209,8 @@ """ Public method to return the current coding. - @return codec name (string) + @return codec name + @rtype str """ return self.__coding @@ -215,7 +218,8 @@ """ Private method to set the coding used by a python file. - @param filename name of the file to inspect (string) + @param filename name of the file to inspect + @type str """ if self.noencoding: self.__coding = sys.getdefaultencoding() @@ -263,7 +267,8 @@ Public method to close the session with the debugger and optionally terminate. - @param terminate flag indicating to terminate (boolean) + @param terminate flag indicating to terminate + @type bool """ with contextlib.suppress(Exception): # secok self.set_quit() @@ -341,7 +346,7 @@ @param jsonStr string containing the command received from the IDE @type str """ - ## printerr(jsonStr) ## debug # __IGNORE_WARNING_M891__ + ## printerr(jsonStr) ## debug # noqa: M891 try: commandDict = json.loads(jsonStr.strip()) @@ -892,7 +897,7 @@ @param filename name of the file the bp belongs to @type str - @param lineno linenumber of the bp + @param lineno line number of the bp @type int """ self.sendJsonCommand( @@ -1029,7 +1034,8 @@ """ Private method to determine the clients capabilities. - @return client capabilities (integer) + @return client capabilities + @rtype int """ if importlib.util.find_spec("PyProfile") is None: return self.clientCapabilities & ~DebugClientCapabilities.HasProfiler @@ -1088,7 +1094,8 @@ Public method implementing our event loop. @param disablePolling flag indicating to enter an event loop with - polling disabled (boolean) + polling disabled + @type bool """ self.eventExit = False self.pollingDisabled = disablePolling @@ -1220,9 +1227,12 @@ """ Private method called to report an uncaught exception. - @param exctype the type of the exception - @param excval data about the exception + @param exctype class of the exception + @type type + @param excval exception instance + @type Exception @param exctb traceback for the exception + @type traceback """ self.mainThread.user_exception((exctype, excval, exctb), True) @@ -1295,8 +1305,10 @@ sys.path is used as a set of possible prefixes. The name stays relative if a file could not be found. - @param fn filename (string) - @return the converted filename (string) + @param fn filename + @type str + @return the converted filename + @rtype str """ if os.path.isabs(fn): return fn @@ -1333,7 +1345,8 @@ """ Public method to return the main script we are currently running. - @return flag indicating a running debug session (boolean) + @return flag indicating a running debug session + @rtype bool """ return self.running @@ -1675,8 +1688,10 @@ Private slot to convert a filter string to a list of filter objects. @param scope 1 to generate filter for global variables, 0 for local - variables (int) + variables + @type int @param filterString string of filter patterns separated by ';' + @type str """ patternFilterObjects = None filterString = filterString.strip() @@ -1703,7 +1718,8 @@ """ Private slot to handle the request for a commandline completion list. - @param text the text to be completed (string) + @param text the text to be completed + @type str """ completerDelims = " \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?" @@ -1742,9 +1758,12 @@ """ Private method to create a completions list. - @param text text to complete (string) + @param text text to complete + @type str @param completer completer method - @param completions set where to add new completions strings (set) + @type function + @param completions set where to add new completions strings + @type set """ state = 0 try: @@ -1966,10 +1985,14 @@ """ Public method used to start the remote debugger and call a function. - @param scriptname name of the script to be debugged (string) + @param scriptname name of the script to be debugged + @type str @param func function to be called + @type function @param *args arguments being passed to func + @type list @return result of the function call + @rtype Any """ self.startDebugger(scriptname, enableTrace=False) res = self.mainThread.runcall(func, *args) @@ -1980,8 +2003,10 @@ """ Private method to resolve a hostname to an IP address. - @param host hostname of the debug server (string) - @return IP address (string) + @param host hostname of the debug server + @type str + @return IP address + @rtype str """ try: host, version = host.split("@@") @@ -2168,7 +2193,8 @@ It prevents the debugger connections from being closed. - @param fd file descriptor to be closed (integer) + @param fd file descriptor to be closed + @type int """ if fd in [ self.readstream.fileno(), @@ -2184,8 +2210,10 @@ Private slot to calculate a path list including the PYTHONPATH environment variable. - @param firstEntry entry to be put first in sys.path (string) - @return path list for use as sys.path (list of strings) + @param firstEntry entry to be put first in sys.path + @type str + @return path list for use as sys.path + @rtype list of str """ sysPath = [ path