typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Improve typing of `decorator.decoratorx`

Open bersbersbers opened this issue 2 years ago • 0 comments

I do not have capacity to open a PR for this, but I would like to suggest the following improvement to decorator.decoratorx which type-checks fine wherever I use it:

class _DecoratorX(Protocol):
    def __call__(
        self, caller: Callable[Concatenate[Callable[_P, _T], _P], _T]
    ) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: ...

decoratorx: _DecoratorX

bersbersbers avatar Oct 17 '23 18:10 bersbersbers