polymerist.genutils.decorators.signatures
Tools for simplifying transfer and modification of wrapped function type signatures
Attributes
Functions
|
Get the first Parameter index which follows all positional Parameters |
|
Insert a new Parameter into a Signature at a given position |
|
Returns a copy of a Signature with the type annotation of the Parameter at a given index swapped out |
|
Returns a copy of a Signature with the type annotation of the Parameter with a given name swapped out |
Module Contents
- polymerist.genutils.decorators.signatures.POSITIONAL_PARAMETER_TYPES
- polymerist.genutils.decorators.signatures.KEYWORD_PARAMETER_TYPES
- polymerist.genutils.decorators.signatures.get_index_after_positionals(sig: inspect.Signature) int[source]
Get the first Parameter index which follows all positional Parameters
- polymerist.genutils.decorators.signatures.insert_parameter_at_index(sig: inspect.Signature, new_param: inspect.Parameter, index: int) inspect.Signature[source]
Insert a new Parameter into a Signature at a given position