
    iI                    R   S r SSKJr  SSK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Jr  SSKJr  SSKJrJr  SSKJr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SK)J*r*  Sr+\" S5      r,\RZ                  S:  a  \" \R\                  \$\&4S9\SSSSSSSSSSS.
                     S%S jj5       5       r/\" \R\                  \$\&4S9\SSSSSSSSSSS.
                       S&S jj5       5       r/Oz\" \R\                  \$\&4S9\SSSSSSSSS.                 S'S jj5       5       r/\" \R\                  \$\&4S9\SSSSSSSSS.                   S(S jj5       5       r/\" \R\                  \$\&4S9 S)SSSSSSSSSSS.
                       S*S jjj5       r/S+S jr0\" \15      r2\RZ                  S:  a  S,S  jr3\3\Rh                  l5        SSS!SS".           S-S# jjr6S.S$ jr7g)/z7Provide an enhanced dataclass that performs validation.    )annotationsN)TYPE_CHECKINGAnyCallableGenericLiteralNoReturnTypeVaroverload)warn)	TypeGuarddataclass_transform   )_config_decorators_namespace_utils_typing_extra)_dataclasses)getattr_migration)
ConfigDict)PydanticUserError)Field	FieldInfoPrivateAttr)PydanticDataclass)MappingNamespace)	dataclassrebuild_dataclass_T   
   )field_specifiersFT.
initrepreqorderunsafe_hashfrozenconfigvalidate_on_initkw_onlyslotsc        
            g N r$   s
             \/var/www/html/qgis-automation/mouza_env/lib/python3.13/site-packages/pydantic/dataclasses.pyr   r      s     	    c       
            g r0   r1   )_clsr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   s              r2   r   r   0   s     #&r3   r%   r&   r'   r(   r)   r*   r+   r,   c                    g r0   r1   r6   s           r2   r   r   C   s     	r3   c                   g r0   r1   )	r5   r%   r&   r'   r(   r)   r*   r+   r,   s	            r2   r   r   R   s     #&r3   c       
   	        ^^^^^^^
