Skip to content

Commit c1d7769

Browse files
author
Lukas Schrangl
committed
Pass all kwargs from pipeline to _pipeline
This a) errors out on invalid keywords, typos, etc. and b) makes it easier to add additional keyword args to `_pipeline`; they just need to be added in the `_pipeline` def.
1 parent 265960c commit c1d7769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slicerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,15 +511,15 @@ def pipeline(func=None, **kwargs):
511511
>>> red_img = red_channel(single_img) # normal behavior
512512
"""
513513
def wrapper(f):
514-
return _pipeline(f, kwargs.get("retain_doc", False))
514+
return _pipeline(f, **kwargs)
515515

516516
if func is None:
517517
return wrapper
518518
else:
519519
return wrapper(func)
520520

521521

522-
def _pipeline(func, retain_doc):
522+
def _pipeline(func, retain_doc=False):
523523
"""Actual `pipeline` implementation
524524
525525
Parameters

0 commit comments

Comments
 (0)