+
    ~j4                     8   R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	 ^RI
HtHtHtHtHtHtHtHtHtHtHtHtHtHt  ! R R]	4      t ! R R]! R	R
4      4      t]P6                  ! R4      t]P6                  ! R4      t]P6                  ! R4      t]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P>                  4      ]! RR]P@                  4      ]! RR]P@                  4      ]! RR]PB                  4      ]! RR]PB                  4      .t" ! R  R!4      t#R" R# lt$]PJ                  R$3R% R& llt&R# )'zGoogle-style docstring parsing.N)OrderedDict
namedtuple)IntEnum)EXAMPLES_KEYWORDSPARAM_KEYWORDSRAISES_KEYWORDSRETURNS_KEYWORDSYIELDS_KEYWORDS	DocstringDocstringExampleDocstringMetaDocstringParamDocstringRaisesDocstringReturnsDocstringStyle
ParseErrorRenderingStylec                   *    ] tR t^tRt^ t ^t ^tRtR# )SectionTypezTypes of sections. N)	__name__
__module____qualname____firstlineno____doc__SINGULARMULTIPLESINGULAR_OR_MULTIPLE__static_attributes__r       l/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/docstring_parser/google.pyr   r      s    H%H#.r   r   c                       ] tR t^(tRtRtR# )SectionzA docstring section.r   N)r   r   r   r   r   r   r   r   r    r"   r"   (   s    r   r"   SectionBaseztitle key typez\s*(.+?)\s*\(\s*(.*[^\s]+)\s*\)z.*\. Defaults to (.+)\.z(\s*[^:\s]+:)|([^:]*\]:.*)	ArgumentsparamArgs
ParametersParamsRaisesraises
ExceptionsExcept
Attributes	attributeExampleexamplesExamplesReturnsreturnsYieldsyieldsc                      a  ] tR t^@t o RtRV 3R lR lltR tV 3R lR lt]V 3R lR	 l4       t	]V 3R
 lR l4       t
V 3R lR ltV 3R lR ltRtV tR# )GoogleParserz#Parser for Google-style docstrings.Nc                h   < V ^8  d   QhRS[ P                  S[ P                  S[,          ,          /# )   sections)TOptionalListr"   )format__classdict__s   "r    __annotate__GoogleParser.__annotate__C   s&      

166'?3r   c                    V'       g   \         pV Uu/ uF  q3P                  VbK  	  upV n        W n        V P	                  4        R# u upi )zSetup sections.

:param sections: Recognized sections or None to defaults.
:param title_colon: require colon after section title.
N)DEFAULT_SECTIONStitler:   title_colon_setup)selfr:   rE   ss   &&& r    __init__GoogleParser.__init__C   s<     'H-56X!X6& 7s   Ac                   V P                   '       d   R pMRp\        P                  ! RRP                  R V P                   4       4      ,           R,           V,           R,           \        P
                  R7      V n        R# )	: z^(|c              3   .   "   T F  pR V R2x  K  	  R# 5i)()Nr   ).0ts   & r    	<genexpr>&GoogleParser._setup.<locals>.<genexpr>X   s     7A1#Qxs   rQ   z	[ 	]*$flagsN)rE   recompilejoinr:   M	titles_re)rG   colons   & r    rF   GoogleParser._setupQ   sk    EEhh7778  	
 $$
r   c                ,   < V ^8  d   QhRS[ RS[ RS[/# )r9   textrD   return)strr   )r>   r?   s   "r    r@   rA   _   s"     "= "= "=C "=M "=r   c                   V P                   V,          pVP                  \        P                  8X  d   \        P                  V4      '       d    VP                  \        P                  8X  d   V P                  W14      # RV9  d   \        RV: R24      hVP                  R^4      w  rEV'       d9   RV9   d2   VP                  R^4      w  rgV\        P                  ! V4      ,           pV'       dj   V^ ,          R8X  d
   VR,          MTpRV9   d9   VP                  R^4      w  rgVR,           \        P                  ! V4      ,           pVP                  R4      pV P                  W4V4      # )zyBuild docstring element.

:param text: docstring element text
:param title: title of section containing element
:return:
rL   zExpected a colon in .
 :   NN)r:   typer   r   MULTIPLE_PATTERNmatchr   _build_single_metar   splitinspectcleandocstrip_build_multi_meta)rG   r`   rD   sectionbeforedesc
first_linerests   &&&     r    _build_metaGoogleParser._build_meta_   s(    --& LLK<<<$**400\\[111**799d?3D81=>> zz#q)dfn%||D!4J'"2"24"88F#Aw#~484Dt|#'::dA#6 
!D(7+;+;D+AA::d#D%%gt<<r   c                ,   < V ^8  d   QhRS[ RS[RS[/# )r9   rq   rs   ra   r"   rb   r   )r>   r?   s   "r    r@   rA      s'     C CG C3 C= Cr   c                   V P                   \        \        ,          9   d,   \        V P                   .VR V P                   \        9   R7      # V P                   \        9   d   \        V P                   .VR R7      # V P                   \        9   d   \        V P                   .R VR7      # V P                   \        9   d   \        R4      h\        V P                   .VR7      # )Nargsdescription	type_nameis_generatorr|   r}   r~   )r|   snippetr}   zExpected paramenter name.r|   r}   )keyr   r	   r   r   r   r   r   r   r   r   )rq   rs   s   &&r    rk   GoogleParser._build_single_meta   s    ;;*_<<#kk] $[[O;	  ;;/)"kk]  ;;++#kk]Dd  ;;.(8997;;-TBBr   c                2   < V ^8  d   QhRS[ RS[RS[RS[/# )r9   rq   rr   rs   ra   ry   )r>   r?   s   "r    r@   rA      s3     )K )K)K"%)K-0)K	)Kr   c           	        V P                   \        9   d   \        P                  V4      pV'       dV   VP	                  ^^4      w  rEVP                  R4      '       d	   RpVRR
 pM'VP                  R4      '       d	   RpVRR pMRpMTRrTRp\        P                  V4      pV'       d   VP	                  ^4      MRp\        V P                   V.VVVVVR7      # V P                   \        \        ,          9   d-   \        V P                   V.VVV P                   \        9   R7      # V P                   \        9   d   \        V P                   V.W!R7      # \        V P                   V.VR	7      # )rg   
, optionalTN?F)r|   r}   arg_namer~   is_optionaldefaultr{   r   r   i)r   r   GOOGLE_TYPED_ARG_REGEXrj   groupendswithGOOGLE_ARG_DESC_REGEXr   r   r	   r   r   r   r   )rq   rr   rs   rj   r   r~   r   r   s   &&&     r    rp   GoogleParser._build_multi_meta   sR    ;;.(*008E&+kk!Q&7#%%l33"&K )$3I'',,"&K )#2I"'K&,d)")//5E(-ekk!n4G!kk6* !#'  ;;*_<<#kk6*  $[[O;	  ;;/)"kk6*  7;;"7TJJr   c                    < V ^8  d   QhRS[ /# )r9   rq   )r"   )r>   r?   s   "r    r@   rA      s      7 r   c                V    WP                   VP                  &   V P                  4        R# )z<Add or replace a section.

:param section: The new section.
N)r:   rD   rF   )rG   rq   s   &&r    add_sectionGoogleParser.add_section   s     (/gmm$r   c                J   < V ^8  d   QhRS[ P                  S[,          RS[/# r9   r`   ra   r;   r<   rb   r
   )r>   r?   s   "r    r@   rA      s'     X X!**S/ Xi Xr   c           	     J	   \        \        P                  R7      pV'       g   V# \        P                  ! V4      pV P
                  P                  V4      pV'       d'   VRVP                  4        pWP                  4       R pMTpRpVP                  R^4      pV^ ,          ;'       g    RVn	        \        V4      ^8  d_   V^,          ;'       g    RpVP                  R4      Vn        VP                  R4      Vn        VP                  4       ;'       g    RVn        \#        V P
                  P%                  V4      4      pV'       g   V# . p	\'        \        V4      ^,
          4       FE  p
V	P)                  W,          P+                  4       W^,           ,          P                  4       34       KG  	  V	P)                  VR,          P+                  4       \        V4      34       \-        4       p\/        V	4       Fv  w  p
w  rW,          P1                  ^4      pWP2                  9  d   K1  W\V p\4        P                  ! RV4      pVe   VRVP                  4        pVP                  R4      W&   Kx  	  V'       g   V# VP7                  4        EF  w  pp\4        P                  ! RV4      pV'       g   \9        RV R	24      hVP1                  4       pV P2                  V,          P:                  \<        P>                  \<        P@                  39   dD   \        P                  ! V4      pVPB                  P)                  V PE                  VV4      4       K  R
V,           R,           p\#        \4        P$                  ! VV\4        PF                  R7      4      pV'       g   \9        RV RV R	24      h. p\'        \        V4      ^,
          4       FG  p
VP)                  VV
,          P+                  4       VV
^,           ,          P                  4       34       KI  	  VP)                  VR,          P+                  4       \        V4      34       \/        V4       FF  w  p
w  rVW P                  R4      pVPB                  P)                  V PE                  VV4      4       KH  	  EK  	  V# )RParse the Google-style docstring into its components.

:returns: parsed docstring
)styleNrM   re   z

z\n\Sz^\s*zCan't infer indent from ""^z(?=\S)rV   zNo specification for "z": "r   )$r
   r   GOOGLErm   rn   r\   searchstartrl   short_descriptionlen
startswithblank_after_short_descriptionr   blank_after_long_descriptionro   long_descriptionlistfinditerrangeappendendr   	enumerater   r:   rX   itemsr   rh   r   r   r   metarv   r[   )rG   r`   retrj   
desc_chunk
meta_chunkpartslong_desc_chunkmatchessplitsjchunksr   r   rD   meta_detailsunknown_metachunkindent_matchindentpart_re	c_matchesc_splitss   &&                      r    parseGoogleParser.parse   s   
 n334J % %%d+o.Jkkmo.JJJ   q) %a 0 0Du:>#Ahnn"O0?0J0J1C- 0?/G/G/OC,#2#8#8#:#B#BdC  t~~..z:;Js7|a'(AMM7:>>+WU^-A-A-CDE )wr{(#j/:;(0OA|J$$Q'EMM) &C0L99Wl;L'+,Bl.@.@.BC(..t4FM  1 J #LLNLE599We4L #=eWA!FGG!'')F }}U#(($$00-  ''. 0 0u => ,*CR[[e244@AI #9%UG1!MNNH3y>A-.1!1!1!3Yq1u5E5K5K5M NO /OOYr]..0#e*=>#,X#6<EU'--d3 0 0u => $73 +: 
r   )r:   rE   r\   )NT)r   r   r   r   r   rI   rF   rv   staticmethodrk   rp   r   r   r   __classdictcell__)r?   s   @r    r7   r7   @   se     - 
"= "=H C C( )K )KV X Xr   r7   c                Z    V ^8  d   QhR\         P                  \        ,          R\        /# r   r   )r>   s   "r    r@   r@   (  s"     & &

3 &I &r   c                4    \        4       P                  V 4      # )r   )r7   r   )r`   s   &r    r   r   (  s    
 >%%r   z    c                H    V ^8  d   QhR\         R\        R\        R\        /# )r9   	docstringrendering_styler   ra   )r
   r   rb   )r>   s   "r    r@   r@   0  s6     n nn#n n 		nr   c                F  aaa	a
 R VV	V3R llo
R V	V
3R llp. o	V P                   '       d   S	P                  V P                   4       V P                  '       d   S	P                  R4       V P                  '       d   S	P                  V P                  4       V P                  '       d   S	P                  R4       T! RV P
                  ;'       g    .  Uu. uF  qDP                  ^ ,          R8X  g   K  VNK   	  up4       T! RV P
                  ;'       g    .  Uu. uF  qDP                  ^ ,          R	8X  g   K  VNK   	  up4       T! R
V P                  ;'       g    .  Uu. uF  qDP                  '       d   K  VNK  	  up4       T! RV P                  ;'       g    .  Uu. uF  qDP                  '       g   K  VNK  	  up4       T! RV P                  ;'       g    . 4       V P                  '       dj   V P                  '       gX   V P                  pS	P                  V'       d   RMR
4       S	P                  R\        S	R,          4      ,          4       S
! V4       V P                   F  p\        V\        \        \         34      '       d   K&  S	P                  VP                  ^ ,          P#                  RR4      P%                  4       R,           4       VP&                  '       dQ   VP&                  P)                  4        Uu. uF  pSV,           NK  	  ppS	P                  RP+                  V4      4       S	P                  R4       K  	  S	'       d"   S	R,          '       g   S	P-                  4        K)  RP+                  S	4      # u upi u upi u upi u upi u upi )zRender a parsed docstring into docstring text.

:param docstring: parsed docstring representation
:param rendering_style: the style to render docstrings
:param indent: the characters used as indentation in the docstring string
:returns: docstring text
c                d    V ^8  d   QhR\         P                  \        \        \        3,          /# )r9   one)r;   Unionr   r   r   )r>   s   "r    r@   compose.<locals>.__annotate__=  s%     % %WW^%5FG%r   c                   < R p\        V \        4      '       d   YP                  ;'       g    R ,          pM2\        V \        4      '       d   YP                  ;'       g    R ,          p\        V \        4      '       d-   V P
                  '       d   S\        P                  8X  d   RMRpMR pV P                  '       d#   V'       d   VRV P                   V R2,          pM3V P                  '       d   WP                   V R2,          pM	VR,          pSV,           pV P                  '       d_   S\        P                  8X  dJ   RS S 2P                  V.V P                  P                  4       ,           4      pSP                  V4       R# V P                  '       d[   V P                  P                  4       vrERS S 2P                  VR,           V,           .V,           4      pSP                  V4       R# SP                  V4       R# )	rM   r   r   z (z):rL   re   rf   N)
isinstancer   r   r   return_namer   r   COMPACTr~   r}   EXPANDEDrZ   
splitlinesr   )	r   headoptionalbodyfirstru   r   r   r   s	   &     r    process_onecompose.<locals>.process_one=  s    c>**LL&&B&D-..OO))r)Dc>**s #n&<&<< !  H===Tbz44D]]]}}ohZq11DCKD}???.2I2IIxx(--3355D LL___ __779NUxx(--tczE/A.BT.IJDLLLLr   c                n    V ^8  d   QhR\         R\        P                  \        P                  ,          /# )r9   namer|   )rb   r;   r=   Any)r>   s   "r    r@   r   d  s&      3 affQUUm r   c                    < V'       d6   SP                  V 4       V F  pS! V4       K  	  SP                  R 4       R# R# )rM   N)r   )r   r|   argr   r   s   && r    process_sectcompose.<locals>.process_sectd  s5    LLC  LL	 r   rM   zArgs:r%   zAttributes:r.   zReturns:zYields:zRaises:-_rL   re   r   )r   r   r   r   r   paramsr|   many_returnsr   r*   r3   r   r   r   r   r   r   replacerD   r}   r   rZ   pop)r   r   r   r   pr   r   llinesr   r   s   &ff      @@r    composer   0  s   % %N  E"""Y001...R!!!Y//0---RY--333L3vvayG7K!!3L $$***G*qffQi;.F*G
 **00b0G0q0G
 y55;;;N;!~~AA;N I,,223!7!7!7#Y:6S3uRy>)*C>#3_E
 
 TYYq\))#r288:S@A)-)9)9)D)D)FG)FAVaZZ)FEGLL5)*R  b				99UO M
 	H
 	H O$ Hs6   N

5N

N
;N
#N
;N
#N
;N
N)'r   rm   rX   typingr;   collectionsr   r   enumr   commonr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r"   rY   r   r   ri   r   r   r   rC   r7   r   r   r   r   r   r    <module>r      s   %  	  /    $
/' 
/j(89  $FG 

#=> ::;<  K+"6"67FG[112L';#7#78Hg{334Hh 4 45L(K$8$89Hh 4 45L+{';';<Iz;#7#78J
K$8$89Iy+"B"BCHh @ @A  e eP& '5&<&<n nr   