Skip to content

Commit fe5e04a

Browse files
cleanup
Signed-off-by: Achille Roussel <[email protected]>
1 parent 1950ad8 commit fe5e04a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/dispatch/function.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ def __init__(
6767
self._primitive_func = primitive_func
6868
# FIXME: is there a way to decorate the function at the definition
6969
# without making it a class method?
70-
if coroutine:
71-
self._func = durable(self._call_async)
72-
else:
73-
self._func = func
70+
self._func = durable(self._call_async) if coroutine else func
7471

7572
def __call__(self, *args, **kwargs):
7673
return self._func(*args, **kwargs)

0 commit comments

Comments
 (0)