Change operator curry usages to use wrap to force function signature.
Closed this issue · 0 comments
lukepmccombs commented
curry
is a decorator implemented as a class, so when applied to a function it wipes the function signature and docstring in IDEs.
To bypass this, I propose replacing curry usages with a simple decorator that calls functools.wraps
as well.
def wrap_curry(f):
"""
Wraps and curries in conjunction, so the function signature remains.
"""
return wraps(f)(curry(f))