fL i}UdZddlmZddlZddlmZddlmZm 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-Z1eedddZ2eddZ2ed dZ2d!d"dZ2ee3Z4y)#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)allowignoreforbidcDeZdZUdZded< 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<yH)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__U/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pydantic/config.pyrr$sF9 O77_UUe\\I?? qf L$L$L1f"!4lMAA8t$# v@@Y99 L4KJvp43 ED,CB 5454>=TY88[z)V.-?22265$L LK4l #J54!F! #"%N98$!F%N2"!rYrF)total_TypeT)boundzePassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead.cyNrXconfigs rZrrsFIrYcyr_rXr`s rZrrsFIrYc yr_rXr`s rZrrsMPrYc | |r tdt|dk(r@|jdx}-tjdt dt t|n||nt t|dfd }|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'} ``` z2Cannot specify both `config` and keyword argumentsrrazdPassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead)category stacklevelchddlm}||rtd|jdd|_|S)Nr)is_model_classzCannot use `with_config` on z as it is a Pydantic modelzwith-config-on-model)code)_internal._utilsrirrS__pydantic_config__)class_ri final_configs rZinnerzwith_config..innersA 5 & !#.v.??YZ+ &2" rY)rmr\returnr\) ValueErrorlengetwarningswarnrr r)rakwargs kwargs_confrorns @rZrrsz4fMNN 6{aFJJx,@@[M r/ J 4 !'!3vj&9Q   LrY)rarrpCallable[[_TypeT], _TypeT])razUnpack[ConfigDict]rprxr_)razConfigDict | Nonervrrprx)5rV __future__r _annotationsrtrertypingrrrrr r r r typing_extensionsr rrr _migrationraliasesrerrorsrr_internal._generate_schemar_GenerateSchemafieldsrr__all__r)floatstrr%listrrWdictr JsonEncodertyper ExtraValuesrr\rrS __getattr__rXrYrZrs;(2XXXFF)#%0M4 'S%dD${:KZWX 9X3 >*)*ucz" %* hZ  hS "D ()+& 12 _%_D%  &  stIu I I I P P5p ) rY