spekk.transformations.base.Specced#
- class spekk.transformations.base.Specced(f: callable, transform_spec: Callable[[Spec], Spec])[source]#
Bases:
BuildableA wrapper around
fthat has information about what happens to the spec when the function is called.Methods
__init__(f, transform_spec)build(input_spec)Return a copy of this object with information about what happens to the spec when the function is called.
Attributes
The spec for the input kwargs for the function.
The spec of the final returned value from the transformed function.
The spec for the input kwargs that are passed down into the wrapped function after the transformation has been applied.
The spec of the returned value from the wrapped function.
The function to wrap.
A function that transforms the spec, returning the spec of the return-value of
f.- build(input_spec: Spec) Specced[source]#
Return a copy of this object with information about what happens to the spec when the function is called.
- f: callable#
The function to wrap.
- output_spec: Spec | None = None#
The spec of the final returned value from the transformed function.