Skip to content

usage of ellipsis type should be an error #11559

Closed

Description

@DetachHead
foo: ellipsis = ...

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

this fails at runtime because ellipsis doesn't exist

Activity

  1. erictraut commented on Nov 16, 2021

    @erictraut

    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?

  2. emmatyping commented on Nov 16, 2021

    @emmatyping
    Member

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

  3. DetachHead commented on Nov 16, 2021

    @DetachHead
    ContributorAuthor
  4. DetachHead commented on Nov 16, 2021

    @DetachHead
    ContributorAuthor

    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

  5. JelleZijlstra commented on Nov 16, 2021

    @JelleZijlstra
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions