Skip to content

Fix contextlib.ContextDecorator.__call__ types #4399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

ap--
Copy link
Contributor

@ap-- ap-- commented Aug 6, 2020

This PR fixes issue #4382

The decorated function returned by ContextDecorator.__call__ now has the same call signature as the original function.

_F = TypeVar("_F", bound=Callable[..., Any]) is already defined in contextlib.pyi#L28

The decorated function returned by ContextDecorator.__call__ has
the same call signature as the original function.

Closes python#4382.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants