Ë
    Eü´jõ­  ã                  óä  — U d Z ddlmZ ddlZddlmZ ddlmZm	Z	m
Z
mZmZmZmZmZ ddlmZmZmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ erddlmZ ddlm Z m!Z! dZ"ee#e$e%e&de'd   df   Z(de)d<   e*e%e(f   Z+de)d<   e
e	ge	f   Z,ee
e+gdf   e
e+e-e	   gdf   f   Z.de)d<   ed   Z/ G d„ ded¬«      Z0 ede-¬«      Z1e ed«      dd„«       «       Z2edd„«       Z2ed d„«       Z2d!d"d„Z2 ee3«      Z4y)#z"Configuration for Pydantic models.é    )ÚannotationsN)ÚPattern)ÚTYPE_CHECKINGÚAnyÚCallableÚLiteralÚTypeVarÚUnionÚcastÚoverload)Ú	TypeAliasÚ	TypedDictÚUnpackÚ
deprecatedé   )Úgetattr_migration)ÚAliasGenerator)ÚPydanticUserError)ÚPydanticDeprecatedSince211)ÚGenerateSchema)ÚComputedFieldInfoÚ	FieldInfo)Ú
ConfigDictÚwith_configÚ	JsonValueÚJsonDictr   ÚJsonSchemaExtraCallable)ÚallowÚignoreÚforbidc                  óP  — e Zd ZU dZded<   	 ded<   	 ded<   	 ded	<   	 ded
<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 d ed!<   	 ded"<   	 d#ed$<   	 d%ed&<   	 d'ed(<   	 d)ed*<   	 d+ed,<   	 d+ed-<   	 d.ed/<   	 ded0<   	 ded1<   	 d2ed3<   	 ded4<   	 ded5<   	 d6ed7<   	 d8ed9<   	 ded:<   	 d;ed<<   	 ded=<   	 d>ed?<   	 ded@<   	 dedA<   	 dBedC<   	 dedD<   	 dedE<   	 dedF<   	 dedG<   	 dedH<   yI)Jr   z/A TypedDict for configuring Pydantic behaviour.z
str | NoneÚtitlezCallable[[type], str] | NoneÚmodel_title_generatorz:Callable[[str, FieldInfo | ComputedFieldInfo], str] | NoneÚfield_title_generatorÚboolÚstr_to_lowerÚstr_to_upperÚstr_strip_whitespaceÚintÚstr_min_lengthz
int | NoneÚstr_max_lengthzExtraValues | NoneÚextraÚfrozenÚpopulate_by_nameÚuse_enum_valuesÚvalidate_assignmentÚarbitrary_types_allowedÚfrom_attributesÚloc_by_aliasz,Callable[[str], str] | AliasGenerator | NoneÚalias_generatorztuple[type, ...]Úignored_typesÚallow_inf_nanz)JsonDict | JsonSchemaExtraCallable | NoneÚjson_schema_extraz&dict[type[object], JsonEncoder] | NoneÚjson_encodersÚstrictz0Literal['always', 'never', 'subclass-instances']Úrevalidate_instanceszLiteral['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_bytesÚval_json_bytesz'Literal['null', 'constants', 'strings']Úser_json_inf_nanÚvalidate_defaultÚvalidate_returnztuple[str | Pattern[str], ...]Úprotected_namespacesÚhide_input_in_errorsÚdefer_buildzdict[str, object] | NoneÚplugin_settingsztype[_GenerateSchema] | NoneÚschema_generatorÚ+json_schema_serialization_defaults_requiredz,Literal['validation', 'serialization', None]Újson_schema_mode_overrideÚcoerce_numbers_to_strz"Literal['rust-regex', 'python-re']Úregex_engineÚvalidation_error_causeÚuse_attribute_docstringsz%bool | Literal['all', 'keys', 'none']Úcache_stringsÚvalidate_by_aliasÚvalidate_by_nameÚserialize_by_aliasÚurl_preserve_empty_pathÚpolymorphic_serializationN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__© ó    úM/root/workspace/ytshorts/venv/lib/python3.12/site-packages/pydantic/config.pyr   r   $   sT  … Ù9àÓØOà7Ó7Ø_àUÓUØeàÓØ\àÓØ\àÓØIàÓØ?àÓØ?àÓðqðf ƒLðð Óð$ðL Óð$ðL Óð1ðf "Ó!ð4ðl Óðð Óð MàAÓAð8ðt $Ó#ðð ÓØvà@Ó@ØYà9Ó9ðð ƒLðð: KÓJðEðN 4Ó3ðð EÓDðð, CÓBðð$ 5Ó4ðð 5Ó4ð
ð >Ó=ðð ÓØTàÓØYà8Ó8ð[ðz Óð)ðV Óð
ð .Ó-Ø?à2Ó2ðð 26Ó5ð'ðR  LÓKð7ðr  Óð#ðJ 5Ó4ð$ðL !Ó ðð #Ó"ð&ðP 9Ó8ðð* Óð"ðH Óð$ðL ÓððB "Ó!ðð(  $Ó#ðrZ   r   F)ÚtotalÚ_TypeT)ÚboundzePassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead.c                 ó   — y ©NrY   ©Úconfigs    r[   r   r   Ã  s   € àFIrZ   c                ó   — y r`   rY   ra   s    r[   r   r   È  s   € ØFIrZ   c                  ó   — y r`   rY   ra   s    r[   r   r   Ì  s   € ØMPrZ   c               óö   ‡— | �|rt        d«      ‚t        |«      dk(  r@|j                  d«      x}�-t        j                  dt
        d¬«       t        t        |«      Šn| �| nt        t        |«      Šdˆfd„}|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.
    ///
    z2Cannot specify both `config` and keyword argumentsr   rb   zdPassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument insteadé   )ÚcategoryÚ
