
    5jV9                    D   S r SSKJr  SSKrSSKrSSKrSSKJrJ	r	J
r
JrJrJrJr  SSKJr  SSKJrJrJr  SSKJrJrJr  SS	KJr  SS
KJr  SSKJr  SSKJ r   SSK!J"r"J#r#J$r$  \(       a  SSK%J&r&  Sr'\" S5      r(\RR                  S:  a  \" \RT                  \"\$4S9\SSSSSSSSSSS.
                     S$S jj5       5       r+\" \RT                  \"\$4S9\SSSSSSSSSSS.
                       S%S jj5       5       r+Oz\" \RT                  \"\$4S9\SSSSSSSSS.                 S&S jj5       5       r+\" \RT                  \"\$4S9\SSSSSSSSS.                   S'S jj5       5       r+\" \RT                  \"\$4S9 S(SSSSSSSSSSS.
                       S)S jjj5       r+\" \,5      r-S\RR                  s=::  a  S:  a  O  OS*S jr.\.\R^                  l0        SSS SS!.           S+S" jjr1S,S# jr2g)-z7Provide an enhanced dataclass that performs validation.    )annotationsN)TYPE_CHECKINGAnyCallableGenericNoReturnTypeVaroverload)warn)Literal	TypeGuarddataclass_transform   )_config_decorators_typing_extra)_dataclasses)getattr_migration)
ConfigDict)PydanticUserError)Field	FieldInfoPrivateAttr)PydanticDataclass)	dataclassrebuild_dataclass_T   
   )field_specifiersFT.
