drop_parameter

utilipy.utils.inspect.drop_parameter(sig: inspect.Signature, param: Union[str, int, inspect.Parameter]) inspect.Signature[source]

Drop a Parameter.

Parameters
sigSignature

Signature object

param: str, int, Parameter

the parameter to drop in self.parameters identified by either the name or index (Parameter type calls name)

Returns
Signature:

a new Signature object with the replaced parameter