stacklevelc               óh   •— ddl m}  || «      rt        d| j                  › d�d¬«      ‚‰| _        | S )Nr   )Úis_model_classzCannot use `with_config` on z as it is a Pydantic modelzwith-config-on-model)Úcode)Ú_internal._utilsrj   r   rT   Ú__pydantic_config__)Úclass_rj   Úfinal_configs     €r[   Úinnerzwith_config.<locals>.innerÿ  sA   ø€ õ 	5á˜&Ô!Ü#Ø.¨v¯©Ð.?Ð?YÐZØ+ôð ð &2ˆÔ"ØˆrZ   )rn   r]   Úreturnr]   )Ú
ValueErrorÚlenÚgetÚwarningsÚwarnr   r   r   )rb   ÚkwargsÚkwargs_confrp   ro   s       @r[   r   r   Ð  s{   ø€ ðD Ð™fÜÐMÓNÐNä
ˆ6ƒ{�aÒ¨F¯J©J°xÓ,@Ð@˜[ÐMÜ�‰ØrÜ/Øõ	
ô
 œJ¨Ó4‰à!'Ð!3‘v¼¼jÈ&Ó9Qˆõð €LrZ   )rb   r   rq   úCallable[[_TypeT], _TypeT])rb   zUnpack[ConfigDict]rq   ry   r`   )rb   zConfigDict | Nonerw   r   rq   ry   )5rW   Ú
__future__r   Ú_annotationsru   Úrer   Útypingr   r   r   r   r	   r
   r   r   Útyping_extensionsr   r   r   r   Ú
_migrationr   Úaliasesr   Úerrorsr   r   Ú_internal._generate_schemar   Ú_GenerateSchemaÚfieldsr   r   Ú__all__r)   ÚfloatÚstrr%   Úlistr   rX   Údictr   ÚJsonEncoderÚtyper   ÚExtraValuesr   r]   r   rT   Ú__getattr__rY   rZ   r[   ú<module>rŽ      s;  ðÚ (å 2ã Ý ß X× XÓ Xç FÓ Få )Ý #Ý %Ý 0áÝMß4à
'€ð ˜S %¨¨d°D¸$¸{Ñ:KÈZÐWÑX€	ˆ9Ó XØ˜3 	˜>Ñ*€ˆ)Ó *à˜�u˜c�zÑ"€à%*ØˆhˆZ˜ÐÑØˆh˜˜S™	Ð" DÐ(Ñ)ð+ñ&Ð ˜ó ð
 Ð1Ñ2€ôY� %õ Yñx$ 
� Ô	&€ð 
ÙÐsÓtÚ Ió uó 
à Ið 
Ú Ió 
Ø Ið 
Ú Pó 
Ø Pô=ñ@   Ó)�rZ   