Update Pydantic model config values.
(self, config: ModelConfigData | None)
| 1236 | return {k: v for k, v in self.__dict__.items() if v is not None} |
| 1237 | |
| 1238 | def update(self, config: ModelConfigData | None) -> None: |
| 1239 | """Update Pydantic model config values.""" |
| 1240 | if config is None: |
| 1241 | return |
| 1242 | for k, v in config.get_values_dict().items(): |
| 1243 | setattr(self, k, v) |
| 1244 | |
| 1245 | def setdefault(self, key: str, value: Any) -> None: |
| 1246 | """Set default value for Pydantic model config if config value is `None`.""" |