Skip to content

Unexpected '...' for homogeneous tuples using builtin tuple (PEP 585) #9980

Closed
@antonagestam

Description

@antonagestam

Bug Report

When using builtin tuple to create a type alias, mypy reports an error.

To Reproduce

t = tuple[str, ...]

Expected Behavior

No error.

Actual Behavior

$ mypy <(echo 't = tuple[str, ...]')
/dev/fd/63:1: error: Unexpected '...'  [misc]
    t = tuple[str, ...]
    ^
Found 1 error in 1 file (checked 1 source file)

Your Environment

  • Mypy version used: 0.800

  • Mypy command-line flags:

  • Mypy configuration options from mypy.ini (and other config files):

    [mypy]
    python_version = 3.9
    show_error_codes = True
    pretty = True
    files = .
    
    ignore_missing_imports = False
    no_implicit_reexport = True
    no_implicit_optional = True
    strict_equality = True
    strict_optional = True
    check_untyped_defs = True
    disallow_incomplete_defs = True
    disallow_untyped_defs = True
    disallow_untyped_calls = True
    disallow_untyped_decorators = True
    disallow_subclassing_any = True
    
    warn_unused_configs = True
    warn_redundant_casts = True
    warn_unused_ignores = True
    warn_return_any = True
    warn_unreachable = True
    
  • Python version used: 3.9.0

  • Operating system and version: Macos 11.1

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions