bilby.core.utils.introspection.infer_parameters_from_function
- bilby.core.utils.introspection.infer_parameters_from_function(func)[source]
Infers the arguments of a function (except the first arg which is assumed to be the dep. variable).
Throws out *args and **kwargs type arguments
Can deal with type hinting!
- Parameters:
- func: Callable
The callable object for which the parameters should be inferred.
- Returns:
- list: A list of strings with the parameters
- Raises:
- ValueError
If the object passed to the function is not callable.
Notes
If a class method is passed, this function will additionally strip the reference to the instance (conventionally named self).