
    o i}                    L   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          Z4dS )*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                  F   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<   dHS )Ir   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_pathN)__name__
__module____qualname____doc____annotations__     F/var/www/findabus/venv/lib/python3.11/site-packages/pydantic/config.pyr   r   $   sn        99O7777_UUUUe\\I??qf LLL $L $L 1f "!!!4l   MAAAA8t $### v@@@@Y9999 LLL4 KJJJvp 4333
 EDDD, CBBB 5444 5444 >=== TY8888[z )V  .---?2222 6555$L LKKK4l  #J 5444!F !    #"""%N 9888$ !F %N 2 "!!! rY   r   F)total_TypeT)boundzePassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead.configreturnCallable[[_TypeT], _TypeT]c                    d S NrX   r^   s    rZ   r   r     s    FIcrY   c                   d S rb   rX   rc   s    rZ   r   r     s    FIcrY   Unpack[ConfigDict]c                     d S rb   rX   rc   s    rZ   r   r     s    MPSrY   ConfigDict | Nonekwargsr   c               $   | |rt          d          t          |          dk    rI|                    d          x}2t          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'}
        ```
    Nz2Cannot specify both `config` and keyword argumentsr   r^   zdPassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead   )category
stacklevelclass_r\   r_   c               l    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._utilsro   r   rS   __pydantic_config__)rm   ro   final_configs     rZ   innerzwith_config.<locals>.inner  sb     	544444>&!! 	#ZvZZZ+    &2"rY   )rm   r\   r_   r\   )
ValueErrorlengetwarningswarnr   r   r   )r^   rh   kwargs_confrt   rs   s       @rZ   r   r     s    4 fMNNN
6{{aFJJx,@,@@[Mr/	
 	
 	
 	

 J44!'!3vvj&9Q9Q      LrY   )r^   r   r_   r`   )r^   re   r_   r`   rb   )r^   rg   rh   r   r_   r`   )5rV   
__future__r   _annotationsrx   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   rW   dictr   JsonEncodertyper   ExtraValuesr   r\   r   rS   __getattr__rX   rY   rZ   <module>r      s   ( ( ( 2 2 2 2 2 2        X X X X X X X X X X X X X X X X X X X X F F F F F F F F F F F F ) ) ) ) ) ) # # # # # # % % % % % % 0 0 0 0 0 0 5MMMMMM44444444
' S%dD${:KZWX	 X X X X3	>* * * * *ucz"%*hZhS	"D()+&     
 12_ _ _ _ _% _ _ _ _D% 
	&	&	& 
stt I I I ut 
 I 
 I I I 
 I 
 P P P 
 P5 5 5 5 5p  ))rY   