Skip to content

no error when subscripting AbstractContextManager when targeting python 3.8 #16097

@DetachHead

Description

@DetachHead
from contextlib import AbstractContextManager

foo = AbstractContextManager[int] # runtime error, no mypy error

playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-pep-585PEP 585 (builtin generics)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions