mirror of https://github.com/flaggo/pydu.git
fix inspect.get_func_args on PY2
This commit is contained in:
parent
bb6b045a61
commit
6533079157
|
@ -15,7 +15,9 @@ if PY2:
|
|||
|
||||
def get_func_args(func):
|
||||
argspec = inspect.getargspec(func)
|
||||
return argspec.args[1:] # ignore 'self'
|
||||
if inspect.ismethod(func):
|
||||
return argspec[1:] # ignore 'self'
|
||||
return argspec.args
|
||||
|
||||
|
||||
def get_func_full_args(func):
|
||||
|
|
Loading…
Reference in New Issue