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

inline typed dicts should not need to be wrapped in `dict[]` #585

Open DetachHead opened 4 weeks ago

DetachHead commented 4 weeks ago

mypy added support for them in https://github.com/python/mypy/pull/17457, but it differs from ours:

# mypy:
foo: {"foo": str}
# basedpyright:
foo: dict[{"foo": str}]

i like mypy's one better so we should switch to that instead

KotlinIsland commented 4 weeks ago

Why not both? I imagine the current would be easier for runtime introspection, an aspect that I can only assume mypy overlooked

DetachHead commented 4 weeks ago

i dont care about runtime introspection tbh, all of it is a complete mess anyway that only exists as an implementation detail of the type system as a result of them refusing to add new syntax to the language rather than any conscious decision.