Skip to content

Commit

Permalink
Fix depends async wrapper (#684)
Browse files Browse the repository at this point in the history
philippjfr authored Feb 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f4135d4 commit cd1b4ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion param/_async.py
Original file line number Diff line number Diff line change
@@ -3,10 +3,12 @@
by param internal callbacks. These are defined in a separate file due
to py2 incompatibility with both `async/await` and `yield from` syntax.
"""
from functools import wraps

def generate_depends(func):
@wraps(func)
async def _depends(*args, **kw): # noqa: E999
await func(*args, **kw) # noqa: E999
return await func(*args, **kw) # noqa: E999
return _depends

def generate_caller(function, what='value', changed=None, callback=None, skip_event=None):

0 comments on commit cd1b4ae

Please sign in to comment.