Skip to content

Old TypeVar and new [T:] annotations are not equivalent #17749

Closed as not planned
@jolaf

Description

@jolaf

Bug Report

If the same function is defined with old TypeVar syntax in one place and with new [T:] syntax in other place, mypy doesn't consider them equivalent.

To Reproduce

https://mypy-play.net/?mypy=1.11.2&python=3.12&enable-incomplete-feature=NewGenericSyntax&gist=78806d2f754ba0e5ce9bdcb61909fbc6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions