Conversation
|
Hey @evroon - thanks for opening this, looks great - would you mind adding a test or two to cover this? 🙏🏼 |
|
Sure, I added a test that covers nesting, let me know what you think of it. |
|
Thanks @evroon - looks like the resolver logic has been borked a bit which is breaking the tests. If you can fix the failing checks that would be great and we can get this merged! I rebased to main for you as I've refactored some of the runners for this! |
|
Hmm I looked into it but I am not sure how to fix the remaining tests. The paths contain references to |
8534dfa to
1cffc21
Compare
1cffc21 to
2deae74
Compare
|
I don't think this is actually possible because it depends on Rust code in pydantic-core which is responsible for the naming of these classes. That naming logic can also be changed in newer versions of pydantic-core so even if you get it right in this PR, it might be broken in the future. I think it makes more sense to just consider nested classes a limitation of this project. |
fixes #67
See the docstrings, for nested classes we need to use qualname instead of name. We also need to prepend the module name, because that's what pydantic does as well.
I also updated the sorting to use
__qualname__instead of__name__.Can be tested with: