Skip to content

Commit 63e1951

Browse files
committed
Check if in_arg is an int in mkargspec().
Otherwise bpython will crash in mkargspec with bound methods and keyword arguments.
1 parent 87aad62 commit 63e1951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def mkargspec(self, topline, down):
784784
self.list_win.addstr(': (', get_colpair('name'))
785785
maxh = self.scr.getmaxyx()[0]
786786

787-
if is_bound_method:
787+
if is_bound_method and isinstance(in_arg, int):
788788
in_arg += 1
789789

790790
for k, i in enumerate(args):

0 commit comments

Comments
 (0)