Skip to content

Commit 811de70

Browse files
committed
docs-ish
1 parent 166d2d2 commit 811de70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pyff/pipes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def pipe_decorator(f: Callable) -> Callable:
3131

3232
@functools.wraps(f)
3333
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
3438
opts_type: Optional[Type] = None
3539
if 'opts' in f.__annotations__:
3640
opts_type = f.__annotations__['opts']

0 commit comments

Comments
 (0)