Skip to content

Support assigning ellipsis with type hint #675

Closed

Description

@JamesGuthrie

The old convention for type hinted variable definition:

a = Undefined(int)

has been superseded by the new convention:

a = ...  # type: int

Mypy's type checker warns against this assignment with the message: Incompatible types in assignment (expression has type "ellipsis", variable has type "int")

Activity

  1. changed the title [-]Support assigning ellipsis[/-] [+]Support assigning ellipsis with type hint[/+] on May 15, 2015
  2. JukkaL commented on May 15, 2015

    @JukkaL
    Collaborator

    Note that the ellipsis syntax should on be valid in stubs. To implement this, we need to detect whether a file is a stub, based on the extension.

    This issue depends on #623 and #650.

  3. added a commit that references this issue on May 31, 2015
    64a6428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions