Skip to content

Fix inferring constraints from param spec callable against Any - #11725

Merged
JukkaL merged 1 commit into
masterfrom
paramspec-special-case
Dec 15, 2021
Merged

JukkaL merged 1 commit into
masterfrom
paramspec-special-case

Conversation

@JukkaL

@JukkaL JukkaL commented Dec 13, 2021

Copy link
Copy Markdown
Collaborator

We didn't infer constraints from the return type.

Fixes #11704.

We didn't infer constraints from the return type.

Fixes #11704.
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

steam.py (https://github.com/Gobot1234/steam.py)
- steam/models.py:123: error: Need type annotation for "coro"  [var-annotated]

@JukkaL JukkaL changed the title Fix inferring constrainta from param spec callable against Any Fix inferring constraints from param spec callable against Any Dec 15, 2021
@jhance

jhance commented Dec 15, 2021

Copy link
Copy Markdown
Collaborator

Looks good

@JukkaL
JukkaL merged commit 22ab84a into master Dec 15, 2021
@JukkaL
JukkaL deleted the paramspec-special-case branch December 15, 2021 17:21
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

Unexpected "need type type annotation" with contextmanager

2 participants