Skip to content

add a diagnostic for NewTypes with TypeVars in their base type #1519

@oconnor663

Description

@oconnor663

TODO from: astral-sh/ruff#21157 (review)

Something like this should be an error:

T = TypeVar("T")
N = NewType("N", list[T])  # currently accepted, but not a "proper class"

Metadata

Metadata

Assignees

Labels

typing semanticstyping-module features, spec compliance, etc

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions