KotlinIsland / KotlinIsland/basedmypy

`ContextDecorator` always returns a function

Open
#688 0 comments 0 reactions 0 assignees View on GitHub
typeshed
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

in contextlib.pyi it should be:
```py
class ContextDecorator:
def __call__(self, func: "(P) -> R") -> "def (P) -> R": ...
```

Contributor guide

Open the contributing guide

Research direction

The requested annotation is in contextlib.pyi; start by reading the ContextDecorator definition and its __call__ signature. Update the return typing to preserve the decorated function's parameter and return types, then confirm the stub check passes. Done means __call__ no longer always reports a generic function return.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.