U nf(@sLUdZddlmZddlmZmZmZmZm Z m Z m Z m Z ddl mZmZmZddlmZddlmZddlmZerdd lmZdd lmZmZd Ze eee e!d e d dfZ"de#d <ee e"fZ$de#d<eegefZ%e ee$gd fee$e egd ffZ&de#d<edZ'GdddeddZ(e de)dZ*dddddZ+ee,Z-d S)z"Configuration for Pydantic models.) annotations) TYPE_CHECKINGAnyCallableDictListTypeTypeVarUnion)Literal TypeAlias TypedDict)getattr_migration)AliasGenerator)PydanticUserError)GenerateSchema)ComputedFieldInfo FieldInfo) ConfigDict with_configN JsonValueJsonDictr JsonSchemaExtraCallable)ZallowignoreZforbidc@sZeZdZUdZded<ded<ded<ded <ded <ded <d ed <ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<d ed!<ded"<d#ed$<d%ed&<d'ed(<d)ed*<ded+<ded,<d-ed.<ded/<ded0<d1ed2<d3ed4<d5ed6<ded7<d8ed9<ded:<d;ed<<ded=<ded><d?ed@<dAS)Brz/A TypedDict for configuring Pydantic behaviour.z str | NonetitlezCallable[[type], str] | NoneZmodel_title_generatorz:Callable[[str, FieldInfo | ComputedFieldInfo], str] | NoneZfield_title_generatorboolZ str_to_lowerZ str_to_upperZstr_strip_whitespaceintZstr_min_lengthz int | NoneZstr_max_lengthzExtraValues | NoneextrafrozenZpopulate_by_nameZuse_enum_valuesZvalidate_assignmentZarbitrary_types_allowedZfrom_attributesZ loc_by_aliasz,Callable[[str], str] | AliasGenerator | NoneZalias_generatorztuple[type, ...]Z ignored_typesZ allow_inf_nanz)JsonDict | JsonSchemaExtraCallable | NoneZjson_schema_extraz&dict[type[object], JsonEncoder] | NoneZ json_encodersstrictz2Literal[('always', 'never', 'subclass-instances')]Zrevalidate_instanceszLiteral[('iso8601', 'float')]Zser_json_timedeltazLiteral[('utf8', 'base64')]Zser_json_bytesz)Literal[('null', 'constants', 'strings')]Zser_json_inf_nanZvalidate_defaultZvalidate_returnztuple[str, ...]Zprotected_namespacesZhide_input_in_errorsZ defer_buildz.tuple[Literal[('model', 'type_adapter')], ...]Zexperimental_defer_build_modezdict[str, object] | NoneZplugin_settingsztype[_GenerateSchema] | NoneZschema_generatorZ+json_schema_serialization_defaults_requiredz.Literal[('validation', 'serialization', None)]Zjson_schema_mode_overrideZcoerce_numbers_to_strz$Literal[('rust-regex', 'python-re')]Z regex_engineZvalidation_error_causeZuse_attribute_docstringsz'bool | Literal[('all', 'keys', 'none')]Z cache_stringsN)__name__ __module__ __qualname____doc____annotations__r&r&=/opt/hc_python/lib/python3.8/site-packages/pydantic/config.pyr!sV G !(47;    L, '7&% &rF)total_TypeT)boundzCallable[[_TypeT], _TypeT])configreturncsdddfdd }|S)a$Usage docs: https://docs.pydantic.dev/2.8/concepts/config/#configuration-with-dataclass-from-the-standard-library-or-typeddict A convenience decorator to set a [Pydantic configuration](config.md) on a `TypedDict` or a `dataclass` from the standard library. Although the configuration can be set using the `__pydantic_config__` attribute, it does not play well with type checkers, especially with `TypedDict`. !!! example "Usage" ```py from typing_extensions import TypedDict from pydantic import ConfigDict, TypeAdapter, with_config @with_config(ConfigDict(str_to_lower=True)) class Model(TypedDict): x: str ta = TypeAdapter(Model) print(ta.validate_python({'x': 'ABC'})) #> {'x': 'abc'} ``` r))class_r,cs4ddlm}||r*td|jddd|_|S)Nr)is_model_classzCannot use `with_config` on z as it is a Pydantic modelzwith-config-on-model)code)Z_internal._utilsr.rr!Z__pydantic_config__)r-r.r+r&r'inner s  zwith_config..innerr&)r+r1r&r0r'rsr).r$ __future__rZ _annotationstypingrrrrrrr r typing_extensionsr r r Z _migrationraliasesrerrorsrZ_internal._generate_schemarZ_GenerateSchemafieldsrr__all__rfloatstrrrr%rZ JsonEncoderrZ ExtraValuesrtyper)rr! __getattr__r&r&r&r's< (    "  U +