Skip to content

Commit 797e487

Browse files
committed
fix bug in fixlongargs - it was not expecting functions with no keyword args
1 parent 91503ec commit 797e487

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bpython/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ def fixlongargs(f, argspec):
122122
whose str() is too big will cause breakage, so we swap out the object
123123
itself with the name it was referenced with in the source by parsing the
124124
source itself !"""
125+
if argspec[3] is None:
126+
# No keyword args, no need to do anything
127+
return
125128
values = list(argspec[3])
126129
if not values:
127130
return

0 commit comments

Comments
 (0)