
    }cU              	          d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZ ddlm Z   ej!        e"          Z# ej$        d          Z% ej$        d          Z& ej$        d          Z' ej$        d          Z( ej$        d          Z) ej$        d          Z* ej$        d          Z+ ej$        d          Z, ej$        d          Z- ej$        d          Z. ej$        d          Z/dZ0i fde1de
e1e1f         de1fdZ2 G d d          Z3dee1         dee1         fd Z4d!e1dee1         fd"Z5d)d#e1d$e1de1fd%Z6di fde1d$e1de7de1fd&Z8 G d' d(e3          Z9dS )*z-Classes for docstring parsing and formatting.    N)partial)AnyCallableDictListTupleTypeUnion)SphinxConfig)RemovedInSphinx60Warning)modify_iter)___)logging)stringify_annotation)get_type_hintsz
\.\. \S+::z^(\s|\w)+:\s*$z(.+?)\(\s*(.*[^\s]+)\s*\)z^[=\-`:\'"~^_*+#<>]{2,}\s*$z(?<!:):(?!:)z>((?::(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:`.+?`)|(?:``.+?``))z5(?:(?::(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:)?`.+?`)z^(\*|\+|\-)(\s+\S|\s*$)zP^(?P<paren>\()?(\d+|#|[ivxlcdm]+|[IVXLCDM]+|[a-zA-Z])(?(paren)\)|\.)(\s+\S|\s*$)z_(,\sor\s|\sor\s|\sof\s|:\s|\sto\s|,\sand\s|\sand\s|,\s|[{]|[}]|"(?:\\"|[^"])*"|'(?:\\'|[^'])*')z^default[^_0-9A-Za-z].*$)NoneTrueFalseEllipsis_typetranslationsreturnc                 4    | |v r||          S | dk    rdS d| z  S )z0Convert type specification to reference in reST.r   z:obj:`None`:class:`%s` )r   r   s     =lib/python3.11/site-packages/sphinx/ext/napoleon/docstring.py_convert_type_specr    1   s6     )E""F? 	) = 5((    c                   `   e Zd ZdZ ej        dej                  Z	 	 	 dgdee	e
e	         f         dedede	d	e	d
ededdfdZde	fdZde
e	         fdZdhdede
e	         fdZde
e	         fdZde
e	         fdZdidededee	e	e
e	         f         fdZ	 	 djdededede
ee	e	e
e	         f                  fdZdee	e
e	         f         fdZdkdede
ee	e	e
e	         f                  fdZde
e	         fdZde	fd Zde
e	         fd!Zde
e	         fd"Zdkd#e
e	         d$ede
e	         fd%Zd	e	de	fd&Z d'e
e	         de
e	         fd(Z!d)e	d#e
e	         de
e	         fd*Z"dld+e	d#e
e	         d,e	de
e	         fd-Z#	 dmd0e
ee	e	e
e	         f                  d1e	d2e	de
e	         fd3Z$d4e	d5e	d6e
e	         de
e	         fd7Z%d8e	d0e
ee	e	e
e	         f                  de
e	         fd9Z&dnd;edefd<Z'd=e	defd>Z(d#e
e	         defd?Z)d#e
e	         defd@Z*dod#e
e	         dBede
e	         fdCZ+dhd=e	dedefdDZ,d#e
e	         defdEZ-defdFZ.defdGZ/dpdHZ0dpdIZ1d)e	dJe	de
e	         fdKZ2de
e	         fdLZ3dJe	de
e	         fdMZ4dJe	de
e	         fdNZ5dJe	de
e	         fdOZ6dJe	de
e	         fdPZ7dJe	de
e	         fdQZ8dJe	de
e	         fdRZ9dJe	dSede
e	         fdTZ:dJe	de
e	         fdUZ;dJe	de
e	         fdVZ<dJe	de
e	         fdWZ=dJe	de
e	         fdXZ>dJe	de
e	         fdYZ?dJe	de
e	         fdZZ@dJe	de
e	         fd[ZAdJe	de
e	         fd\ZBdJe	de
e	         fd]ZCdJe	de
e	         fd^ZDdJe	de
e	         fd_ZEdJe	de
e	         fd`ZFd=e	dee	e	e	f         fdaZGdbe	dceHde	fddZId#e
e	         de
e	         fdeZJd4e	de	fdfZKdS )qGoogleDocstringaV  Convert Google style docstrings to reStructuredText.

    Parameters
    ----------
    docstring : :obj:`str` or :obj:`list` of :obj:`str`
        The docstring to parse, given either as a string or split into
        individual lines.
    config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
        The configuration settings to use. If not given, defaults to the
        config object on `app`; or if `app` is not given defaults to the
        a new :class:`sphinx.ext.napoleon.Config` object.


    Other Parameters
    ----------------
    app : :class:`sphinx.application.Sphinx`, optional
        Application object representing the Sphinx process.
    what : :obj:`str`, optional
        A string specifying the type of the object to which the docstring
        belongs. Valid values: "module", "class", "exception", "function",
        "method", "attribute".
    name : :obj:`str`, optional
        The fully qualified name of the object.
    obj : module, class, exception, function, method, or attribute
        The object to which the docstring belongs.
    options : :class:`sphinx.ext.autodoc.Options`, optional
        The options given to the directive: an object with attributes
        inherited_members, undoc_members, show_inheritance and noindex that
        are True if the flag option of same name was given to the auto
        directive.


    Example
    -------
    >>> from sphinx.ext.napoleon import Config
    >>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)
    >>> docstring = '''One line summary.
    ...
    ... Extended description.
    ...
    ... Args:
    ...   arg1(int): Description of `arg1`
    ...   arg2(str): Description of `arg2`
    ... Returns:
    ...   str: Description of return value.
    ... '''
    >>> print(GoogleDocstring(docstring, config))
    One line summary.
    <BLANKLINE>
    Extended description.
    <BLANKLINE>
    :param arg1: Description of `arg1`
    :type arg1: int
    :param arg2: Description of `arg2`
    :type arg2: str
    <BLANKLINE>
    :returns: Description of return value.
    :rtype: str
    <BLANKLINE>

    zX^\s*((?::(?P<role>\S+):)?`(?P<name>~?[a-zA-Z0-9_.-]+)`| (?P<name2>~?[a-zA-Z0-9_.-]+))\s*N 	docstringconfigappwhatnameobjoptionsr   c                    || _         || _        | j         s(ddlm} | j        r| j        j        n	 |            | _         |sBt          j        |          rd}n+t          j        |          rd}nt          |          rd}nd}|| _	        || _
        || _        || _        t          |t                    r|                                }	n|}	t!          |	d           | _        g | _        d	| _        d| _        t+          | d
          sg | _        t+          | d          si d| j        d| j        dt1          | j        d          d| j        dt1          | j        d          dt1          | j        d          dt1          | j        d          d| j        d| j        dt1          | j        d          dt1          | j        d          d| j        d| j        d| j        dt1          | j        d          d| j        d| j        i d| j        d| j         d| j         d | j!        d!| j!        d"| j"        d#| j"        d$| j#        d%| j$        d&t1          | j        d&          d't1          | j        d'          d(t1          | j        d(          d)t1          | j        d(          d*| j%        d+| j%        d,| j&        d-| j&        | _'        | (                                 | )                                 d S ).Nr   r   classmodulefunctionobjectc                 *    |                                  S N)rstrip)ss    r   <lambda>z*GoogleDocstring.__init__.<locals>.<lambda>   s    

 r!   )modifierF_directive_sections	_sectionsargs	arguments	attention
attributescautiondangererrorexampleexampleshint	importantzkeyword argszkeyword argumentsmethodsnotenoteszother parameters
parametersreceivereceivesr   returnsraiseraises
referenceszsee alsotiptodowarningwarningswarnwarnsyieldyields)*_config_appsphinx.ext.napoleonr   r&   inspectisclassismodulecallable_what_name_obj_opt
isinstancestr
splitlinesr   
_line_iter_parsed_lines_is_in_section_section_indenthasattrr7   _parse_parameters_sectionr   _parse_admonition_parse_attributes_section_parse_examples_section _parse_keyword_arguments_section_parse_methods_section_parse_notes_section_parse_other_parameters_section_parse_receives_section_parse_returns_section_parse_raises_section_parse_references_section_parse_see_also_section_parse_warns_section_parse_yields_sectionr8   _load_custom_sections_parse)
selfr%   r&   r'   r(   r)   r*   r+   r   liness
             r   __init__zGoogleDocstring.__init__   s    	| 	G222222/3yF49++ffhhDL 	 s##  !#&&  #  !

		i%% 	((**EEE%e6J6JKKK(*# t233 	524D$t[)) $	#36#3T;#3 WT%;[II#3 d<	#3
 74#99EE#3 '$"8(CC#3 !7AA#3 47#3 D8#3  6??#3 WT%;[II#3  E#3 $T%J#3 46#3  6??#3  2!#3" #D$H##3 #3$ d<%#3& 47'#3( D8)#3* $5+#3, 46-#3. 3/#30 $41#32 d<3#34 D85#36 wt5u==7#38  6??9#3: 74#99EE;#3< GD$:IFF=#3> 1?#3@ 2A#3B 3C#3D $4E#3 #3DNJ 	""$$$r!   c                 P    d                     |                                           S )zReturn the parsed docstring in reStructuredText format.

        Returns
        -------
        unicode
            Unicode version of the docstring.

        
)joinr{   rz   s    r   __str__zGoogleDocstring.__str__   s     yy&&&r!   c                     | j         S )zReturn the parsed lines of the docstring in reStructuredText format.

        Returns
        -------
        list(str)
            The lines of the docstring in a list.

        )re   r   s    r   r{   zGoogleDocstring.lines   s     !!r!      indentc                 l   g }| j                                         }|                                 s|r|                     ||          rl|                    t          | j                              | j                                         }|                                 s|V|                     ||          l|S r2   )rd   peek_is_section_break_is_indentedappendnext)rz   r   r{   lines       r   _consume_indented_blockz'GoogleDocstring._consume_indented_block   s    ##%%((** 	*	*,,T6::	*LLdo..///?''))D ((** 	*	*,,T6::	* r!   c                 p   g }| j                                         r| j                                         r|                                 sm|                    t          | j                              | j                                         r-| j                                         r|                                 m|S r2   )rd   has_nextr   _is_section_headerr   r   rz   r{   s     r   _consume_contiguousz#GoogleDocstring._consume_contiguous   s    '')) 	0##%%	0**,,	0 LLdo../// '')) 	0##%%	0**,,	0 r!   c                 (   g }| j                                         }| j                                         r]|s[|                    t	          | j                              | j                                         }| j                                         r|[|S r2   )rd   r   r   r   r   rz   r{   r   s      r   _consume_emptyzGoogleDocstring._consume_empty   s    ##%%o&&(( 	* 	*LLdo..///?''))D o&&(( 	* 	* r!   TF
parse_typeprefer_typec                    t          | j                  }|                     |          \  }}}|d|}	}}|rXt                              |          }
|
r<|
                    d                                          }|
                    d          }|                     |          }|r|s||}}|r(| j        j	        rt          || j        j        pi           }|                     |          dz   }|	g|                     |                     |                    z   }|                     || j                                                  }|||fS )Nr$   r      )r   rd   _partition_field_on_colon_google_typed_arg_regexmatchgroupstrip_escape_args_and_kwargsrV   napoleon_preprocess_typesr    napoleon_type_aliases_get_indent_dedentr   	__class__r{   )rz   r   r   r   beforecolonafterr^   r   _descr   r   _descss                r   _consume_fieldzGoogleDocstring._consume_field   sL   DO$$#==dCCu$b%eu 	'+11&99E 'A,,..A,,U33 	(u 	( %5E 	XT\; 	X&udl.P.VTVWWE!!$''!+4<<(D(DV(L(LMMM55;;==eV##r!   multiplec                    |                                   g }|                                 s|                     ||          \  }}}|rE|rC|                    d          D ],}|                    |                                ||f           -n|s|s|r|                    |||f           |                                 |S )N,)r   r   r   splitr   r   )	rz   r   r   r   fieldsr^   r   r   r)   s	            r   _consume_fieldszGoogleDocstring._consume_fields  s    ((** 	6"&"5"5j+"N"NE5% 6E 6!KK,, @ @DMM4::<<">????@ 6% 65 6ueU4555 ((** 	6 r!   c                 .   t          | j                  }|                     |          \  }}}|r|s	||}}||z  }|g|                     |                                           z   }|                     || j                                                  }||fS r2   )r   rd   r   r   _consume_to_endr   rV   r{   )rz   r   r   r   r   r   s         r   _consume_inline_attributez)GoogleDocstring._consume_inline_attribute"  s    DO$$"<<TBBue 	E 	 %5EUNE4<<(<(<(>(>???55;;==f}r!   preprocess_typesc                    |                      |                                           }|r|                     |d                   \  }}}dd|}}}|r|r|g|dd          z   }n
|dd          }|}|r*|r(| j        j        rt          || j        j        pi           }|                     || j                                                  }|||fgS g S )Nr   r$   r   )	r   _consume_to_next_sectionr   rV   r   r    r   r   r{   )	rz   r   r{   r   r   r   r^   r   r   s	            r   _consume_returns_sectionz(GoogleDocstring._consume_returns_section,  s    T::<<== 	#'#A#A%(#K#K FE5"$b%%5E  &"GeABBi/EE!!""IE \* \L:\*5$,2T2ZXZ[[NN5$,77==??EE5*++Ir!   c                 T    |                      |                                           }|S r2   )r   r   r   s     r   _consume_usage_sectionz&GoogleDocstring._consume_usage_sectionD  s$    T::<<==r!   c                     t          | j                  }|                    d          }|                                | j        v r|}|S )N:)r   rd   r   lowerr8   )rz   sectionstripped_sections      r   _consume_section_headerz'GoogleDocstring._consume_section_headerH  sH    t''"==--!!##t~5 	'&Gr!   c                     g }| j                                         r@|                    t          | j                              | j                                         @|S r2   )rd   r   r   r   r   s     r   r   zGoogleDocstring._consume_to_endO  sV    o&&(( 	0LLdo../// o&&(( 	0r!   c                     |                                   g }|                                 s;|                    t          | j                             |                                 ;||                                  z   S r2   )r   r   r   r   rd   r   s     r   r   z(GoogleDocstring._consume_to_next_sectionU  sv    ((** 	0LLdo../// ((** 	0t**,,,,r!   r{   fullc                 f    |rd |D             S |                      |          fd|D             S )Nc                 6    g | ]}|                                 S r   )lstrip).0r   s     r   
<listcomp>z+GoogleDocstring._dedent.<locals>.<listcomp>^  s     444dDKKMM444r!   c                 $    g | ]}|d          S r2   r   )r   r   
min_indents     r   r   z+GoogleDocstring._dedent.<locals>.<listcomp>a  s"    888$D%888r!   )_get_min_indent)rz   r{   r   r   s      @r   r   zGoogleDocstring._dedent\  sL     	944e4444--e44J8888%8888r!   c                     |                     d          r#t          | j        dd          r|d d         dz   }|d d         dk    rd|dd          z   S |d d	         d
k    rd|d	d          z   S |S )Nr   strip_signature_backslashFz\_r   **z\*\*r   *z\*)endswithgetattrrV   )rz   r)   s     r   r   z'GoogleDocstring._escape_args_and_kwargsc  s    == 	%'$,8SUZ"["[ 	%9u$D8t 	T!""X%%"1"X_ 	48##Kr!   descc                 D   |                      |          rdg|z   }n|d                             d          rh|dd          }|                     |d                   }|                     |          }||k    rdg|z   }n!d|d         g|                     |d          z   }|S )Nr$   r   ::r      )_is_listr   r   _get_initial_indent_indent)rz   r   
desc_blockr   block_indents        r   _fix_field_desczGoogleDocstring._fix_field_descn  s    == 		C4$;DD!Wd## 	CabbJ%%d1g..F33J??Lf$ Ctd{DG}t||J'B'BBr!   
admonitionc                    |                      |          }t          |          dk    r"d|d|d                                         dgS |r7|                     |                     |          d          }d|z  dg|z   dgz   S d|z  dgS )Nr   z.. z:: r   r$      z.. %s::)_strip_emptylenr   r   r   )rz   r   r{   s      r   _format_admonitionz"GoogleDocstring._format_admonition{  s    !!%((u::? 	0 	0$.JJa0@0@0@A2FF 	0LLe!4!4a88E
*B/%72$>>
*B//r!   prefixpaddingc                 (   |r|dt          |          z  }g }t          |          D ]f\  }}|dk    r+|                    ||z                                              6|r|                    ||z              Q|                    d           g|S |gS )N r   r$   )r   	enumerater   r3   )rz   r   r{   r   result_linesir   s          r   _format_blockzGoogleDocstring._format_block  s     	 ,F+L$U++ , ,46 , ''$(>(>(@(@AAAA , ''$7777 ''++++8Or!   paramtyper   
field_role	type_rolec           	      t   g }|D ]\  }}}|                      |          }t          |          rH|                     |          }d|d|d}|                    |                     ||                     n|                    d|d|d           |r|                    d|d|d|           |dgz   S )Nr   r   : r$   )r   anyr   extendr   r   )	rz   r   r   r   r{   r^   r   r   fields	            r   _format_docutils_paramsz'GoogleDocstring._format_docutils_params  s     #) 
	G 
	GE5%%%e,,E5zz >,,U33&0jj%%%8T//u==>>>>***eee<=== GYYYuuEFFFt|r!   r^   r   r   c                 V   |                      |          }t          |          }|rdnd}|r'|rd|v rd|d|d|}n-d|d|d|}n!d|d|}n|rd|v r||}nd	|d	|}nd}|r:|                     |          }|d
         r||d
         z   g|dd          z   S |g|z   S |gS )Nz -- r$   `r   z** ()z** (*z*)r   r   r   )r   r   r   )rz   r^   r   r   has_desc	separatorr   s          r   _format_fieldzGoogleDocstring._format_field  s=   !!%((u::&.FFB	 	 8%< J J/4uueeeYYGEEJ 27yyIEE	8 ',eeYY7 	e| 6"'%36 %*EE995E 	((//EQx 'a()E!""I55w&7Nr!   
field_typec                    d|                                 z  }dt          |          z  }t          |          dk    }g }|D ]\  }}}|                     |||          }	|r\|r-|                    |                     |dz   |	                     N|                    |                     |dz   |	                     {|                    |                     |dz   |	                     |r|d         r|                    d           |S )Nz:%s:r   r   z * r   r$   )r   r   r   r   r   r   )
rz   r   r   r   multir{   r^   r   r   r   s
             r   _format_fieldszGoogleDocstring._format_fields  s$   j..000
J'Fa#) 	J 	JE5%&&ueU;;E J PLL!3!3GeOU!K!KLLLLLL!3!3J4F!N!NOOOOT//
S0@%HHIIII 	U2Y 	LLr!   r   
peek_aheadc                 
   | j                             |dz             |         }|| j         j        k    rO|r|                     |          S |dz  }| j                             |dz             |         }|| j         j        k    OdS )Nr   r   )rd   r   sentinelr   )rz   r   r   s      r   _get_current_indentz#GoogleDocstring._get_current_indent  s    ##JN33J?do.. 	D .''---!OJ?''
Q77
CD	 do.. 	D
 qr!   r   c                 z    t          |          D ]\  }}|                                s|c S t          |          S r2   )r   isspacer   )rz   r   r   r4   s       r   r   zGoogleDocstring._get_indent  sE    dOO 	 	DAq99;; 4yyr!   c                 B    |D ]}|r|                      |          c S dS Nr   r   r   s      r   r   z#GoogleDocstring._get_initial_indent  s=     	. 	.D .''-----.qr!   c                 `    d }|D ]&}|r"|                      |          }||}||k     r|}'|pdS r  r  )rz   r{   r   r   r   s        r   r   zGoogleDocstring._get_min_indent  s]    
 	( 	(D ())$// (!'JJj( (!'JQr!   r   nc                      fd|D             S )Nc                      g | ]
}d z  |z   S )r   r   )r   r   r  s     r   r   z+GoogleDocstring._indent.<locals>.<listcomp>  s"    333TqD 333r!   r   )rz   r{   r  s     `r   r   zGoogleDocstring._indent  s    3333U3333r!   c                 p    t          |          D ]%\  }}||k    r dS |                                s dS &dS NTF)r   r  )rz   r   r   r   r4   s        r   r   zGoogleDocstring._is_indented  sO    dOO 	 	DAqF{ ttYY[[ uuur!   c                    |sdS t                               |d                   rdS t                              |d                   rdS t          |          dk     s|d                             d          rdS |                     |d                   }|}|dd          D ]}|r|                     |          } n||k    S )NFr   Tr   r   r   )_bullet_list_regexr   _enumerated_list_regexr   r   r   )rz   r{   r   next_indentr   s        r   r   zGoogleDocstring._is_list  s     	5##E!H-- 	4!''a11 	4u::> 	U1X..t44 	5!!%(++!""I 	 	D "..t44 V##r!   c                    | j                                                                         }t                              |          }|rM|                    d          | j        v r1|                     |          }|                     d          }||k    S | j	        r<t                              |          r"| j	        D ]}|                    |          r dS dS )Nr   r   )r   TF)rd   r   r   _google_section_regexr   r   r8   r   r   r7   _directive_regex
startswith)rz   r   r   header_indentsection_indentdirective_sections         r   r   z"GoogleDocstring._is_section_header  s    /&&((..00%++G44 	$W]]3''4>9 	$ ,,W55M!555CCN!M11% 	$%%g.. $)-)A $ $%))*;<< $#tt$ur!   c                     | j                                         }| j                                          p8|                                 p$| j        o|o|                     || j                   S r2   rd   r   r   r   rf   r   rg   )rz   r   s     r   r   z!GoogleDocstring._is_section_break   sx    ##%%O,,... G''))G$ FF))$0DEEE		Hr!   c                 0   | j         j        | j         j        D ]}t          |t                    r"| j        | j        |                                <   9|d         dk    r(| j        | j        |d                                         <   m|d         dk    r(| j        | j        |d                                         <   | j        	                    |d                                         | j                  | j        |d                                         <   d S d S )Nr   params_styler   returns_style)
rV   napoleon_custom_sectionsra   rb   _parse_custom_generic_sectionr8   r   "_parse_custom_params_style_section#_parse_custom_returns_style_sectionget)rz   entrys     r   rx   z%GoogleDocstring._load_custom_sections(  s%   <0 	S> S SeS)) S 594VDN5;;==11 Qx>1 S C uQx~~'7'788q_4 S D uQx~~'7'788 !N..uQx~~/?/?/3/QS S uQx~~'7'788#	S 	SS Sr!   c                    |                                  | _        | j        rM| j        dv rDg }	 |                                 }n# t
          $ r Y nw xY w| j                            |           d S | j                                        rA| 	                                r	 | 
                                }d| _        |                                 | _        t                              |          r|g|                                 z   }n( | j        |                                         |          }d| _        d| _        nX# d| _        d| _        w xY w| j        s*|                                 |                                  z   }n|                                 }| j                            |           | j                                        ?d S d S )N)	attributedatapropertyTFr   )r   re   r^   r]   _parse_attribute_docstringStopIterationr   rd   r   r   r   rf   r   rg   r  r   r   r8   r   r   )rz   resr   r{   s       r   ry   zGoogleDocstring._parse>  s   !0022: 		$*(II 		  C5577    %%c***Fo&&(( 	-&&(( <
-"::<<G*.D'+/+C+C+E+ED('--g66 I!(	D,I,I,K,K K ?w}} ? H H*/D'+,D(( +0D'+,D(,,,,) < 44669L9L9N9NNEE 99;;E%%e,,,% o&&(( 	- 	- 	- 	- 	-s   A 
AABD; ;Er   c                 V    |                                  }|                     ||          S r2   )r   r   )rz   r   r   r{   s       r   rj   z!GoogleDocstring._parse_admonition`  s)    --//&&z5999r!   c                     |                                  \  }}|                     dd|          }|r|                    dd|z  g           |S )Nr$   	:type: %s)r   r   r   )rz   r   r   r{   s       r   r&  z*GoogleDocstring._parse_attribute_docstringe  sW    5577u""2r511 	4LL"kE12333r!   c                 :   g }|                                  D ]a\  }}}|s|                     |          }| j        j        rLd|z  }|                    |                     ||                     |r|                    d|d|           v|                    d|z              | j        rd| j        v r|                    d           |                    d           |                     dd|          }|                    | 	                    |d                     |rB|                    d           |                    | 	                    d	|z  gd                     |                    d           c| j        j        r|                    d           |S )
Nz
:ivar %s: z	:vartype r   z.. attribute:: noindex   :noindex:r$   r   r+  )
r   _lookup_annotationrV   napoleon_use_ivarr   r   r   r`   r   r   )rz   r   r{   r^   r   r   r   r   s           r   rk   z)GoogleDocstring._parse_attributes_sectionl  s   #'#7#7#9#9 	! 	!E5% 7//66|- !$u,T//u==>>> ELLLeeeUU!CDDD.67779 1di!7 1LL000R   ++BE::T\\&!44555 ILL$$$LL{U/B.CQ!G!GHHHR    <) 	LLr!   c                     t          d          t          d          d}| j        j        }|                    |                                |          }|                     ||          S )NExampleExamples)r@   rA   )r   rV   $napoleon_use_admonition_for_examplesr   r   _parse_generic_section)rz   r   labelsuse_admonitionlabels        r   rl   z'GoogleDocstring._parse_examples_section  s]    ||*
 
 J

7==??G44**5.AAAr!   c                 .    |                      |d          S )NF)r5  rz   r   s     r   r  z-GoogleDocstring._parse_custom_generic_section  s    **7E:::r!   c                 R    |                      ||                                           S r2   )r   r   r:  s     r   r  z2GoogleDocstring._parse_custom_params_style_section  s$    ""7D,@,@,B,BCCCr!   c                 Z    |                      d          }|                     ||          S )NTr   )r   r   rz   r   r   s      r   r  z3GoogleDocstring._parse_custom_returns_style_section  s.    ...EE""7F333r!   c                 ~    ddg}ddg}|                                  }|                     |d          }||z   |z   dgz   S )Nz.. rubric:: Usage:r$   z.. code-block:: pythonr   )r   r   )rz   r   headerblockr{   s        r   _parse_usage_sectionz$GoogleDocstring._parse_usage_section  sP    &+)2.++--UA&&~%,,r!   r7  c                     |                      |                                           }|                     |          }|rd|z  }|                     |d          }nd|z  }|r|dg|z   dgz   S |dgS )Nz.. admonition:: %sr   z.. rubric:: %sr$   )r   r   r   r   )rz   r   r7  r{   r@  s        r   r5  z&GoogleDocstring._parse_generic_section  s    !!$"?"?"A"ABBU## 	0)G3FLL**EE%/F 	 B<%'2$..B<r!   c                     |                                  }| j        j        r|                     |dd          S |                     t          d          |          S )Nkeywordkwtype)r   r   zKeyword Arguments)r   rV   napoleon_use_keywordr   r   r   r>  s      r   rm   z0GoogleDocstring._parse_keyword_arguments_section  sh    %%''<, 	G//$" 0 $ $ $
 &&q)<'='=vFFFr!   c                 F   g }|                      d          D ]\  }}}|                    d|z             | j        rd| j        v r|                    d           |r-|                    dg|                     |d          z              |                    d           |S )NF)r   z.. method:: %sr-  r.  r$   r   )r   r   r`   r   r   )rz   r   r{   r^   r   r   s         r   rn   z&GoogleDocstring._parse_methods_section  s    #'#7#75#7#I#I 	 	E5%LL)E1222y -Y$)3 -^,,, <bTDLL$:$::;;;LLr!   c                 `    | j         j        }|                     t          d          |          S )NNotes)rV   !napoleon_use_admonition_for_notesr5  r   rz   r   r7  s      r   ro   z$GoogleDocstring._parse_notes_section  s(    G**1W::~FFFr!   c                     | j         j        r+|                     d          }|                     |          S |                                 }|                     t          d          |          S )NTr   zOther ParametersrV   napoleon_use_paramr   r   r   r   r>  s      r   rp   z/GoogleDocstring._parse_other_parameters_section  sj    <* 	F))4)88F//777))++F&&q);'<'<fEEEr!   c                     | j         j        r+|                     d          }|                     |          S |                                 }|                     t          d          |          S )NTrN  
ParametersrO  r>  s      r   ri   z)GoogleDocstring._parse_parameters_section  sg    <* 	@))4)88F//777))++F&&q???r!   c                 B   |                      dd          }g }|D ]\  }}}| j                            |          }|r+|                    d          r|                    d          }n<t                              |          r"|                    d          }||dz   d         }|rd|z   nd	}|                     |          }t          |          rdd
                    |          z   nd	}	|	                    d|d|	           |r|	                    d	           |S )NFT)r   r   r)   r   r   r   r   r$   z
    z:raisesr   )
r   	_name_rgxr   r   _xref_regexfindr   r   r   r   )
rz   r   r   r{   r^   r   r   mposr   s
             r   rs   z%GoogleDocstring._parse_raises_section  s7   %%D%II#) 
	; 
	;E5%$$U++A *QWWV__ *""5)) *jjoocAgbj)#(0C%KKbE%%e,,E36u::ES8==////2FLLL555&&9:::: 	LLr!   c                     | j         j        r+|                     d          }|                     |          S |                                 }|                     t          d          |          S )NTrN  ReceivesrO  r>  s      r   rq   z'GoogleDocstring._parse_receives_section  sf    <* 	>))4)88F//777))++F&&q}}f===r!   c                 `    | j         j        }|                     t          d          |          S )N
References)rV   &napoleon_use_admonition_for_referencesr5  r   rL  s      r   rt   z)GoogleDocstring._parse_references_section  s(    L**1\??NKKKr!   c                    |                                  }t          |          dk    }|rdn| j        j        }g }|D ]\  }}}|r|                     |d|          }	n|                     |||          }	|rV|r*|                    |                     d|	                     e|                    |                     d|	                     t          |	          r)|                    |                     d|	                     |r|r|                    d|z  dg           |r|d         r|                    d           |S )	Nr   Fr$   z          * z:returns: * z
:returns: z
:rtype: %sr   )	r   r   rV   napoleon_use_rtyper   r   r   r   r   )
rz   r   r   r   	use_rtyper{   r^   r   r   r   s
             r   rr   z&GoogleDocstring._parse_returns_section  sk   ..00Fa"GEE(G	#) 	= 	=E5% @**5"e<<**5%?? 	= LLL!3!3NE!J!JKKKKLL!3!3NE!J!JKKKKu:: JLL!3!3L%!H!HIII =Y =LL,"6!;<<< 	U2Y 	LLr!   c                 .    |                      d|          S Nseealso)rj   r:  s     r   ru   z'GoogleDocstring._parse_see_also_section  s    %%i999r!   c                 l    |                      t          d          |                                           S )NWarns)r   r   r   r:  s     r   rv   z$GoogleDocstring._parse_warns_section  s*    ""1W::t/C/C/E/EFFFr!   c                 t    |                      d          }|                     t          d          |          S )NTr=  Yields)r   r   r   r>  s      r   rw   z%GoogleDocstring._parse_yields_section  s4    ...EE""1X;;777r!   c                    g }g }d}d}t          t                              |                    D ]\  }}|r|                    |           t                              |          }|dz  dk    r|rd}||                                |                                         }|                    |d |                                                    |                    ||                                d                     |                    |           d                    |          	                                |d                    |          	                                fS )Nr$   Fr   r   T)
r   _xref_or_code_regexr   r   _single_colon_regexsearchstartendr   r   )	rz   r   before_colonafter_colonr   found_colonr   sourcerW  s	            r   r   z)GoogleDocstring._partition_field_on_colon  sT   "#6#<#<T#B#BCC 	0 	0IAv 
0""6****'..v66Ea< 0A 0"&K"17799aeegg#56E ''z		z(:;;;&&vaeegghh'78888 ''////%%++--$$**,,. 	.r!   	attr_nameklassc                     t          j        d| j        j        z  t                     |rKd|vrG|                    d          r
|dd          }	 |j        }n# t          $ r
 |j        }Y nw xY wd|d|S |S )Nz!%s._qualify_name() is deprecated..~r   )rQ   rR   r   __name__r   r  __qualname__AttributeError)rz   rr  rs  qs       r   _qualify_namezGoogleDocstring._qualify_name2  s    9n-./G	I 	I 	I 	-S	) 	-##C(( *%abbM	#&! # # #N# qq)),,s   A A*)A*c                    |rd}t          |          D ]\  }}|r|} n|dk    rg }d}t          t          t          |                              D ]}||         }|r|} n|dk    s|dz   t          |          k     r|||dz            }|S )Nr   r   r   )r   reversedranger   )rz   r{   rl  r   r   rm  s         r   r   zGoogleDocstring._strip_empty?  s     	-E$U++  4 EE { CeCJJ//00  Qx CE qy -C!Gc%jj0 -eC!Gm,r!   c                 \   | j         j        r| j        dv r| j        rt	          | d          s\t          | j         di           }|                    t          | j         di           pi            t          | j        d |          | _        || j        v rt          | j        |                   S dS )N)r.   r-   	exception_annotationsautodoc_type_aliasesr   r$   )
rV   napoleon_attr_annotationsr]   r_   rh   r   updater   r  r   )rz   r^   localnss      r   r/  z"GoogleDocstring._lookup_annotationR  s    <1 
	Jz== 	J$) 	Jt^44 Q%dl4JBOOGNN7#'<1H"$% $% $+(*, , , )7ty$(P(PD%D-- J/0A%0HIIIrr!   NNr$   r$   NN)r   TF)TFFFr2   )r   r   )r   )r   )r   N)Lrw  
__module__rx  __doc__recompileXrT  r
   rb   r   SphinxConfigr   r   r|   r   r{   intr   r   r   boolr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rx   ry   rj   r&  rk   rl   r  r  r  rB  r5  rm   rn   ro   rp   ri   rs   rq   rt   rr   ru   rv   rw   r   r	   r{  r   r/  r   r!   r   r#   r#   >   s
       < <| 
 @ACG GI QUAC15J J%T#Y"7 J JJ+.J;>JJ+.J:>J J J JX	' 	' 	' 	' 	'	"tCy 	" 	" 	" 	" c $s)    T#Y    S	    $ $ $4 $!#sDI"56$ $ $ $4 LQ). $ D "&37c3S	>Q8R3S   5d3i+@      &*5c491D+E&F   0S	        c    -$s) - - - -9 9T#Y 9d 9tCy 9 9 9 9	C 	C 	 	 	 	DI $s)    0S 0c 0tCy 0 0 0 0 C S	 C SWX[S\    " MS d5c499L3M.N ,/FI%)#Y   "3 s 49 c    : d5c4PS9AT;U6V  I   & c #         c s    	T#Y 	3 	 	 	 	4 4T#Y 43 4tCy 4 4 4 4  c $    $d3i $D $ $ $ $"D    H4 H H H HS S S S, -  -  -  -D:C :# :$s) : : : :
DI     c    4Bs BtCy B B B B;S ;T#Y ; ; ; ;D# D$s) D D D D43 449 4 4 4 4-C -DI - - - - c  4  DQTI        G GS	 G G G G	c 	d3i 	 	 	 	GC GDI G G G GFs FtCy F F F F@ @c @ @ @ @S T#Y    $>s >tCy > > > >L Lc L L L Lc d3i    4:s :tCy : : : :GC GDI G G G G8S 8T#Y 8 8 8 8.c .eCcM6J . . . .,s 4 C    $s) S	    &       r!   r#   tokensc                 v    t          j        |           }dfdfd}t           ||                    S )Noptionaldefaultc              3   X  K   d}d }	 	 |                                  }n# t          $ r Y d S w xY w|dk    r|}1|                                sF|v r.|                     |           ||                     |           d S ||V  d }|dk    r|dz  }n|dk    r|dz  }|V  |dk    rd S )Nr   T, {r   })popleft
IndexErrorr   
appendleft)r  open_bracesprevious_tokentokenkeywordss       r   takewhile_setz,_recombine_set_tokens.<locals>.takewhile_setf  s      	((    } !&;;==   !!%(((! 6%%n555 &$$$$!%| !q # !q KKKa ?	s    
--c              3      K   	 	 |                                  }n# t          $ r Y d S w xY w|dk    r6|                     d           d                     |                     V  n|V  h)NTr  r$   )r  r  r  r   )r  r  r  s     r   combine_setz*_recombine_set_tokens.<locals>.combine_set  s      
	((    | !!#&&&ggmmF33444444
	s    
)))collectionsdequelist)r  token_queuer  r  r  s      @@r   _recombine_set_tokensr  b  sf    #F++K&H" " " " "H     K(()))r!   specc                 t    d t          fdt                              |           D                       }|S )Nc                 n    t                               |           r| d d         }| dd          }|d|gS | gS )N      r   )_default_regexr   )itemr  others      r   postprocessz(_tokenize_type_spec.<locals>.postprocess  sH    %% 	2A2hG HES%((6Mr!   c              3   <   K   | ]} |          D ]}||V  	d S r2   r   )r   	raw_tokenr  r  s      r   	<genexpr>z&_tokenize_type_spec.<locals>.<genexpr>  s^        K	**  	      r!   )r  _token_regexr   )r  r  r  s     @r   _tokenize_type_specr    s^    	 	 	     %++D11    F Mr!   r  locationc                 4   d }|                      d          s|                     d          rd}n ||           s~|                      d          r|                     d          sT|                      d          r|                     d          s*|                      d          r|                     d          rd}nY|                      d          r.t                              t	          d	          | |
           d}n|                     d          r-t                              t	          d          | |
           d}n|                      d          s|                      d          r-t                              t	          d          | |
           d}n}|                     d          s|                     d          r-t                              t	          d          | |
           d}n&| dv rd}nt
                              |           rd}nd}|S )Nc                 H    	 t          |            dS # t          $ r Y dS w xY wr  )complex
ValueError)r  s    r   
is_numericz_token_type.<locals>.is_numeric  s=    	ENNN 4  	 	 	55	s    
!!r   	delimiterr  r  "'literalz-invalid value set (missing closing brace): %s)r  z-invalid value set (missing opening brace): %sz4malformed string literal (missing closing quote): %sz4malformed string literal (missing opening quote): %sr  control	referencer*   )r  r   loggerrP   r   rU  r   )r  r  r  type_s       r   _token_typer    sv       ,s 3 3 ,Ju*c""*',~~c':':* c""* (-~~c':':* c""	* (-~~c':':	* 			#		 #>?? 	 	
 	
 	

 			 >?? 	 	
 	
 	

 			#		 %"2"23"7"7 EFF 	 	
 	
 	

 			 s 3 3 EFF 	 	
 	
 	

 	)	)  			5	!	! Lr!   c                     d t          |           }t          |          }fd|D             }d fdd d d dd	                    fd
|D                       }|S )Nc                     |                     | |           }|t          v r	|dk    rd}n|dk    r|dk    rd}t                              |          ||z  }|S )Nr   	:obj:`%s`z...z:obj:`%s <Ellipsis>`)r   _SINGLETONSrU  r   )r*   r   default_translationtranslations       r   convert_objz-_convert_numpy_type_spec.<locals>.convert_obj  s    "&&sC00 +% 	9*=*N 	9"-E! 	9&9]&J 	9"8[)) 	<-;Kr!   c                 4    g | ]}|t          |          fS r   )r  )r   r  r  s     r   r   z,_convert_numpy_type_spec.<locals>.<listcomp>  s8        
E8,,-  r!   c                     d| z  S )Nz``%s``r   xs    r   r5   z*_convert_numpy_type_spec.<locals>.<lambda>  s
    X\ r!   c                      | d          S )Nr   r   )r  r  r   s    r   r5   z*_convert_numpy_type_spec.<locals>.<lambda>  s    QmDD r!   c                     d| z  S )Nz*%s*r   r  s    r   r5   z*_convert_numpy_type_spec.<locals>.<lambda>  s
    VaZ r!   c                     | S r2   r   r  s    r   r5   z*_convert_numpy_type_spec.<locals>.<lambda>      q r!   c                     | S r2   r   r  s    r   r5   z*_convert_numpy_type_spec.<locals>.<lambda>  r  r!   )r  r*   r  r  r  r$   c              3   Z   K   | ]%\  }}                      |          |          V  &d S r2   )r   )r   r  r  
