Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Pydantic plugin for MyPy #221

Open
tlento opened this issue Aug 25, 2022 · 1 comment
Open

Enable Pydantic plugin for MyPy #221

tlento opened this issue Aug 25, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers mf_developer ergonomics

Comments

@tlento
Copy link
Contributor

tlento commented Aug 25, 2022

We don't use the pydantic plugin for mypy, and it turns out this allows for a lot of shady stuff up to and including passing the wrong BaseModel subclass into stock Python dataclass and mypy pretending that's ok.

This issue is to enable the pydantic plugin. Note, however, that we were (inadvertently) doing some shady stuff that will need fixing, or at least a type annotation override. The most common issue is the explicit Any, which would be good to clean up, but we have a couple of uses of generics which seemed sound but are probably inappropriate in some subtle fashion, and those should probably be addressed as part of this effort.

@tlento tlento added enhancement New feature or request triage Tasks that need to be triaged labels Aug 25, 2022
@tlento tlento added good first issue Good for newcomers and removed triage Tasks that need to be triaged labels Aug 25, 2022
@tlento
Copy link
Contributor Author

tlento commented Aug 25, 2022

This requires little to no knowledge of Metricflow internals, but could be a nice way to get exposure to some bits of the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers mf_developer ergonomics
Projects
None yet
Development

No branches or pull requests

1 participant