django-typer icon indicating copy to clipboard operation
django-typer copied to clipboard

@group type hint does not carry over the parameter spec of the wrapped function

Open bckohan opened this issue 1 year ago • 1 comments

There's a complexity with how the group decorators work involving the descriptor on the GroupFunction class that returns a GroupFunction instance if its accessed as a class member versus the wrapped function if its accessed on an instance. The goal should be to type hint this so you get a GroupFunction when its a class member and the original function when its on the instance. See also #33

bckohan avatar Mar 08 '24 10:03 bckohan

There's a way to do this with ParamSpec, TypeVar and Generic

bckohan avatar May 02 '24 09:05 bckohan