Skip to content

Commit 890f082

Browse files
committed
Treat classes as bound methods in get_args().
1 parent 3b92525 commit 890f082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,8 @@ def getargspec(func):
575575
else:
576576
self.current_func = f
577577

578-
is_bound_method = inspect.ismethod(f) and f.im_self is not None
578+
is_bound_method = (inspect.isclass(f) or
579+
(inspect.ismethod(f) and f.im_self is not None))
579580
try:
580581
if inspect.isclass(f):
581582
self.current_func = f

0 commit comments

Comments
 (0)