Skip to content

tuple[Concatenate[int, ...]] should not be accepted #20452

@A5rocks

Description

@A5rocks

Bug Report

Passing Parameters to a tuple should not be allowed. Splitting off of python/typing#2140.

To Reproduce

from typing import Concatenate

def c(t: tuple[Concatenate[int, ...]]) -> None:
    reveal_type(t)  # N: Revealed type is "tuple[[builtins.int, *Any, **Any]]"

Expected Behavior

Argument gets flagged.

Actual Behavior

Argument isn't flagged.

Your Environment

Reproduced in mypy-play.

  • Mypy version used: 1.19.1
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files): N/A
  • Python version used: 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-paramspecPEP 612, ParamSpec, Concatenate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions