fatf.utils.validation.get_required_parameters_number

fatf.utils.validation.get_required_parameters_number(callable_object: Callable) → int[source]

Checks if a callable object has the correct number of required parameters.

New in version 0.0.2.

A callable object can be a function or a method.

Parameters
callable_objectcallable

A callable object to be tested.

Returns
required_param_ninteger

The number of required parameters that callable_object takes.

Raises
TypeError

The callable_object is not a Python callable, i.e., a function or a method.