-
-
Notifications
You must be signed in to change notification settings - Fork 12
bug: Models are not being detected as pydantic-model #45
Description
Description of the bug
Models are detected as pydantic-model sometimes but not in sometimes, and I can't seem to find the pattern.
To Reproduce
git clone https://github.com/seriaati/genshin.py
cd genshin.py
git checkout imp/docs
uv sync --group docs
uv run mkdocs servein genshin/test_model.py there are two classes for debugging: ExampleModel from the project example and StokenResult from genshin.py itself, you can see that in http://127.0.0.1:8000/genshin.py/reference/models/test/, both models are being detected as pydantic models correctly (by this I mean there's a pydantic-model after the class name, and the fields and validators are shown as in the example.)
However, as soon as the same python file containing the models is moved into the genshin/models directory, the models are suddenly not being detected as pydantic models as seen in http://127.0.0.1:8000/genshin.py/reference/models/test_in_model/
The console had no errors.
Expected behavior
The models in genshin/models should be detected.
Environment information
- System: Windows-10-10.0.22631-SP0
- Python: cpython 3.9.20 (C:\Users\Seria\Documents\Repos\genshin.py.venv\Scripts\python.exe)
- Environment variables:
- Installed packages:
griffe-pydanticv1.1.7