Skip to content

False negative on subclassing from TypeVar #7023

@hauntsaninja

Description

@hauntsaninja

The following fails at runtime, but pyright doesn't provide an error (mypy does):

from typing import TypeVar
T = TypeVar("T")
class G(T): ...

I was typing quickly and my fingers split the difference between PEP 695 and old style generics :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions