
    rh	                        d dl mZ d dlZd dlZd dlZd dlZd dlZd Zd Zd Z	 ej                         Z ej                         d        Zy)    )annotationsNc                      fd}|S )z/A decorator to set the docstring of a function.c                    | _         | S N)__doc__)fdocs    s/var/www/html/ai-insurance-compliance-backend/venv/lib/python3.12/site-packages/google/generativeai/string_utils.pyinnerzset_doc.<locals>.inner   s    	     )r	   r   s   ` r
   set_docr      s     Lr   c                    | j                         }|D cg c]	  }d|vs| }}|D cg c]	  }d|vs| }}dj                  |      S c c}w c c}w )Nz
.. _oneof:z"This field is a member of `oneof`_
)
splitlinesjoin)	docstringlineslines      r
   strip_oneofr   "   s^      "E#@d|4'?T@E@#Xd'KSW'WTXEX99U AXs   	A
A
	AAc                2    t         | _        t         | _        | S r   )_prettyprint__str____repr__)clss    r
   prettyprintr   )   s    CKCLJr   c                8   g }t        j                  |       D ]  }t        j                  t	        | |j
                              }d}|j                  d      dk\  ry|j                  d      rd}n|j                  d      rd}nt        j                  ||t        j                        r(t        j                  |d	|t        j                        }nCd
}n@t        |j
                        dz   }t        j                  |d|z        j                  d      }|j!                  |j
                   d|         dj#                  |      }| j$                  j&                  }t        |      dz   }t        j                  |d|z        j                  d      }| d| dS )aS  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   sL    F% 'NN7401#774=B||C c"(ARYY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)   r/   reprlibr4   r   r   r   Reprreprrecursive_reprr   r   r   r
   <module>rD      sV    #   	   w||~ ! !r   