Skip to content

Narrow Callable generic return types#20868

Open
hauntsaninja wants to merge 2 commits intopython:masterfrom
hauntsaninja:narrow95
Open

Narrow Callable generic return types#20868
hauntsaninja wants to merge 2 commits intopython:masterfrom
hauntsaninja:narrow95

Conversation

@hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Feb 23, 2026

Requires #20864 to be merged to work
Fixes #20628

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

setuptools (https://github.com/pypa/setuptools)
- setuptools/_shutil.py:39: error: Incompatible return value type (got "None", expected "_T")  [return-value]

@hauntsaninja hauntsaninja marked this pull request as ready for review February 23, 2026 21:46
@hauntsaninja
Copy link
Collaborator Author

Will merge this soon!

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.

Regression with narrowing with TypeVar intersection

1 participant