
    
!i	                        S SK Jr  S SKrS SKrS SKrS SKrS SKrS rS rS r	\R                  " 5       r\R                  " 5       S 5       rg)    )annotationsNc                   ^  U 4S jnU$ )z/A decorator to set the docstring of a function.c                   > TU l         U $ N)__doc__)fdocs    Z/home/james-whalen/.local/lib/python3.13/site-packages/google/generativeai/string_utils.pyinnerset_doc.<locals>.inner   s    	     )r	   r   s   ` r
   set_docr      s     Lr   c                    U R                  5       nU Vs/ s H  nSU;  d  M  UPM     nnU Vs/ s H  nSU;  d  M  UPM     nnSR                  U5      $ s  snf s  snf )Nz
.. _oneof:z"This field is a member of `oneof`_
)
splitlinesjoin)	docstringlineslines      r
   strip_oneofr   "   s`      "E#@ed|4'?TeE@#Xed'KSW'WTeEX99U AXs   
AA
AAc                2    [         U l        [         U l        U $ r   )_prettyprint__str____repr__)clss    r
   prettyprintr   )   s    CKCLJr   c                X   / n[         R                  " U 5       GH(  n[        R                  " [	        XR
                  5      5      nSnUR                  S5      S:  a  UR                  S5      (       a  SnOUR                  S5      (       a  SnO[        R                  " XC[        R                  S9(       a&  [        R                  " US	U[        R                  S9nODS
nOA[        UR
                  5      S-   n[        R                  " USU-  5      R                  S5      nUR!                  UR
                   SU 35        GM+     SR#                  U5      nU R$                  R&                  n[        U5      S-   n[        R                  " USU-  5      R                  S5      nU SU S3$ )a?  A dataclass prettyprint function you can use in __str__or __repr__.

Note: You can't set `__str__ = pprint.pformat` because it causes a recursion error.

Mostly identical to pprint but:

* This will contract long lists and dicts (> 10lines) to [...] and {...}.
* This will contract long object reprs to ClassName(...).
z^(\w+)\(.*\)$r   
   [z[...]{z{...})flagsz\1(...)z...    =z,
())dataclassesfieldspprintpformatgetattrnamecount
startswithrematchDOTALLsublentextwrapindentlstripappendr   	__class____name__)selfr)   r   sclass_rewidthattrsr-   s           r
   r   r   2   sI    F%NN7401#774=B||C  c""(RYY7FF8Z"))DK!OE3;/66s;A!o& &  JJvE>>""DIMEOOE3;/66s;EV1UG1r   )
__future__r   r(   r*   r0   reprlibr5   r   r   r   Reprreprrecursive_reprr   r   r   r
   <module>rE      sR    #   	   ||~ 	! !r   