isinstance
checks on classes with generics should narrow to the generic's bound if it's covariant, and Never
if it's contravariant
#674
Labels
type checking / linting
issues relating to existing diagnostic rules or proposals for new diagnostic rules
Code sample in basedpyright playground
if the generic is covariant it should narrow to
Foo[int | str]
(or whatever the generic's bound is), and if it's contravariant it should narrow toFoo[Never]
i thinkThe text was updated successfully, but these errors were encountered: