Skip to content

Commit

Permalink
make decorator return wrapped function
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelteixeiraa committed Dec 14, 2023
1 parent 715e091 commit 7c655f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crinkle/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def decorator(
function_processor: Union[
TypeFunctionProcessor, TypeFunctionProcessorAsync
],
) -> None:
) -> Union[TypeFunctionProcessor, TypeFunctionProcessorAsync]:
if asyncio.iscoroutinefunction(function_processor):
self.add_processor(
processor=FunctionProcessorAsync(func=function_processor, name=name)
Expand All @@ -59,6 +59,7 @@ def decorator(
self.add_processor(
processor=FunctionProcessor(func=function_processor, name=name)
)
return function_processor

return decorator

Expand Down

0 comments on commit 7c655f0

Please sign in to comment.