converterss      r   r  z+_convert_numpy_type_spec.<locals>.<genexpr>	  s>      OO-
u--e44OOOOOOr!   )r  r  r   )	r   r  r   r  combined_tokenstypes	convertedr  r  s	    ``    @@r   _convert_numpy_type_specr    s       !''F+F33O   $  E *)DDDDD'' [ [ J OOOOOOOOOIr!   c                   `    e Zd ZdZ	 	 	 ddeeee         f         dedededed	e	d
e	ddf fdZ
defdZdedef fdZddededeeeee         f         fdZddedeeeeee         f                  fdZdefdZdefdZdefdZdedee         fdZdee         dee         fdZ xZS ) NumpyDocstringa
  Convert NumPy style docstrings to reStructuredText.

    Parameters
    ----------
    docstring : :obj:`str` or :obj:`list` of :obj:`str`
        The docstring to parse, given either as a string or split into
        individual lines.
    config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
        The configuration settings to use. If not given, defaults to the
        config object on `app`; or if `app` is not given defaults to the
        a new :class:`sphinx.ext.napoleon.Config` object.


    Other Parameters
    ----------------
    app : :class:`sphinx.application.Sphinx`, optional
        Application object representing the Sphinx process.
    what : :obj:`str`, optional
        A string specifying the type of the object to which the docstring
        belongs. Valid values: "module", "class", "exception", "function",
        "method", "attribute".
    name : :obj:`str`, optional
        The fully qualified name of the object.
    obj : module, class, exception, function, method, or attribute
        The object to which the docstring belongs.
    options : :class:`sphinx.ext.autodoc.Options`, optional
        The options given to the directive: an object with attributes
        inherited_members, undoc_members, show_inheritance and noindex that
        are True if the flag option of same name was given to the auto
        directive.


    Example
    -------
    >>> from sphinx.ext.napoleon import Config
    >>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)
    >>> docstring = '''One line summary.
    ...
    ... Extended description.
    ...
    ... Parameters
    ... ----------
    ... arg1 : int
    ...     Description of `arg1`
    ... arg2 : str
    ...     Description of `arg2`
    ... Returns
    ... -------
    ... str
    ...     Description of return value.
    ... '''
    >>> print(NumpyDocstring(docstring, config))
    One line summary.
    <BLANKLINE>
    Extended description.
    <BLANKLINE>
    :param arg1: Description of `arg1`
    :type arg1: int
    :param arg2: Description of `arg2`
    :type arg2: str
    <BLANKLINE>
    :returns: Description of return value.
    :rtype: str
    <BLANKLINE>

    Methods
    -------
    __str__()
        Return the parsed docstring in reStructuredText format.

        Returns
        -------
        str
            UTF-8 encoded version of the docstring.

    __unicode__()
        Return the parsed docstring in reStructuredText format.

        Returns
        -------
        unicode
            Unicode version of the docstring.

    lines()
        Return the parsed lines of the docstring in reStructuredText format.

        Returns
        -------
        list(str)
            The lines of the docstring in a list.

    Nr$   r%   r&   r'   r(   r)   r*   r+   r   c           	      f    dg| _         t                                          |||||||           d S )Nz
.. index::)r7   superr|   )	rz   r%   r&   r'   r(   r)   r*   r+   r   s	           r   r|   zNumpyDocstring.__init__k  s9     %1> FCtS'JJJJJr!   c                     	 | j         t          j        | j                   nd }n# t          $ r d }Y nw xY w| j        }||d S |d}d                    |d|z  g          S )Nr$   r   zdocstring of %s)r_   rY   getfile	TypeErrorr^   r   )rz   filepathr)   s      r   _get_locationzNumpyDocstring._get_locationq  s    	59YTwty111PTHH 	 	 	HHH	z 	 	4 	Hxx#4t#;<===s   "% 44c                     t                      j        d|v r4d                    fd|                    d          D                       S  |          S )Nr  c              3   .   K   | ]} |          V  d S r2   r   )r   r   funcs     r   r  z9NumpyDocstring._escape_args_and_kwargs.<locals>.<genexpr>  s+      GGUTT%[[GGGGGGr!   )r  r   r   r   )rz   r)   r  r   s     @r   r   z&NumpyDocstring._escape_args_and_kwargs  s]    ww.4< 	99GGGGdjj6F6FGGGGGG4::r!   TFr   r   c                    t          | j                  }|r|                     |          \  }}}n|d}}|                                |                                }}|                     |          }|r|s|                     |          }|r|s||}}| j        j        r0t          || 	                                | j        j
        pi           }|                     |          dz   }|                     |                     |                    }|                     || j                                                  }|||fS )Nr$   )r  r   r   )r   rd   r   r   r   r/  rV   r   r  r  r   r   r   r   r   r{   )	rz   r   r   r   r^   r   r   r   r   s	            r   r   zNumpyDocstring._consume_field  sJ   DO$$ 	$"<<TBBOE1ee5E{{}}ekkmmu,,U33 	3e 	3++E22E 	(u 	( %5E<1 	,++--!\?E2  E !!$''!+T99&AABBudl3399;;eU""r!   r   c                 .    |                      d          S )NT)r   )r   )rz   r   s     r   r   z'NumpyDocstring._consume_returns_section  s    ###555r!   c                     t          | j                  }t                              |          st          | j                   |S r2   )r   rd   r  r   r:  s     r   r   z&NumpyDocstring._consume_section_header  s<    t''%%g.. 	"!!!r!   c                     | j                             d          \  }}| j                                          pB|                                 p.ddg||gk    p$| j        o|o|                     || j                   S )Nr   r$   r  )rz   line1line2s      r   r   z NumpyDocstring._is_section_break  s    ++A..uO,,... H''))HRUEN*H $ GG))%1EFFF	Ir!   c                 x   | j                             d          \  }}|                                }|| j        v r<t	          |t
                    r't          t                              |                    S | j	        r<t                              |          r"| j	        D ]}|                    |          r dS dS )Nr   TF)rd   r   r   r8   ra   rb   r  _numpy_section_regexr   r7   r  r  )rz   r   	underliner  s       r   r   z!NumpyDocstring._is_section_header  s    !_11!44--//dn$ 	$Is)C)C 	$,229==>>>% 	$%%g.. $)-)A $ $%))*;<< $#tt$ur!   r   c                     |                                  }	 |                     |          S # t          $ r |                     d|          cY S w xY wrb  )r    _parse_numpydoc_see_also_sectionr  r   )rz   r   r{   s      r   ru   z&NumpyDocstring._parse_see_also_section  sc    --//	=88??? 	= 	= 	=**9e<<<<<	=s   +  AAcontentc                 @    g dt           dt          t           t           f         f fddt           dt          t                    ddffd} fdd}g }|D ]}|                                s j                            |          }|r||                                d                                                             d	          r~ |||           |d|                                         ||                                d         }}|                    d	d
          d
                                         g}|d         sg }|                    d          sd |||           d}d|v r:|                    d          D ]"}|                                r ||g            #T|                                r|}l|'|	                    |                                            |||           sg S fdD             g }d}	D ]n\  }
}}|r
d	|d|
d}nd|
z  }|s|	r|dgz  }||gz  }n|dxx         d|z  z  cc<   |r/| 
                    d                    |          g          z  }d}	ld}	o|dgz  }                     d|          S )a  
        Derived from the NumpyDoc implementation of _parse_see_also.

        See Also
        --------
        func_name : Descriptive text
            continued text
        another_func_name : Descriptive text
        func_name1, func_name2, :meth:`func_name`, func_name3

        textr   c                     j                             |           }|r6|                                }|d         
|d         dfS |d         |d         fS t          d| z            )zMatch ':role:`name`' or 'name'r   Nr   r   z%s is not a item name)rT  r   groupsr  )r  rW  grz   s      r   parse_item_namezHNumpyDocstring._parse_numpydoc_see_also_section.<locals>.parse_item_name  sm    $$T**A &HHJJQ4 &Q4:%Q41:%4t;<<<r!   r)   restNc                     | sd S  |           \  } }                     | t          |          |f           |d d = d S r2   )r   r  )r)   r  roleitemsr  s      r   	push_itemzBNumpyDocstring._parse_numpydoc_see_also_section.<locals>.push_item  sQ     (..JD$LL$T

D1222QQQr!   c                     j         j        }||s| ||fS |                    | |           }j                            |          }|s|||fS |                                }|d         }|d         p|d         }|||fS )Nr  r)   name2)rV   r   r   rT  r   	groupdict)	r  descriptionr  r   
translatedr   r  new_funcrz   s	           r   	translatezBNumpyDocstring._parse_numpydoc_see_also_section.<locals>.translate  s    <=L /| /[$..%))$55JN((44E 5!;44__&&F&>Df~8H[$..r!   r   r   r   r   r   c                 2    g | ]\  }}} |||          S r   r   )r   r  r  r  r  s       r   r   zCNumpyDocstring._parse_numpydoc_see_also_section.<locals>.<listcomp>  s=     
 
 
'k4 IdK..
 
 
r!   Tz:`r   r  r$   r   z, %sFrc  )rb   r   r   r   rT  r   rm  r  r   r   r   r   r   )rz   r  r  current_funcr  r   rW  r  r{   last_had_descr)   r   r  linkr  r  r  s   `             @@@r   r  z/NumpyDocstring._parse_numpydoc_see_also_section  sh    		=# 		=%S/ 		= 		= 		= 		= 		= 		=	C 	tCy 	T 	 	 	 	 	 	 		/ 	/ 	/ 	/ 	/   	* 	*D::<< $$T**A *T!%%''((^))++66s;; *	,---%)(15577(^T!%%''((^d

3**1-33556Aw D__S)) 
*	,---#$; ( $

3 0 0::<< 0%IdB///0 ZZ\\ (#'L *DJJLL)))	,%%% 	I
 
 
 
+0
 
 

  % 	& 	&D$ * *%)TT4440"T) +} +"$b			Vd]*			 &sxx~~&6777 $ %"&&y%888r!   r  r  r  )rw  r  rx  r  r
   rb   r   r  r   r   r|   r  r   r  r   r   r   r   r   r   ru   r  __classcell__)r   s   @r   r  r    s)       [ [x QUAC15K K%T#Y"7 K KK+.K;>KK+.K:>K K K K K K>s > > > >C C      # # #4 #!#sDI"56# # # #86 6 6&*5c491D+E&F6 6 6 6    I4 I I I I
D 
 
 
 
=s =tCy = = = =g9S	 g9d3i g9 g9 g9 g9 g9 g9 g9 g9r!   r  r2   ):r  r  rY   r  rQ   	functoolsr   typingr   r   r   r   r   r	   r
   sphinx.applicationr   sphinx.configr   r  sphinx.deprecationr   sphinx.ext.napoleon.iteratorsr   sphinx.localer   r   sphinx.utilr   sphinx.util.inspectr   sphinx.util.typingr   	getLoggerrw  r  r  r  r  r   r  rj  ri  rU  r  r  r  r  r  rb   r    r#   r  r  r  dictr  r  r   r!   r   <module>r     s   3 3      				        @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ % % % % % % 0 0 0 0 0 0 7 7 7 7 7 7 5 5 5 5 5 5               4 4 4 4 4 4 - - - - - -		8	$	$2:m,, "
#455 $"*%ABB !rz"@AA  bj11  bj   bj<   RZ :;; ##$ $  rz    4 CE 
 
c 
c3h 
 
 
 
 
a a a a a a a aH5*$s) 5*S	 5* 5* 5* 5*pc d3i    *8 8s 8c 8S 8 8 8 8v :>TV ! !C !3 !T ![^ ! ! ! !Hc9 c9 c9 c9 c9_ c9 c9 c9 c9 c9r!   