Skip to content

Commit

Permalink
Add plugin_settings to ConfigDict
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jul 25, 2023
1 parent c4149d7 commit f7c32d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pydantic/_internal/_config.py
Expand Up @@ -156,6 +156,7 @@ def dict_not_none(**kwargs: Any) -> Any:
str_max_length=self.config_dict.get('str_max_length'),
str_min_length=self.config_dict.get('str_min_length'),
hide_input_in_errors=self.config_dict.get('hide_input_in_errors'),
plugin_settings=self.config_dict.get('plugin_settings'),
)
)
return core_config
Expand Down Expand Up @@ -195,6 +196,7 @@ def __repr__(self):
hide_input_in_errors=False,
json_encoders=None,
defer_build=False,
plugin_settings=None,
)


Expand Down
4 changes: 4 additions & 0 deletions pydantic/config.py
Expand Up @@ -139,6 +139,9 @@ class without an annotation and has a type that is not in this tuple (or otherwi
first model validation. This can be useful to avoid the overhead of building models which are only
used nested within other models, or when you want to manually define type namespace via
[`Model.model_rebuild(_types_namespace=...)`][pydantic.BaseModel.model_rebuild]. Defaults to False.
plugin_settings: A `dict` of settings for plugins. Defaults to `None`.
See [Pydantic Plugins](../integrations/plugins.md) for details.
"""

title: str | None
Expand Down Expand Up @@ -176,6 +179,7 @@ class without an annotation and has a type that is not in this tuple (or otherwi
protected_namespaces: tuple[str, ...]
hide_input_in_errors: bool
defer_build: bool
plugin_settings: dict[str, Any] | None


__getattr__ = getattr_migration(__name__)

0 comments on commit f7c32d1

Please sign in to comment.