[feat] support user-provided base models#42
[feat] support user-provided base models#42danielgafni wants to merge 1 commit intomkdocstrings:mainfrom
Conversation
|
Never mind, figured out you had a non-standard |
7d73e90 to
8bc318c
Compare
| assert "pydantic-field" not in package["Model.a"].labels | ||
|
|
||
|
|
||
| def test_extra_bases() -> None: |
There was a problem hiding this comment.
I'm not sure if it's a good test since both classes are implemented in the same package. Should we split them to separate packages? or what's the best way to test this?
|
Yeah we provide a About NixOS / PDM, not sure why pdm-backend wouldn't work on this OS 🤷 We're using uv too, but building the project with pdm-backend (which is transparently installed as a Python package, in a temp venv, by uv when building, so it should work on any OS really). Let's decide on the issue whether the |
|
I guess I was too quick with my judgement: indeed So, as mentioned in #41, preloading |
|
Basically the same as #30 except imports done inline rather than pulling out to separate functions |
…rty Pydantic base models
8bc318c to
9158543
Compare

For reviewers
Description of the change
Add a new configuration option:
extra_bases. This allows extending the default list (pydantic.BaseModel,pydantic.main.BaseModel) with third-party base pydantic classes.Relevant resources
Resolve #41, #14, #27