Skip to content

Fix ParamSpec inference for callback protocols#15986

Merged
hauntsaninja merged 2 commits into
python:masterfrom
ilevkivskyi:fix-paramspec-inference
Aug 30, 2023
Merged

Fix ParamSpec inference for callback protocols#15986
hauntsaninja merged 2 commits into
python:masterfrom
ilevkivskyi:fix-paramspec-inference

Conversation

@ilevkivskyi

@ilevkivskyi ilevkivskyi commented Aug 29, 2023

Copy link
Copy Markdown
Member

Fixes #15984

Fix is straightforward, ParamSpec inference special-casing should put instances with __call__ and callable types on same ground.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja
hauntsaninja merged commit 0ae0c75 into python:master Aug 30, 2023
@ilevkivskyi
ilevkivskyi deleted the fix-paramspec-inference branch August 30, 2023 12:27
koogoro pushed a commit that referenced this pull request Sep 2, 2023
Fixes #15984

Fix is straightforward, `ParamSpec` inference special-casing should put
instances with `__call__` and callable types on same ground.
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.

ParamSpec doesn't handle out-of-order kwargs for callable protocol

3 participants