src/app_model/types/_base.py
raw| 1 | from typing import TYPE_CHECKING, ClassVar |
| 2 | |
| 3 | from pydantic import BaseModel |
| 4 | |
| 5 | if TYPE_CHECKING: |
| 6 | from pydantic import ConfigDict |
| 7 | |
| 8 | |
| 9 | class _BaseModel(BaseModel): |
| 10 | """Base model for all types.""" |
| 11 | |
| 12 | # don't switch to exclude ... it makes it hard to add fields to the |
| 13 | # schema without breaking backwards compatibility |
| 14 | model_config: ClassVar["ConfigDict"] = {"frozen": True, "extra": "ignore"} |