Improve typing of `decorator.decoratorx`
Open
Nobody has claimed this yet.
stubs: improvement
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 2.1k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 82
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the typeshed repository for the declaration of decorator.decoratorx and inspect its surrounding stubs. Compare the current typing with the proposed _DecoratorX protocol, then run the relevant static type checks to confirm the improved annotation works without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100