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

usage of ellipsis type should be an error #11559

Closed
DetachHead opened this issue Nov 16, 2021 · 5 comments
Closed

usage of ellipsis type should be an error #11559

DetachHead opened this issue Nov 16, 2021 · 5 comments
Labels
bug mypy got something wrong

Comments

@DetachHead
Copy link
Contributor

foo: ellipsis = ...

https://mypy-play.net/?mypy=master&python=3.10&gist=c2d3912a93b253bbf3f0589148d945bf

this fails at runtime because ellipsis doesn't exist

@DetachHead DetachHead added the bug mypy got something wrong label Nov 16, 2021
@erictraut
Copy link

This appears to be a bug in typeshed's builtins.pyi file, which declares this symbol in the builtins namespace. Perhaps it should be moved to _typeshed.pyi or renamed _ellipsis to indicate that it's private?

@emmatyping
Copy link
Collaborator

Yeah, I think this should probably be reported against typeshed, thanks for debugging that Eric!

@DetachHead
Copy link
Contributor Author

python/typeshed#3556

@DetachHead
Copy link
Contributor Author

i think this should be reopened as it looks like there's a change required on the mypy side in order to fix it. see python/typeshed#3556 (comment)

also see the mypy crashes on python/typeshed#6311

@JelleZijlstra
Copy link
Member

Yes, this is one of the instances where typeshed can't change until mypy changes. #3171 discusses the analogous issue with builtins.function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

4 participants