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

Order of generated models for PydanticBaseModel #6

Open
s-rigaud opened this issue Mar 23, 2023 · 2 comments
Open

Order of generated models for PydanticBaseModel #6

s-rigaud opened this issue Mar 23, 2023 · 2 comments

Comments

@s-rigaud
Copy link
Contributor

s-rigaud commented Mar 23, 2023

I recently run into an issue with generated models from the website https://stackoverflow.com/questions/74346565/fastapi-typeerror-issubclass-arg-1-must-be-a-class-with-modular-imports/75789412#75789412

Importing the __annotations__ from future was leading to some problems. Just reordering the models starting from the subclass and removing the future import could be a nice feature to implement.

image

@Gowee
Copy link
Owner

Gowee commented Mar 24, 2023

We need to implement an alternative bottom-up iterator in topological order before adding such an option:

.iter_topdown()

@s-rigaud
Copy link
Contributor Author

I would happily help you with that but I have no experience with Rust and just trying to read the code base without any knowledge of it gave me a headache 😅
I would consider helping you on this maybe in a few weeks, time to learn more abour Rust 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants