Skip to content

Commit 2513593

Browse files
Fixed a few type mismatches in pdb (#125952)
1 parent 371c537 commit 2513593

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/pdb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def find_function(funcname, filename):
127127
return None
128128
fp = io.StringIO(''.join(lines))
129129
funcdef = ""
130-
funcstart = None
130+
funcstart = 0
131131
# consumer of this info expects the first line to be 1
132132
with fp:
133133
for lineno, line in enumerate(fp, start=1):
@@ -783,7 +783,7 @@ def _replace_convenience_variables(self, line):
783783
if "$" not in line:
784784
return line
785785

786-
dollar_start = dollar_end = -1
786+
dollar_start = dollar_end = (-1, -1)
787787
replace_variables = []
788788
try:
789789
for t in tokenize.generate_tokens(io.StringIO(line).readline):
@@ -1088,7 +1088,7 @@ def do_commands(self, arg):
10881088

10891089
complete_commands = _complete_bpnumber
10901090

1091-
def do_break(self, arg, temporary = 0):
1091+
def do_break(self, arg, temporary=False):
10921092
"""b(reak) [ ([filename:]lineno | function) [, condition] ]
10931093
10941094
Without argument, list all breaks.
@@ -1203,7 +1203,7 @@ def do_tbreak(self, arg):
12031203
Same arguments as break, but sets a temporary breakpoint: it
12041204
is automatically deleted when first hit.
12051205
"""
1206-
self.do_break(arg, 1)
1206+
self.do_break(arg, True)
12071207

12081208
complete_tbreak = _complete_location
12091209

0 commit comments

Comments
 (0)