@@ -75,6 +75,9 @@ def pytask_parametrize_task(session, name, obj):
7575 :func:`zip`, multiple ``@pytask.mark.parametrize`` decorators form a Cartesian
7676 product.
7777
78+ We cannot raise an error if the function does not use parametrized arguments since
79+ some plugins will replace functions with their own implementation like pytask-r.
80+
7881 """
7982 if callable (obj ):
8083 obj , markers = _remove_parametrize_markers_from_func (obj )
@@ -125,11 +128,11 @@ def pytask_parametrize_task(session, name, obj):
125128
126129def _remove_parametrize_markers_from_func (obj ):
127130 """Remove parametrize markers from the object."""
128- parametrize = [i for i in obj .pytaskmark if i .name == "parametrize" ]
131+ parametrize_markers = [i for i in obj .pytaskmark if i .name == "parametrize" ]
129132 others = [i for i in obj .pytaskmark if i .name != "parametrize" ]
130133 obj .pytaskmark = others
131134
132- return obj , parametrize
135+ return obj , parametrize_markers
133136
134137
135138def _parse_parametrize_marker (marker ):
@@ -336,9 +339,9 @@ def _copy_func(func: Callable[[Any], Any]) -> Callable[[Any], Any]:
336339
337340 Example
338341 -------
339- >>> def func (): pass
340- >>> copied_func = _copy_func(func )
341- >>> func == copied_func
342+ >>> def _func (): pass
343+ >>> copied_func = _copy_func(_func )
344+ >>> _func == copied_func
342345 False
343346
344347 """
0 commit comments