src/eric7/DebugClients/Python/DebugBase.py

branch
eric7
changeset 10331
c1a2ff7e3575
parent 10321
4a017fdf316f
child 10417
c6011e501282
diff -r 5ea038882dd6 -r c1a2ff7e3575 src/eric7/DebugClients/Python/DebugBase.py
--- a/src/eric7/DebugClients/Python/DebugBase.py	Tue Nov 21 11:42:45 2023 +0100
+++ b/src/eric7/DebugClients/Python/DebugBase.py	Wed Nov 22 17:19:10 2023 +0100
@@ -682,7 +682,7 @@
 
             try:
                 lineNumbers = [
-                    l for _, _, l in frame.f_code.co_lines() if l is not None
+                    line for _, _, line in frame.f_code.co_lines() if line is not None
                 ]
             except AttributeError:
                 # backward compatibility code for Python 3.10 and below
@@ -777,7 +777,7 @@
         tb_lineno = None
         if frame is None:
             fr = self.getFrame()
-        elif type(frame) is list:
+        elif isinstance(frame, list):
             fr, tb_lineno = frame.pop(0)
         else:
             fr = frame
@@ -826,7 +826,7 @@
             stack.append([fname, fline, ffunc, fargs])
 
             # is it a stack frame or exception list?
-            if type(frame) is list:
+            if isinstance(frame, list):
                 if frame != []:
                     fr, tb_lineno = frame.pop(0)
                 else:

eric ide

mercurial