aiven-client icon indicating copy to clipboard operation
aiven-client copied to clipboard

argx should preserve signature of wrapped function

Open aiven-amartin opened this issue 3 years ago • 1 comments

In https://github.com/aiven/aiven-client/blob/46f2cfd7c674fdfb62e277ede33fd77283f9292a/aiven/client/argx.py#L88, we don't cast back to the signature of the wrapped function, but we should, as well as appending the type of the added args.

See https://mypy.readthedocs.io/en/stable/generics.html#declaring-decorators.

aiven-amartin avatar Jan 28 '22 18:01 aiven-amartin

def wrap(func) should also ideally have @functools.wraps decorator.

NotoriousPyro avatar Sep 09 '22 20:09 NotoriousPyro

#322 is the fix.

rominf avatar Jan 25 '23 17:01 rominf