Skip to content

x = tuple() # type: Tuple[()] Incompatible types in assignment #6283

Closed
@asottile

Description

@asottile

I understand this is a silly example, but figured I'd report it anyway.

I can't find a way (other than # type: ignore) to silence mypy for this line:

x = tuple()  # type: Tuple[()]

I found #4211 (which is how I got to Tuple[()]

mypy 0.660 errors with:

testing/resources/builtin_constructors.py:13: error: Incompatible types in assignment (expression has type "Tuple[<nothing>, ...]", variable has type "Tuple[]")

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions