DetachHead / basedpyright

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

a way to denote variance when using new generic syntax #576

Open DetachHead opened 2 months ago

DetachHead commented 2 months ago

maybe something like this

class Foo[T: Out[int]]: # means T is covariant and extends int
    ...

class Bar[T: Out]: # means T is covariant and extends object
    ...

class Baz[T: In]: # means T is contravariant and extends Never
    ...
KotlinIsland commented 2 months ago

Invariance?

DetachHead commented 2 months ago

InOut i gues