;iLUdZddlmZddlZddlmZddlmZm Z m Z m Z m Z m Z mZmZddlmZmZmZmZddlmZdd lmZdd lmZdd lmZerdd lmZdd lm Z m!Z!dZ"e e#e$e%e&de'ddfZ(de)d<e*e%e(fZ+de)d<e e ge fZ,e e e+gdfe e+e-e gdffZ.de)d<e dZ/GddedZ0e de-Z1eedd&dZ2ed&dZ2ed'd!Z2d(d)d%Z2ee3Z4dS)*z"Configuration for Pydantic models.) annotationsN)Pattern) TYPE_CHECKINGAnyCallableLiteralTypeVarUnioncastoverload) TypeAlias TypedDictUnpack deprecated)getattr_migration)AliasGenerator)PydanticUserError)PydanticDeprecatedSince211)GenerateSchema)ComputedFieldInfo FieldInfo) ConfigDict with_config JsonValueJsonDictr JsonSchemaExtraCallable)allowignoreforbidcFeZdZUdZded< 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*< d+ed,< d+ed-< d.ed/< ded0< ded1< d2ed3< ded4< ded5< d6ed7< d8ed9< ded:< d;ed<< ded=< d>ed?< ded@< dedA< dBedC< dedD< dedE< dedF< dedG<dHS)Irz/A TypedDict for configuring Pydantic behaviour.z str | NonetitlezCallable[[type], str] | Nonemodel_title_generatorz:Callable[[str, FieldInfo | ComputedFieldInfo], str] | Nonefield_title_generatorbool str_to_lower str_to_upperstr_strip_whitespaceintstr_min_lengthz int | Nonestr_max_lengthzExtraValues | Noneextrafrozenpopulate_by_nameuse_enum_valuesvalidate_assignmentarbitrary_types_allowedfrom_attributes loc_by_aliasz,Callable[[str], str] | AliasGenerator | Nonealias_generatorztuple[type, ...] ignored_types allow_inf_nanz)JsonDict | JsonSchemaExtraCallable | Nonejson_schema_extraz&dict[type[object], JsonEncoder] | None json_encodersstrictz0Literal['always', 'never', 'subclass-instances']revalidate_instanceszLiteral['iso8601', 'float']ser_json_timedeltaz-Literal['iso8601', 'seconds', 'milliseconds']ser_json_temporalz+Literal['seconds', 'milliseconds', 'infer']val_temporal_unitz Literal['utf8', 'base64', 'hex']ser_json_bytesval_json_bytesz'Literal['null', 'constants', 'strings']ser_json_inf_nanvalidate_defaultvalidate_returnztuple[str | Pattern[str], ...]protected_namespaceshide_input_in_errors defer_buildzdict[str, object] | Noneplugin_settingsztype[_GenerateSchema] | Noneschema_generator+json_schema_serialization_defaults_requiredz,Literal['validation', 'serialization', None]json_schema_mode_overridecoerce_numbers_to_strz"Literal['rust-regex', 'python-re'] regex_enginevalidation_error_causeuse_attribute_docstringsz%bool | Literal['all', 'keys', 'none'] cache_stringsvalidate_by_aliasvalidate_by_nameserialize_by_aliasurl_preserve_empty_pathN)__name__ __module__ __qualname____doc____annotations__CC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\pydantic/config.pyrr$so99O7777_UUUUe\\I??qfLLL$L$L1f"!!!4lMAAAA8t$### v@@@@Y9999LLL:KJJJEN4333 EDDD,CBBB$54445444>===TY8888[z)V .---?22226555'RLKKK7r #J5444$L!    #"""&P9888*"H$LB"!!!rYrF)total_TypeT)boundzePassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead.configreturnCallable[[_TypeT], _TypeT]cdSNrXr^s rZrrsFIcrYcdSrbrXrcs rZrrsFIcrYUnpack[ConfigDict]c dSrbrXrcs rZrrsMPSrYConfigDict | Nonekwargsrc $||rtdt|dkrI|dx}2tjdt dt t|n||nt t|d fd }|S) a!!! abstract "Usage Documentation" [Configuration with other types](../concepts/config.md#configuration-on-other-supported-types) 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" ```python from typing_extensions import TypedDict from pydantic import ConfigDict, TypeAdapter, with_config @with_config(ConfigDict(str_to_lower=True)) class TD(TypedDict): x: str ta = TypeAdapter(TD) print(ta.validate_python({'x': 'ABC'})) #> {'x': 'abc'} ``` /// deprecated-removed | v2.11 v3 Passing `config` as a keyword argument. /// /// version-changed | v2.11 Keyword arguments can be provided directly instead of a config dictionary. /// Nz2Cannot specify both `config` and keyword argumentsrr^zdPassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead)category stacklevelclass_r\r_clddlm}||rtd|jdd|_|S)Nr)is_model_classzCannot use `with_config` on z as it is a Pydantic modelzwith-config-on-model)code)_internal._utilsrorrS__pydantic_config__)rmro final_configs rZinnerzwith_config..innersb 544444 >& ! ! #ZvZZZ+ &2" rY)rmr\r_r\) ValueErrorlengetwarningswarnrr r)r^rh kwargs_confrtrss @rZrrsDfMNNN 6{{aFJJx,@,@@[M r/    J 44 !'!3vvj&9Q9Q        LrY)r^rr_r`)r^rer_r`rb)r^rgrhrr_r`)5rV __future__r _annotationsrxrertypingrrrrr r r r typing_extensionsr rrr _migrationraliasesrerrorsrr_internal._generate_schemar_GenerateSchemafieldsrr__all__r)floatstrr%listrrWdictr JsonEncodertyper ExtraValuesrr\rrS __getattr__rXrYrZrs(((222222XXXXXXXXXXXXXXXXXXXXFFFFFFFFFFFF))))))######%%%%%%0000005MMMMMM44444444 'S%dD${:KZWX XXXX3 >*****ucz" %* hZ  hS "D ()+& 12 QQQQQ%QQQQh$  & & &   sttIIIut I III I PPP P=====@ )) rY