initrepreqorderunsafe_hashfrozenconfigvalidate_on_initkw_onlyslotsc        
            g N r"   s
             S/root/lseg-credit/backend/venv/lib/python3.13/site-packages/pydantic/dataclasses.pyr   r      s     	    c       
            g r.   r/   )_clsr#   r$   r%   r&   r'   r(   r)   r*   r+   r,   s              r0   r   r   .   s     #&r1   r#   r$   r%   r&   r'   r(   r)   r*   c                    g r.   r/   r4   s           r0   r   r   A   s     	r1   c                   g r.   r/   )	r3   r#   r$   r%   r&   r'   r(   r)   r*   s	            r0   r   r   P   s     #&r1   c       
   	        ^^^^^^^^ USL d   S5       eUSLd   S5       e[         R                  S:  a  XS.mO0 mSS jmS	UUUUUUUU4S jjnU c  U$ U" U 5      $ )
a_  Usage docs: https://docs.pydantic.dev/2.9/concepts/dataclasses/

A decorator used to create a Pydantic-enhanced dataclass, similar to the standard Python `dataclass`,
but with added validation.

This function should be used similarly to `dataclasses.dataclass`.

Args:
    _cls: The target `dataclass`.
    init: Included for signature compatibility with `dataclasses.dataclass`, and is passed through to
        `dataclasses.dataclass` when appropriate. If specified, must be set to `False`, as pydantic inserts its
        own  `__init__` function.
    repr: A boolean indicating whether to include the field in the `__repr__` output.
    eq: Determines if a `__eq__` method should be generated for the class.
    order: Determines if comparison magic methods should be generated, such as `__lt__`, but not `__eq__`.
    unsafe_hash: Determines if a `__hash__` method should be included in the class, as in `dataclasses.dataclass`.
    frozen: Determines if the generated class should be a 'frozen' `dataclass`, which does not allow its
        attributes to be modified after it has been initialized. If not set, the value from the provided `config` argument will be used (and will default to `False` otherwise).
    config: The Pydantic config to use for the `dataclass`.
    validate_on_init: A deprecated parameter included for backwards compatibility; in V2, all Pydantic dataclasses
        are validated on init.
    kw_only: Determines if `__init__` method parameters must be specified by keyword only. Defaults to `False`.
    slots: Determines if the generated class should be a 'slots' `dataclass`, which does not allow the addition of
        new attributes after instantiation.

Returns:
    A decorator that accepts a class as its argument and returns a Pydantic `dataclass`.

Raises:
    AssertionError: Raised if `init` is not `False` or `validate_on_init` is `False`.
Fz7pydantic.dataclasses.dataclass only supports init=Falsez-validate_on_init=False is no longer supportedr   )r+   r,   c                   U R                    H  n[        US/ 5      nU H  n[        XS5      n[        U[        5      (       d  M&  SU0n[        R
                  S:  a  UR                  (       a  SUS'   UR                  SLa  UR                  US'   [        X[        R                  " S0 UD65        U R                  R                  S5      c  0 U l        X#   U R                  U'   M     M     g)	zMake sure that stdlib `dataclasses` understands `Field` kwargs like `kw_only`
To do that, we simply change
  `x: int = pydantic.Field(..., kw_only=True)`
into
  `x: int = dataclasses.field(default=pydantic.Field(..., kw_only=True), kw_only=True)`
__annotations__Ndefaultr   Tr+   r$   r/   )__mro__getattr
isinstancer   sysversion_infor+   r$   setattrdataclassesfield__dict__getr9   )clsannotation_clsr   
field_namefield_value
field_argss         r0   make_pydantic_fields_compatible2dataclass.<locals>.make_pydantic_fields_compatible   s     "kkN ".2CRHK)
%ct<!+y99 %.{#;
 ##w.;3F3F,0Jy) ##4/)4)9)9Jv&):):)HZ)HI <<##$56>*,C'2=2I##J/- *	 *r1   c           
     Z  > SSK Jn  U" U 5      (       a  [        SU R                   S3SS9eU nT
b  T
O[	        U SS5      n[
        R                  " U5      n[        R                  R                  U 5      nU R                  n[        R                  " U 5      (       aS  SnU 4n[        U [        5      (       a  [        U R                     nXx4-   n[         R"                  " U R                  U5      n T" U 5        Tb2  Tn	UR$                  (       a  ['        S	U R                  < S
3[(        SS9  OUR$                  =(       d    Sn	[*        R,                  " U 4STTTTU	S.TD6n XPl        X`l
        UR0                  U l        UR2                  U l        SU l        [        R6                  " XSSS9  U $ )zCreate a Pydantic dataclass from a regular dataclass.

Args:
    cls: The class to create the Pydantic dataclass from.

Returns:
    A Pydantic dataclass.
r   )is_model_classz(Cannot create a Pydantic dataclass from z" as it is already a Pydantic modelzdataclass-on-model)codeN__pydantic_config__zN`frozen` is set via both the `dataclass` decorator and `config` for dataclass zW.This is not recommended. The `frozen` specification on `dataclass` will take priority.   )category
stacklevelFT)r#   r$   r%   r&   r'   r(   raise_errorstypes_namespace)_internal._utilsrM   r   __name__r<   r   ConfigWrapperr   DecoratorInfosbuild__doc___pydantic_dataclassesis_builtin_dataclass
issubclassr   __parameters__types	new_classr(   r   UserWarningrA   r   __pydantic_decorators__
__module____qualname____pydantic_complete__complete_dataclass)rE   rM   original_clsconfig_dictconfig_wrapper
decoratorsoriginal_docbasesgeneric_basefrozen_r)   r%   r(   kwargsrJ   r&   r$   r'   s             r0   create_dataclass#dataclass.<locals>.create_dataclass   s    	5##:3<<.Hjk) 
  !' 2fEZ\`8a ..{; //55c:

 {{ 55c::  L
 FE#w''&s'9'9:///#,,6C', G$$deheqeqdt um m( 	 %++4uG##

 #

 

 '1#"%00'44$)!00SXjno
r1   )rE   	type[Any]returnNone)rE   rs   rt   type[PydanticDataclass])r>   r?   )r3   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   rq   rp   rJ   s     ``````    @@r0   r   r   `   ss    \ 5=SSS=5(Y*YY(
7"$5!JFM M^  $|G1A$1GGr1   )r      )r      c                     [        S5      e)a!  This function does nothing but raise an error that is as similar as possible to what you'd get
if you were to try calling `InitVar[int]()` without this monkeypatch. The whole purpose is just
to ensure typing._type_check does not error if the type hint evaluates to `InitVar[<parameter>]`.
z 'InitVar' object is not callable)	TypeError)argsrp   s     r0   _call_initvarr|     s    
 :;;r1   rP   )forcerT   _parent_namespace_depth_types_namespacec               @   U(       d  U R                   (       a  gUb  UR                  5       nO>US:  a   [        R                  " US9=(       d    0 nUnO0 n[        R                  " X5      n[
        R                  " U [        R                  " U R                  SS9UUS9$ )aD  Try to rebuild the pydantic-core schema for the dataclass.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
the initial attempt to build the schema, and automatic rebuilding fails.

This is analogous to `BaseModel.model_rebuild`.

Args:
    cls: The class to rebuild the pydantic-core schema for.
    force: Whether to force the rebuilding of the schema, defaults to `False`.
    raise_errors: Whether to raise errors, defaults to `True`.
    _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
    _types_namespace: The types namespace, defaults to `None`.

Returns:
    Returns `None` if the schema is already "complete" and rebuilding was not required.
    If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.
Nr   )parent_depthF)checkrS   )
rf   copyr   parent_frame_namespacemerge_cls_and_parent_nsr\   rg   r   rX   rO   )rE   r}   rT   r~   r   rU   frame_parent_nss          r0   r   r     s    4 S..'5E5J5J5LO&*"/"F"FTk"l"rpr #2"$+CCCYO$77!!#"9"9G%+	
 	
r1   c               |     SU R                   ;   =(       a    [        R                  " U 5      $ ! [         a     gf = f)zWhether a class is a pydantic dataclass.

Args:
    class_: The class.

Returns:
    `True` if the class is a pydantic dataclass, `False` otherwise.
__pydantic_validator__F)rC   rA   is_dataclassAttributeError)class_s    r0   is_pydantic_dataclassr   L  s9    '6??:_{?W?WX^?__ s   +. 
;;)r#   Literal[False]r$   boolr%   r   r&   r   r'   r   r(   r   r)    ConfigDict | type[object] | Noner*   bool | Noner+   r   r,   r   rt   -Callable[[type[_T]], type[PydanticDataclass]])r3   type[_T]r#   r   r$   r   r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   rt   rv   )r#   r   r$   r   r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   rt   r   )r3   r   r#   r   r$   r   r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   rt   rv   r.   )r3   ztype[_T] | Noner#   r   r$   r   r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   rt   zGCallable[[type[_T]], type[PydanticDataclass]] | type[PydanticDataclass])r{   r   rp   r   rt   r   )rE   rv   r}   r   rT   r   r~   intr   zdict[str, Any] | Nonert   r   )r   rs   rt   z"TypeGuard[type[PydanticDataclass]])3r[   
__future__r   _annotationsrA   r>   r`   typingr   r   r   r   r   r	   r
   warningsr   typing_extensionsr   r   r   	_internalr   r   r   r   r\   
_migrationr   r)   r   errorsr   fieldsr   r   r   _internal._dataclassesr   __all__r   r?   rB   r   rW   __getattr__r|   InitVar__call__r   r   r/   r1   r0   <module>r      s   = 2  
  U U U  E E : : < )  % 1 19
*T]w;+<+<e[*QR  %!37(,  	
    1 &   
7  S ;+<+<e[*QR  %!"37(,&& & 	&
 & & & & 1& && & & 
!&  S&" ;+<+<e[*QR  %!"37(,  	
    1 & 
7  S ;+<+<e[*QR  %!"37(,&& & 	&
 & & & & 1& && 
!&  S& {'8'8%&MN gH !/3$(gH
gH gH 	gH
 	gH gH gH gH -gH "gH gH gH MgH OgHT  )	S''< $1K  #$.2.
	 .
 .
 	.

 !.
 ,.
 .
br1   