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.02k stars 19 forks source link

`reportInvalidTypeVarUse` false negative when default value can't be used to infer the generic #596

Open DetachHead opened 1 month ago

DetachHead commented 1 month ago

Code sample in basedpyright playground

def foo[T](value: list[T] | int = 1) -> T:
        ...

a = foo() # error: reportUnknownVariableType