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
883 stars 17 forks source link

Fix the collections being defined in `typing` #266

Open KotlinIsland opened 4 months ago

KotlinIsland commented 4 months ago

typing.pyi has the definitions for a lot of things that are actually defined in _collections_abc like Iterable

This causes a lot of annoying problems and confusion when you use go to definition et al

DetachHead commented 4 months ago

the typing module is an absolute mess that does nothing except confuse the user. i want to remove all the gross _SpecialForm and _Alias stuff and maybe make a separate Intrinsic type that makes it obvious that a type is special-cased by pyright, like what typescript does:

type Uppercase<T extends string> = intrinsic