Disallow plain `Concatenate[...]` as type hint
Open
Nobody has claimed this yet.
bug
topic-paramspec
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Bug Report
Pretty sure this is not OK.
To Reproduce
from typing import Concatenate
x: Concatenate[...]
Expected Behavior
error
Actual Behavior
no error
Your Environment
reproduced in mypy-play.
- Mypy version used: 1.20.2
- Mypy command-line flags: N/A
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the snippet in mypy-play and confirm that plain Concatenate[...] currently produces no error. Trace the existing Concatenate type-hint handling, then add coverage for this example so the completed change reports an error for the invalid annotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100