Add support for inference of method arguments
Compare changes
This MR closes #409 (closed).
utils._infer_args_from_function_except_n_args
to allow an arbitrary number of arguments to be ignored.utils.infer_parameters_from_function
has been updated to infer if a passed argument is a function or a method (or will raise a ValueError
if it is neither.The behaviour of utils.infer_parameters_from_function
may not be considered optimal, as it will fail in the case that an object with a __call__()
method is passed as an argument. If you're keen for this form to be supported I can add an additional case for it.