Bugfix: remove first arg instead of self to make the function more robust and worked for classmethod

This commit is contained in:
Xiaoquan Kong 2018-11-19 18:59:25 +08:00
parent 90085327b2
commit 95ab395eef

View File

@ -55,7 +55,7 @@ def fn_args(fn):
fn = fn.__call__
args = tf_inspect.getfullargspec(fn).args
if _is_bounded_method(fn):
args.remove('self')
args.pop(0) # remove `self` or `cls`
return tuple(args)