django-typer
django-typer copied to clipboard
@group type hint does not carry over the parameter spec of the wrapped function
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
There's a way to do this with ParamSpec, TypeVar and Generic