Open Hunterlige opened 5 months ago
More details on the issue can be found here: https://github.com/microsoft/pyright/issues/7556
@Hunterlige I see that https://github.com/microsoft/pyright/issues/7556 has been fixed. Does that address this issue too?
This is solving the pyright error, but there is still an issue with how ModelMetaclass are implemented
The maintainers of dagster fix their dynamic loading of ModelMetaclass such that the intention is unambiguous for a static type checker.
@garethbrickman
Dagster version
dagster, version 1.6.8 pyright 1.1.354
What's the issue?
dagster.Config
is the base class for Dagster configuration models, used to specify config schema for ops and assets.dagster.Config
Subclassespydantic.BaseModel
.Pyright reports reportUnknownMemberType for every field of the config, even if the field type is set. The typing works for
pydantic.BaseModel
but not fordagster.Config
What did you expect to happen?
I expect 0 type checking error using
dagster.Config
How to reproduce?
Create a test.py file with the following content
pyright test.py
Deployment type
Local
Deployment details
No response
Additional information
This error happens with pyright latest version 1.1.354
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.