| 37 | @pytest.fixture(scope='session', name='ModelWithStrictConfig') |
| 38 | def model_with_strict_config_false(): |
| 39 | class ModelWithStrictConfig(BaseModel): |
| 40 | a: int |
| 41 | # strict=False overrides the Config |
| 42 | b: Annotated[int, Field(strict=False)] |
| 43 | # strict=None or not including it is equivalent |
| 44 | # lets this field be overridden by the Config |
| 45 | c: Annotated[int, Field(strict=None)] |
| 46 | d: Annotated[int, Field()] |
| 47 | |
| 48 | model_config = ConfigDict(strict=True) |
| 49 | |
| 50 | return ModelWithStrictConfig |
| 51 |