We need to update pyright to a newer version (maybe BasedPyright).
There are a number of things that need to be fixed for this to happen:
[ ] Change the API for ConstraintVars, Annotated[Attribute, ConstraintVar("T")] is technically not valid for Python typing purposes
[ ] Either wait until the TypeExpr proposal to land or use a different technique (I have a WIP branch that annotates constraints with the types of attributes they accept, which gets us quite far in terms of reducing errors)
[ ] A number of unrelated issues that have accumulated as Pyright has evolved since 1.345
We need to update pyright to a newer version (maybe BasedPyright).
There are a number of things that need to be fixed for this to happen:
Annotated[Attribute, ConstraintVar("T")]
is technically not valid for Python typing purposes