Co-authored-by: tibequadorian <tibequadorian@posteo.de>
This commit is contained in:
parent
682a027d04
commit
06d8f491c4
|
@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0):
|
|||
Check whether the given function is defined in the module or not.
|
||||
"""
|
||||
if hasattr(module, method_name):
|
||||
if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args:
|
||||
if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue