Skip to content

Commit

Permalink
fix kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Nov 13, 2024
1 parent 1230273 commit 47c3af7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controlflow/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def flow(
sig = inspect.signature(fn)

def create_flow_context(bound_args):
flow_kwargs: dict[str, Any] = {}
flow_kwargs: dict[str, Any] = kwargs.copy()
if thread is not None:
flow_kwargs["thread_id"] = thread
if tools is not None:
Expand Down Expand Up @@ -143,7 +143,7 @@ def task(
retries: Optional[int] = None,
retry_delay_seconds: Optional[Union[float, int]] = None,
timeout_seconds: Optional[Union[float, int]] = None,
**kwargs: Any,
**task_kwargs: Any,
) -> Callable[[Callable[P, R]], PrefectTask[P, R]]:
"""
A decorator that turns a Python function into a Task. The Task objective is
Expand Down Expand Up @@ -204,7 +204,7 @@ def _get_task(*args, **kwargs) -> Task:
result_type=result_type,
interactive=interactive or False,
tools=tools or [],
**kwargs,
**task_kwargs,
)

if asyncio.iscoroutinefunction(func):
Expand Down

0 comments on commit 47c3af7

Please sign in to comment.