Skip to content

Improve typing of decorator.decoratorx #10902

@bersbersbers

Description

@bersbersbers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: improvementImprove/refactor existing annotations, other stubs issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions