https://github.com/python/cpython/commit/2513593303b306cd8273682811d26600651c60e4
commit: 2513593303b306cd8273682811d26600651c60e4
branch: main
author: Tian Gao <[email protected]>
committer: gaogaotiantian <[email protected]>
date: 2024-10-25T00:17:58-04:00
summary:

Fixed a few type mismatches in pdb (#125952)

files:
M Lib/pdb.py

diff --git a/Lib/pdb.py b/Lib/pdb.py
index 3c0cbb525e28ef..b7f6fd4323407e 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -127,7 +127,7 @@ def find_function(funcname, filename):
             return None
         fp = io.StringIO(''.join(lines))
     funcdef = ""
-    funcstart = None
+    funcstart = 0
     # consumer of this info expects the first line to be 1
     with fp:
         for lineno, line in enumerate(fp, start=1):
@@ -783,7 +783,7 @@ def _replace_convenience_variables(self, line):
         if "$" not in line:
             return line
 
-        dollar_start = dollar_end = -1
+        dollar_start = dollar_end = (-1, -1)
         replace_variables = []
         try:
             for t in tokenize.generate_tokens(io.StringIO(line).readline):
@@ -1088,7 +1088,7 @@ def do_commands(self, arg):
 
     complete_commands = _complete_bpnumber
 
-    def do_break(self, arg, temporary = 0):
+    def do_break(self, arg, temporary=False):
         """b(reak) [ ([filename:]lineno | function) [, condition] ]
 
         Without argument, list all breaks.
@@ -1203,7 +1203,7 @@ def do_tbreak(self, arg):
         Same arguments as break, but sets a temporary breakpoint: it
         is automatically deleted when first hit.
         """
-        self.do_break(arg, 1)
+        self.do_break(arg, True)
 
     complete_tbreak = _complete_location
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to