
    h                        % S r SSKJr  SSKrSSKrSSKJr  SSKrSSKJ	r	  SSK
Jr  SSKJr  \R                  (       a  S	rS
\S'   S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)Any)typing_objects)is_union_origin   )_typing_extraz'typing.Iterable[tuple[str | None, Any]]ztyping_extensions.TypeAliasReprArgszJtyping.Iterable[Any | tuple[Any] | tuple[str, Any] | tuple[str, Any, Any]]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    J/var/www/html/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                
  ^  T R                   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>2   s     <1WT1%&s   )	__slots__hasattrr$   keys__repr_recursion__)r   attrs_namesattrsavs   `    r   __repr_args__Representation.__repr_args__(   sq     nnwtZ88--,,.K<<TYkTYDA]^G$AD,C,CA,FGTYkkks   	A?A?c                .    U R                   R                  $ )z/Name of the instance's class, used in __repr__.)	__class__r   r   s    r   __repr_name__Representation.__repr_name__5   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   r.   !Representation.__repr_recursion__9   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'   r1   r2   s      r   r)   .Representation.__repr_str__.<locals>.<genexpr>?   s+     ePd	T!W!AaU|CPds   %')joinr3   )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   NrA   ,r   ))r7   r3   )r   fmtkwargsnamevalues        r   
__pretty__Representation.__pretty__A   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)r3   )r   rO   
field_reprs      r   __rich_repr__Representation.__rich_repr__N   s/      $ 2 2 4D|  &&	 !5s   )+c                $    U R                  S5      $ )N )rF   r   s    r   __str__Representation.__str__V   s      %%r   c                L    U R                  5        SU R                  S5       S3$ )NrI   , rL   )r7   rF   r   s    r   r   Representation.__repr__Y   s+    $$&'q):):4)@(ACCr   N)r   r	   r   )r=   r   r   r   )rE   r   r   r   )rM   ztyping.Callable[[Any], Any]rN   r   r   z!typing.Generator[Any, None, None])r   r
   )r   r   r   r   r+   r3   r7   r.   rF   rQ   rU   rY   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 [        R                  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  [        R0                  " [$        R&                  " U 5      5      (       a4  SR)                  [+        [        [$        R.                  " U 5      5      5      nO3SR)                  [+        [,        [$        R.                  " U 5      5      5      n U R2                   SU S3$ [        U [        5      (       a  U R2                  $ [        U 5      R7                  SS5      R7                  S	S5      $ ! [4         a.    [        U 5      R7                  SS5      R7                  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...r\   zUnion[][ztyping. ztyping_extensions.)
isinstancetypesFunctionTypeBuiltinFunctionTyper   r!   rB   typing
ForwardRefr   is_typealiastyper   r   typing_baseWithArgsTypesr;   r6   r   typing_extensions
get_originrD   mapdisplay_as_typeget_args
is_literalr   AttributeErrorreplace)objargss     r   rn   rn   ]   s   
 #**E,E,EFGG||		C	(	(Cy	C**	+	+~/N/Ns/S/S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   :I 5JJ)rs   r   r   r   )r   
__future__r   _annotationsrc   rf   r   rk   typing_inspectionr   typing_inspection.introspectionr   ra   r   TYPE_CHECKINGr	   __annotations__r
   r   r   r!   rn   r   r   r   <module>r{      sc    @ 2     , ; 	,UH)UT / 
 ;D ;D| Rr   