
    i4                    .   % S r SSKJr  SSKrSSKJrJrJrJ	r	  SSK
JrJrJrJr  SSKrSSKJr  SSKJr  SSKJr  S	S
KJr  \(       a3  \	\\S-  \4      rS\S'   \	\\\   -  \\\4   -  \\\\4   -     rS\S'    " S S\5      r " S S5      rSS jrg)z:Tools to provide pretty/human-readable display of objects.    )annotationsN)Callable
Collection	GeneratorIterable)TYPE_CHECKINGAny
ForwardRefcast)	TypeAlias)typing_objects)is_union_origin   )_typing_extrar   ReprArgsRichReprResultc                  "    \ rS rSrSrSS jrSrg)	PlainRepr   zString class where repr doesn't include quotes. Useful with Representation when you want to return a string
representation of something that is valid (or pseudo-valid) python.
c                    [        U 5      $ N)strselfs    `/var/www/html/qgis-automation/mouza_env/lib/python3.13/site-packages/pydantic/_internal/_repr.py__repr__PlainRepr.__repr__   s    4y     Nreturnr   )__name__
__module____qualname____firstlineno____doc__r   __static_attributes__r   r   r   r   r      s    r   r   c                  h    \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSrg)Representation   r   c                4  ^  [        [        [           T R                  5      nU(       d+  [	        T S5      (       a  T R
                  R                  5       nU 4S jU 5       nU VVs/ s H#  u  p4Uc  M
  X4T La  UOT R                  U5      4PM%     snn$ s  snnf )a  Returns the attributes to show in __str__, __repr__, and __pretty__ this is generally overridden.

Can either return:
* name - value pairs, e.g.: `[('foo_name', 'foo'), ('bar_name', ['b', 'a', 'r'])]`
* or, just values, e.g.: `[(None, 'foo'), (None, ['b', 'a', 'r'])]`
__dict__c              3  >   >#    U  H  o[        TU5      4v   M     g 7fr   )getattr).0sr   s     r   	<genexpr>/Representation.__repr_args__.<locals>.<genexpr>1   s     <1WT1%&s   )r   r   r   	__slots__hasattrr,   keys__repr_recursion__)r   attrs_namesattrsavs   `    r   __repr_args__Representation.__repr_args__'   s|     :c?DNN;wtZ88--,,.K<<TYkTYDA]^G$AD,C,CA,FGTYkkks   &	B3Bc                .    U R                   R                  $ )z/Name of the instance's class, used in __repr__.)	__class__r"   r   s    r   __repr_name__Representation.__repr_name__4   s    ~~&&&r   c                L    S[        U5      R                   S[        U5       S3$ )z8Returns the string representation of a recursive object.z<Recursion on z	 with id=>)typer"   id)r   objects     r   r6   !Representation.__repr_recursion__8   s(      V 5 56i6
|1MMr   c                N    UR                  S U R                  5        5       5      $ )Nc              3  R   #    U  H  u  pUc  [        U5      OU SU< 3v   M     g 7f)N=)repr)r/   r9   r:   s      r   r1   .Representation.__repr_str__.<locals>.<genexpr>>   s+     ePd	T!W!AaU|CPds   %')joinr;   )r   join_strs     r   __repr_str__Representation.__repr_str__=   s!    }}ePTPbPbPdeeer   c              +     #    U R                  5       S-   v   Sv   U R                  5        H!  u  p4Ub  US-   v   U" U5      v   Sv   Sv   M#     Sv   Sv   g7f)	zRUsed by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.(r   NrI   ,r   ))r?   r;   )r   fmtkwargsnamevalues        r   
__pretty__Representation.__pretty__@   sc       "S((--/KDSj e*IG 0 	s   AAc              #  Z   #    U R                  5        H  u  pUc  Uv   M  X4v   M     g7f)zYUsed by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.N)r;   )r   rW   
field_reprs      r   __rich_repr__Representation.__rich_repr__M   s/      $ 2 2 4D|  &&	 !5s   )+c                $    U R                  S5      $ )N )rN   r   s    r   __str__Representation.__str__U   s      %%r   c                L    U R                  5        SU R                  S5       S3$ )NrQ   , rT   )r?   rN   r   s    r   r   Representation.__repr__X   s+    $$&'q):):4)@(ACCr   N)r!   r   r    )rE   r	   r!   r   )rM   r   r!   r   )rU   zCallable[[Any], Any]rV   r	   r!   zGenerator[Any])r!   r   )r"   r#   r$   r%   r3   r;   r?   r6   rN   rY   r]   ra   r   r'   r   r   r   r)   r)      s5     Il'N
f'&Dr   r)   c                   [        U [        R                  [        R                  45      (       a  U R                  $ U SL a  g[        U [
        5      (       a  [        U 5      $ [        U [        5      (       d  [        R                  " U 5      (       a  [        U 5      $ [        U [        R                  [        R                  [        45      (       d  U R                  n [!        ["        R$                  " U 5      5      (       a9  SR'                  [)        [*        ["        R,                  " U 5      5      5      nSU S3$ [        U [        R                  5      (       a  [        R.                  " ["        R$                  " U 5      5      (       a4  SR'                  [)        [        ["        R,                  " U 5      5      5      nO3SR'                  [)        [*        ["        R,                  " U 5      5      5      n U R0                   SU S3$ [        U [        5      (       a  U R0                  $ [        U 5      R5                  SS5      R5                  S	S5      $ ! [2         a.    [        U 5      R5                  SS5      R5                  S	S5      s $ f = f)
zPretty representation of a type, should be as close as possible to the original type definition string.

Takes some logic from `typing._type_repr`.
.z...rd   zUnion[][ztyping. ztyping_extensions.)
isinstancetypesFunctionTypeBuiltinFunctionTyper"   r)   rJ   r
   r   is_typealiastyper   r   typing_baseWithArgsTypesrC   r>   r   typing_extensions
get_originrL   mapdisplay_as_typeget_args
is_literalr$   AttributeErrorreplace)objargss     r   rt   rt   \   s   
 #**E,E,EFGG||		C	(	(Cy	C	$	$(G(G(L(L3xcM55}7R7RTXYZZmm(33C899yy_.?.H.H.MNOvQ	C44	5	5$$%6%A%A#%FGG99S'8'A'A#'FGHD99S2C2L2LS2QRSD	U&&'qa00 
C		Cy  B/778LbQQ  	Us8##Ir2::;OQSTT	Us   0I 5JJ)ry   r	   r!   r   )r&   
__future__r   _annotationsrk   collections.abcr   r   r   r   typingr   r	   r
   r   rq   r   typing_inspectionr   typing_inspection.introspectionr   ri   r   tupler   r   __annotations__r   r   r)   rt   r   r   r   <module>r      s    @ 2  E E 7 7  ' , ; "5tS#9:Hi: (uSz)9E#s(O)KeTWY\^aTaNb)b cNIc :D :Dz Rr   