
    ; i	                        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dS )    )annotationsNc                      fd}|S )z/A decorator to set the docstring of a function.c                    | _         | S N)__doc__)fdocs    x/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/google/generativeai/string_utils.pyinnerzset_doc.<locals>.inner   s    	     )r	   r   s   ` r
   set_docr      s#         Lr   c                    |                                  }d |D             }d |D             }d                    |          S )Nc                    g | ]}d |v|	S )z
.. _oneof:r   .0lines     r
   
<listcomp>zstrip_oneof.<locals>.<listcomp>$   s"    @@@d|4'?'?T'?'?'?r   c                    g | ]}d |v|	S )z"This field is a member of `oneof`_r   r   s     r
   r   zstrip_oneof.<locals>.<listcomp>%   s$    XXXd'KSW'W'WT'W'W'Wr   
)
splitlinesjoin)	docstringliness     r
   strip_oneofr   "   sK      ""E@@e@@@EXXeXXXE99Ur   c                6    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}|                    d          dk    rw|                    d          rd}n|                    d          rd}nt          j	        ||t          j
                  r#t          j        |d	|t          j
                  }nEd
}nBt          |j                  dz   }t          j        |d|z                                d          }|                    |j         d|            d                    |          }| j        j        }t          |          dz   }t          j        |d|z                                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attrsr1   s           r
   r   r   2   s    F%% ' 'N740011#774==B||C   c"" (ARY777 F8Z")DDDKK!OE3;//66s;;Aoo!oo&&&&JJvE>"DIIMEOE3;//66s;;EUr   )
__future__r   r,   r.   r4   reprlibr9   r   r   r!   Reprreprrecursive_reprr   r   r   r
   <module>rI      s    # " " " " "      				         w|~~ ! ! ! ! !r   