We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 166d2d2 commit 811de70Copy full SHA for 811de70
src/pyff/pipes.py
@@ -31,6 +31,10 @@ def pipe_decorator(f: Callable) -> Callable:
31
32
@functools.wraps(f)
33
def wrapper_pipe(*iargs, **ikwargs) -> Any:
34
+ # the 'opts' parameter gets special treatment:
35
+ # locate the type annotation of 'opts' and if it exists assume it refers to a pydantic dataclass
36
+ # before propagating the call to the wrapped function replace opts with the pydantic dataclass object
37
+ # created from the Tuple provided
38
opts_type: Optional[Type] = None
39
if 'opts' in f.__annotations__:
40
opts_type = f.__annotations__['opts']
0 commit comments