diff options
author | Tian Gao <gaogaotiantian@hotmail.com> | 2024-10-25 04:17:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-25 04:17:58 (GMT) |
commit | 2513593303b306cd8273682811d26600651c60e4 (patch) | |
tree | 8671202dd93e08c1f6b4207cfb560f53df37c651 /Lib | |
parent | 371c537dff0b384e46ebe6b08009f6628b7acd58 (diff) | |
download | cpython-2513593303b306cd8273682811d26600651c60e4.zip cpython-2513593303b306cd8273682811d26600651c60e4.tar.gz cpython-2513593303b306cd8273682811d26600651c60e4.tar.bz2 |
Fixed a few type mismatches in pdb (#125952)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pdb.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 @@ class Pdb(bdb.Bdb, cmd.Cmd): 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 @@ class Pdb(bdb.Bdb, cmd.Cmd): 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 @@ class Pdb(bdb.Bdb, cmd.Cmd): 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 |