AureumChaos/LEAP

Change operator curry usages to use wrap to force function signature.

Closed this issue · 0 comments

curry is a decorator implemented as a class, so when applied to a function it wipes the function signature and docstring in IDEs.

image

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))

image