Skip to content
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

Fix type narrowing for types.EllipsisType #17003

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #17002

Copy link
Contributor

github-actions bot commented Mar 9, 2024

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

@ethanhs
Copy link
Collaborator

ethanhs commented Mar 9, 2024

I know it seems silly but perhaps we should add a test to prevent regressions on this 😅
Otherwise LGTM

@hauntsaninja
Copy link
Collaborator Author

Yeah, I thought about it, but you need one of the expensive tests that runs against full typeshed (and also behaviour here is version dependent because types.EllipsisType is a 3.10 thing)

@hauntsaninja hauntsaninja merged commit 16abf5c into python:master Mar 10, 2024
18 checks passed
@hauntsaninja hauntsaninja deleted the fix-ellipsis-narrow branch October 15, 2024 18:17
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.

Type narrowing for ellipsis via 'is ...' failing in 1.9.0
2 participants