^ USL d   S5       eUSLd   S5       e[         R                  S:  a  U	T
S.mO0 mSUUUUUUU
U4S jjnU c  U$ U" U 5      $ )ar  !!! abstract "Usage Documentation"
    [`dataclasses`](../concepts/dataclasses.md)

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                  >^^ SSK Jn  U" U 5      (       a  [        SU R                   S3SS9eU n[	        S U R
                   5       5      nU(       d1  Tb.  [        U S	5      (       a  [        S
U R                   S3[        SS9  Tb  TO[        U S	S5      n[        R                  " U5      n[        R                  R                  U 5      nUR                  U5        U R                   n["        R$                  " U 5      (       aS  SnU 4n['        U [(        5      (       a  [(        U R*                     n	X4-   n[,        R.                  " U R                  U5      n Tb2  TmUR0                  (       a  [        SU R                  < S3[        SS9  OUR0                  =(       d    Sm[2        R4                  " U 5      n
U
 HF  n[        XS5      n[7        U[8        5      (       d  M&  [;        X["        R<                  " U5      5        MH     ["        R>                  " U 5         [@        RB                  " U 4STTTTTS.TD6n SSS5        URD                  (       a}  U RF                  m[H        RJ                  " U RF                  5      SUU4S jj5       nURM                  SU 5      U l#        T(       a'  [        U S5      (       d  SS jnSS jnXl'        Xl(        SU l)        X`l*        Xpl        [        USS5      nURV                  U l+        [X        RZ                  S:  a  Ub  UUl.        UU l.        UR^                  U l/        [a        [b        5      U l2        SU l3        ["        Rh                  " XSS9  U $ ! , (       d  f       GN6= f)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)codec              3  N   #    U  H  n[         R                  " U5      v   M     g 7fr0   )dataclassesis_dataclass).0bases     r2   	<genexpr>6dataclass.<locals>.create_dataclass.<locals>.<genexpr>   s      ZMD!9!9$!?!?Ms   #%N__pydantic_config__z[`config` is set via both the `dataclass` decorator and `__pydantic_config__` for dataclass zK. The `config` specification from `dataclass` decorator will take priority.   )category
stacklevelzN`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.FT)r%   r&   r'   r(   r)   r*   c               P  > T(       a	  T" XU5      $ [        U 5      n[        X1S 5      n[        U[        5      (       a  UR	                  X5        g [        U[
        R                  5      (       a  U R                  R                  X5        g UR                  R                  XU5        g r0   )typegetattr
isinstanceproperty__set__	functoolscached_property__dict____setitem____pydantic_validator__validate_assignment)instancenamevalueinst_clsattrfrozen_original_setattrs        r2   validated_setattr>dataclass.<locals>.create_dataclass.<locals>.validated_setattr   s    +HEBB>xt4dH--LL1i&?&?@@%%11$>33GGX]^r3   __setstate__c                    [         R                  " U 5       Vs/ s H  n[        XR                  5      PM     sn$ s  snf r0   )r>   fieldsrJ   rU   )selffs     r2   _dataclass_getstate@dataclass.<locals>.create_dataclass.<locals>._dataclass_getstate  s0    ;F;M;Md;ST;SaGD&&1;STTTs   ;c                    [        [        R                  " U 5      U5       H%  u  p#[        R	                  XR
                  U5        M'     g r0   )zipr>   r_   object__setattr__rU   )r`   statefieldrV   s       r2   _dataclass_setstate@dataclass.<locals>.create_dataclass.<locals>._dataclass_setstate  s5    (+K,>,>t,De(L**4UC )Mr3   __firstlineno__)r!      )raise_errors)rT   r   rU   strrV   r   returnNone)r`   r   rp   	list[Any])r`   r   rh   rr   rp   rq   )5_internal._utilsr;   r   __name__any	__bases__hasattrr   UserWarningrJ   r   ConfigWrapperr   DecoratorInfosbuildupdate_from_config__doc___pydantic_dataclassesis_stdlib_dataclass
issubclassr   __parameters__types	new_classr*   r   safe_get_annotationsrK   r   setattras_dataclass_fieldpatch_base_fieldsr>   r   rS   rg   rN   wraps__get____getstate__r]   __is_pydantic_dataclass____pydantic_decorators__
__module__sysversion_inforl   __qualname__classmethod_pydantic_fields_complete__pydantic_fields_complete____pydantic_complete__complete_dataclass)clsr;   original_clshas_dataclass_baseconfig_dictconfig_wrapper
decoratorsoriginal_docbasesgeneric_basecls_anns
field_namefield_valuer[   rb   rj   firstlinenorY   rZ   r+   r'   r*   kwargsr(   r&   r.   r)   s                    @@r2   create_dataclass#dataclass.<locals>.create_dataclass   sB    	5##:3<<.Hjk) 
  ! ZCMM ZZ!f&8WSJ_=`=`mnqnznzm{ |\ ]$	 !' 2fEZ\`8a ..{; //55c:
%%n5
 {{ 44S99  L
 FE#w''&s'9'9:///#,,6C G$$deheqeqdt um m( 	 %++4uG !55c:"J "#48K+y11)>)Q)QR])^_ # #44S9''
 '
 
C : --"__S__-_ ._ 077cBCOWS.99UD $7 #6  )-%&0#"l,=tD%00w&;+B ,7L("-C'44+67P+Q($)! 	00SXY
S :9s   M''
M6)r   	type[Any]rp   type[PydanticDataclass])r   r   )r5   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r   r   s     ``````  ` @r2   r   r   b   sn    ^ 5=SSS=5(Y*YY(
7"$u5^ ^@  $|G1A$1GGr3   c                V    [        S U R                  R                  5        5       5      $ )zReturn whether the fields where successfully collected (i.e. type hints were successfully resolves).

This is a private property, not meant to be used outside Pydantic.
c              3  8   #    U  H  oR                   v   M     g 7fr0   )	_complete)r@   
field_infos     r2   rB   ,_pydantic_fields_complete.<locals>.<genexpr>A  s     W6V
##6Vs   )all__pydantic_fields__values)r   s    r2   r   r   <  s$    
 Wc6M6M6T6T6VWWWr3   )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)argsr   s     r2   _call_initvarr   J  s    
 :;;r3   rE   )forcern   _parent_namespace_depth_types_namespacec               x   U(       d  U R                   (       a  gS H  nXPR                  ;   d  M  [        X5        M!     SU l         Ub  UnO'US:  a  [        R                  " USS9=(       d    0 nO0 n[
        R                  " US9n[        R                  " U [        R                  " U R                  SS9UUS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`.
N)__pydantic_core_schema__rR   __pydantic_serializer__Fr   T)parent_depthr   )parent_namespace)check)rn   ns_resolver_force_build)r   rP   delattrr   parent_frame_namespacer   
NsResolverr~   r   r   ry   rD   )r   r   rn   r   r   rX   
rebuild_nsr   s           r2   r   r   T  s    4 S..a<< C	 b !&C#%
	 1	$"99G^fjkqoq

"--#K !33c55UC!
 
 
r3   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.
r   F)rP   r>   r?   AttributeError)class_s    r2   is_pydantic_dataclassr     s9    *foo=b+BZBZ[aBbb s   +. 
;;)r%   Literal[False]r&   boolr'   r   r(   r   r)   r   r*   r   r+    ConfigDict | type[object] | Noner,   bool | Noner-   r   r.   r   rp   -Callable[[type[_T]], type[PydanticDataclass]])r5   type[_T]r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   r-   r   r.   r   rp   r   )r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   rp   r   )r5   r   r%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   rp   r   r0   )r5   ztype[_T] | Noner%   r   r&   r   r'   r   r(   r   r)   r   r*   r   r+   r   r,   r   r-   r   r.   r   rp   zGCallable[[type[_T]], type[PydanticDataclass]] | type[PydanticDataclass])r   r   rp   r   )r   r   r   r   rp   r	   )r   r   r   r   rn   r   r   intr   zMappingNamespace | Nonerp   r   )r   r   rp   z"TypeGuard[type[PydanticDataclass]])8r}   
__future__r   _annotationsr>   rN   r   r   typingr   r   r   r   r   r	   r
   r   warningsr   typing_extensionsr   r   	_internalr   r   r   r   r   r~   
_migrationr   r+   r   errorsr   r_   r   r   r   _internal._dataclassesr   _internal._namespace_utilsr   __all__r   r   ri   r   r   rt   __getattr__r   InitVar__call__r   r   r1   r3   r2   <module>r      s   = 2   
  ^ ^ ^  < L L < )  % 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 VH !/3$(VH
VH VH 	VH
 	VH VH VH VH -VH "VH VH VH MVH OVHrX  )g< $1K  #$04:	 : : 	:
 !: .: :zr3   