DetachHead / basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server
http://docs.basedpyright.com/
Other
613 stars 13 forks source link

no unsafe variance error on attributes #395

Open DetachHead opened 1 month ago

DetachHead commented 1 month ago
from typing import TypeVar, Generic

T = TypeVar("T", covariant=True)

class Foo(Generic[T]):
    value: T # no error
KotlinIsland commented 1 month ago

This is a well known issue, any everyone wants to pretend it doesn't exist: https://github.com/python/mypy/issues/735