o
    N i€Æ  ã                   @  s   d Z ddlm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
 ddlmZmZ ddlmZmZ ddlmZ dd	lmZmZ erXdd
lmZmZ ddlmZ ddlmZ e e¡Z e !d¡Z"e !d¡Z#e !d¡Z$e !d¡Z%e !d¡Z&e !d¡Z'e !d¡Z(e !d¡Z)e !d¡Z*e !d¡Z+e !d¡Z,dZ-G dd„ dej.e ƒZ/d4d5d d!„Z0G d"d#„ d#ƒZ1d6d&d'„Z2d7d)d*„Z3d4d8d.d/„Z4		d9d:d0d1„Z5G d2d3„ d3e1ƒZ6dS );z-Classes for docstring parsing and formatting.é    )ÚannotationsN)Úpartial)Ústarmap)ÚTYPE_CHECKINGÚAny)Ú_Ú__)Úlogging)Úget_type_hintsÚstringify_annotation)ÚCallableÚIterator)ÚSphinx©ÚConfigz
\.\. \S+::z^(\s|\w)+:\s*$z(.+?)\(\s*(.*[^\s]+)\s*\)z^[=\-`:\'"~^_*+#<>]{2,}\s*$z(?<!:):(?!:)zi((?::(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:`.+?`)|(?:``.+?``)|(?::meta .+:.*)|(?:`.+?\s*(?<!\x00)<.*?>`))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ÚEllipsisc                      s2   e Zd ZdZeƒ Zd
dd„Zd‡ fdd	„Z‡  ZS )ÚDequez‡
    A subclass of deque that mimics ``pockets.iterators.modify_iter``.

    The `.Deque.get` and `.Deque.next` methods are added.
    ÚnÚintÚreturnr   c                 C  s   |t | ƒk r
| | S | jS )zx
        Return the nth element of the stack, or ``self.sentinel`` if n is
        greater than the stack size.
        )ÚlenÚsentinel)Úselfr   © r   úQ/home/ubuntu/.local/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.pyÚgetB   s   z	Deque.getc                   s   | rt ƒ  ¡ S t‚©N)ÚsuperÚpopleftÚStopIteration©r   ©Ú	__class__r   r   ÚnextI   s   
z
Deque.next)r   r   r   r   )r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úobjectr   r   r&   Ú__classcell__r   r   r$   r   r   9   s
    
r   Ú_typeÚstrÚtranslationsúdict[str, str] | Noner   c                 C  s0   |dur| |v r||  S | dkrdS d| › dS )z0Convert type specification to reference in reST.Nr   z:py:obj:`None`z:py:class:`ú`r   )r-   r/   r   r   r   Ú_convert_type_specP   s
   r2   c                   @  sˆ  e Zd ZdZe dej¡Z						d«d¬dd„Zd­dd„Z	d®dd„Z
d¯d°dd„Zd®dd „Zd®d!d"„Z	#	$d±d²d)d*„Z	$d³d´d-d.„Zdµd0d1„Z	$d¶d·d3d4„Zd®d5d6„Zd­d7d8„Zd®d9d:„Zd®d;d<„Zd¶d¸d?d@„Zd¹dAdB„ZdºdDdE„Zd»dGdH„Z	d¼d½dLdM„Z	N	Od¾d¿dSdT„ZdÀdXdY„ZdÁd[d\„ZdÂdÃd_d`„ZdÄdbdc„ZdÅddde„Z dÅdfdg„Z!dÆdÇdjdk„Z"d¯dÈdldm„Z#dÉdndo„Z$dÊdpdq„Z%dÊdrds„Z&dËdtdu„Z'dËdvdw„Z(dÌdydz„Z)d®d{d|„Z*dÍd}d~„Z+dÍdd€„Z,dÍdd‚„Z-dÍdƒd„„Z.dÍd…d†„Z/dÍd‡dˆ„Z0dÎdŠd‹„Z1dÍdŒd„Z2dÍdŽd„Z3dÍdd‘„Z4dÍd’d“„Z5dÍd”d•„Z6dÍd–d—„Z7dÍd˜d™„Z8dÍdšd›„Z9dÍdœd„Z:dÍdždŸ„Z;dÍd d¡„Z<dÍd¢d£„Z=dÏd¥d¦„Z>dÐd§d¨„Z?dÑd©dª„Z@dS )ÒÚGoogleDocstringaW  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 no_index 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ústr | list[str]ÚconfigúSphinxConfig | NoneÚappúSphinx | NoneÚwhatr.   ÚnameÚobjr   Úoptionsr   r   c           
      C  sJ  || _ |r	|| _n|r|j| _n
ddlm} |ƒ | _|s5t |¡r$d}nt |¡r,d}n	t|ƒr3d}nd}|| _	|| _
|| _|| _t|tƒrK| ¡ }	n|}	tttj|	ƒƒ| _g | _d| _d| _t| dƒsgg | _t| d	ƒsi d
| j“d| j“dt| jdƒ“d| j“dt| jdƒ“dt| jdƒ“dt| jdƒ“d| j“d| j“dt| jdƒ“dt| jdƒ“d| j“d| j“d| j“dt| 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$t| jd$ƒ“d%t| jd%ƒ“d&t| jd&ƒ“d't| jd&ƒ“d(| j'“d)| j'“d*| j(“d+| j(“¥| _)|  *¡  |  +¡  d S ),Nr   r   ÚclassÚmoduleÚfunctionr+   FÚ_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),Ú_appÚ_configr7   Úsphinx.ext.napoleonr   ÚinspectÚisclassÚismoduleÚcallableÚ_whatÚ_nameÚ_objÚ_optÚ
isinstancer.   Ú
splitlinesr   ÚmapÚrstripÚ_linesÚ_parsed_linesÚ_is_in_sectionÚ_section_indentÚhasattrrB   Ú_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_sectionrC   Ú_load_custom_sectionsÚ_parse)
r   r5   r7   r9   r;   r<   r=   r>   r   Úlinesr   r   r   Ú__init__ž   sÈ   






ÿþýüûúùø	÷
öõôóòñðïîíìëêéèçæåäãâá à!ß"Þ%zGoogleDocstring.__init__c                 C  s   d  |  ¡ ¡S )z Return the parsed docstring in reStructuredText format.

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

        Ú
)Újoinr†   r#   r   r   r   Ú__str__ô   s   	zGoogleDocstring.__str__ú	list[str]c                 C  s   | j S )z³Return the parsed lines of the docstring in reStructuredText format.

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

        )rq   r#   r   r   r   r†   ÿ   s   	zGoogleDocstring.linesé   Úindentr   c                 C  s`   g }| j  d¡}|  ¡ s.|r|  ||¡r.| | j  ¡ ¡ | j  d¡}|  ¡ s.|r|  ||¡s|S ©Nr   )rp   r   Ú_is_section_breakÚ_is_indentedÚappendr&   )r   r   r†   Úliner   r   r   Ú_consume_indented_block
  s   ÿ
ÿüÿ
ÿz'GoogleDocstring._consume_indented_blockc                 C  sL   g }| j r$| j  d¡r$|  ¡ s$| | j  ¡ ¡ | j r$| j  d¡r$|  ¡ r|S rŽ   )rp   r   Ú_is_section_headerr‘   r&   ©r   r†   r   r   r   Ú_consume_contiguous  s
   ÿz#GoogleDocstring._consume_contiguousc                 C  sD   g }| j  d¡}| j r |s | | j  ¡ ¡ | j  d¡}| j r |r|S rŽ   )rp   r   r‘   r&   ©r   r†   r’   r   r   r   Ú_consume_empty  s   

þzGoogleDocstring._consume_emptyTFÚ
parse_typeÚboolÚprefer_typeútuple[str, str, list[str]]c                 C  sÎ   | j  ¡ }|  |¡\}}}|d|}}}	|r*t |¡}
|
r*|
 d¡ ¡ }|
 d¡}|  |¡}|r8|s8||}}|rG| jj	rGt
|| jjpEi ƒ}|  |¡d }|	g|  |  |¡¡¢}|  || j¡ ¡ }|||fS )Nr4   rŒ   é   )rp   r&   Ú_partition_field_on_colonÚ_google_typed_arg_regexÚmatchÚgroupÚstripÚ_escape_args_and_kwargsrb   Únapoleon_preprocess_typesr2   Únapoleon_type_aliasesÚ_get_indentÚ_dedentr“   r%   r†   )r   r™   r›   r’   ÚbeforeÚcolonÚafterri   r-   Ú_descr    r   Ú_descsr   r   r   Ú_consume_field"  s"   





zGoogleDocstring._consume_fieldÚmultipleú list[tuple[str, str, list[str]]]c                   sx   |   ¡  g }|  ¡ s:|  ||¡\}‰‰ |r(|r(| ‡ ‡fdd„| d¡D ƒ¡ n|s.ˆs.ˆ r6| |ˆˆ f¡ |  ¡ r
|S )Nc                 3  s    | ]
}|  ¡ ˆˆ fV  qd S r   )r¢   )Ú.0r<   ©r«   r-   r   r   Ú	<genexpr>G  s   € z2GoogleDocstring._consume_fields.<locals>.<genexpr>ú,)r˜   r   r­   ÚextendÚsplitr‘   )r   r™   r›   r®   Úfieldsri   r   r±   r   Ú_consume_fields?  s   "ûzGoogleDocstring._consume_fieldsútuple[str, list[str]]c                 C  sb   | j  ¡ }|  |¡\}}}|r|s||}}||7 }|g|  |  ¡ ¡¢}|  || j¡ ¡ }||fS r   )rp   r&   rž   r§   Ú_consume_to_endr%   rb   r†   )r   r’   r-   r©   r«   r¬   r   r   r   Ú_consume_inline_attributeL  s   

z)GoogleDocstring._consume_inline_attributeÚpreprocess_typesc           	      C  s¦   |   |  ¡ ¡}|rQ|  |d ¡\}}}dd|}}}|r1|r)|g|dd …  }n|dd … }|}|rB|rB| jjrBt|| jjp@i ƒ}|  || j¡ ¡ }|||fgS g S )Nr   r4   rŒ   )	r§   Ú_consume_to_next_sectionrž   rb   r¤   r2   r¥   r%   r†   )	r   r»   r†   r¨   r©   rª   ri   r-   r«   r   r   r   Ú_consume_returns_sectionV  s    ÿz(GoogleDocstring._consume_returns_sectionc                 C  s   |   |  ¡ ¡}|S r   )r§   r¼   r•   r   r   r   Ú_consume_usage_sectionp  s   z&GoogleDocstring._consume_usage_sectionc                 C  s*   | j  ¡ }| d¡}| ¡ | jv r|}|S )Nú:)rp   r&   r¢   ÚlowerrC   )r   ÚsectionÚstripped_sectionr   r   r   Ú_consume_section_headert  s
   

z'GoogleDocstring._consume_section_headerc                 C  s$   g }| j r| | j  ¡ ¡ | j s|S r   )rp   r‘   r&   r•   r   r   r   r¹   {  s
   ÿzGoogleDocstring._consume_to_endc                 C  s8   |   ¡  g }|  ¡ s| | j ¡ ¡ |  ¡ r
||   ¡  S r   )r˜   r   r‘   rp   r&   r•   r   r   r   r¼     s   ÿz(GoogleDocstring._consume_to_next_sectionr†   Úfullc                   s.   |r	dd„ |D ƒS |   |¡‰ ‡ fdd„|D ƒS )Nc                 S  s   g | ]}|  ¡ ‘qS r   )Úlstrip©r°   r’   r   r   r   Ú
<listcomp>Š  s    z+GoogleDocstring._dedent.<locals>.<listcomp>c                   s   g | ]}|ˆ d … ‘qS r   r   rÆ   ©Ú
min_indentr   r   rÇ     ó    )Ú_get_min_indent)r   r†   rÄ   r   rÈ   r   r§   ˆ  s   
zGoogleDocstring._dedentc                 C  sl   |  d¡rt| jddƒr|d d… d }|d d… dkr$d|dd …  S |d d	… d
kr4d|d	d …  S |S )Nr   Ústrip_signature_backslashFéÿÿÿÿz\_r   ú**z\*\*rŒ   Ú*z\*)ÚendswithÚgetattrrb   )r   r<   r   r   r   r£     s   ÿz'GoogleDocstring._escape_args_and_kwargsÚdescc                 C  s|   |   |¡rdg|¢}|S |d  d¡r<|dd … }|  |d ¡}|  |¡}||kr0dg|¢}|S d|d g|  |d¡¢}|S )Nr4   r   ú::rŒ   é   )Ú_is_listrÐ   r¦   Ú_get_initial_indentÚ_indent)r   rÒ   Ú
desc_blockr   Úblock_indentr   r   r   Ú_fix_field_descœ  s   

	ø

ÿzGoogleDocstring._fix_field_descÚ
admonitionc                 C  sh   |   |¡}t|ƒdkrd|› d|d  ¡ › dgS |r.|  |  |¡d¡}d| dg|¢d‘S d| dgS )NrŒ   z.. z:: r   r4   é   z.. %s::)Ú_strip_emptyr   r¢   r×   r§   )r   rÛ   r†   r   r   r   Ú_format_admonition©  s   
z"GoogleDocstring._format_admonitionÚprefixÚpaddingú
str | Nonec                 C  sr   |r6|d u rdt |ƒ }g }t|ƒD ]!\}}|dkr$| ||  ¡ ¡ q|r.| || ¡ q| d¡ q|S |gS )Nú r   r4   )r   Ú	enumerater‘   ro   )r   rß   r†   rà   Úresult_linesÚir’   r   r   r   Ú_format_block³  s   zGoogleDocstring._format_blockÚparamÚtyper¶   Ú
field_roleÚ	type_rolec           	   	   C  sš   g }|D ]B\}}}|   |¡}t|ƒr*|  |¡}d|› d|› d}| |  ||¡¡ n| d|› d|› d¡ |rF| d|› d|› d|› ¡ qg |¢d‘S )Nr¿   râ   ú: r4   )rÝ   ÚanyrÚ   r´   ræ   r‘   )	r   r¶   ré   rê   r†   ri   r-   r«   Úfieldr   r   r   Ú_format_docutils_paramsÈ  s   

€z'GoogleDocstring._format_docutils_paramsri   r-   r«   c                 C  sà   |   |¡}t|ƒ}|rdnd}|r8|r/d|v r#d|› d|› d|› }n-d|› d|› d|› }n!d|› d|› }n|rNd|v rE|› |› }nd	|› d	|› }nd}|rm|  |¡}|d
 rh||d
  g|dd …  S |g|¢S |gS )Nz -- r4   r1   rÎ   z** (ú)z** (*z*)rÏ   r   rŒ   )rÝ   rì   rÚ   )r   ri   r-   r«   Úhas_descÚ	separatorrí   r   r   r   Ú_format_fieldÜ  s(   


zGoogleDocstring._format_fieldÚ
field_typec           
      C  s®   d|  ¡  }dt|ƒ }t|ƒdk}g }|D ]3\}}}|  |||¡}	|r>|r2| |  |d |	¡¡ q| |  |d |	¡¡ q| |  |d |	¡¡ q|rU|d rU| d¡ |S )Nz:%s:râ   rŒ   z * rÍ   r4   )r¢   r   rò   r´   ræ   r‘   )
r   ró   r¶   rà   Úmultir†   ri   r-   r«   rí   r   r   r   Ú_format_fieldsù  s   
zGoogleDocstring._format_fieldsr   Ú
peek_aheadc                 C  sJ   | j  |¡}|| j jur#|r|  |¡S |d7 }| j  |¡}|| j jusdS )NrŒ   r   )rp   r   r   r¦   )r   rö   r’   r   r   r   Ú_get_current_indent  s   
üz#GoogleDocstring._get_current_indentr’   c                 C  s*   t |ƒD ]\}}| ¡ s|  S qt|ƒS r   )rã   Úisspacer   )r   r’   rå   Úsr   r   r   r¦     s
   ÿzGoogleDocstring._get_indentc                 C  s    |D ]}|r|   |¡  S qdS rŽ   ©r¦   r—   r   r   r   rÖ     s
   ÿz#GoogleDocstring._get_initial_indentc                 C  s8   d }|D ]}|r|   |¡}|d u s||k r|}q|pdS rŽ   rú   )r   r†   rÉ   r’   r   r   r   r   rË   $  s   
€zGoogleDocstring._get_min_indentrÔ   r   c                   s   ‡ fdd„|D ƒS )Nc                   s   g | ]}d ˆ  | ‘qS )râ   r   rÆ   ©r   r   r   rÇ   .  rÊ   z+GoogleDocstring._indent.<locals>.<listcomp>r   )r   r†   r   r   rû   r   r×   -  s   zGoogleDocstring._indentc                 C  s2   t |ƒD ]\}}||kr dS | ¡ s dS qdS )NTF)rã   rø   )r   r’   r   rå   rù   r   r   r   r   0  s   ÿzGoogleDocstring._is_indentedc                 C  sŽ   |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 ]}|rB|  |¡} ||kS q4||kS )NFr   Tr   rÓ   rŒ   )Ú_bullet_list_regexr    Ú_enumerated_list_regexr   rÐ   r¦   )r   r†   r   Únext_indentr’   r   r   r   rÕ   8  s"   
ýzGoogleDocstring._is_listc                 C  s|   | j  d¡ ¡ }t |¡}|r&| d¡| jv r&|  |¡}| jdd}||kS | j	r<t
 |¡r<| j	D ]
}| |¡r; dS q1dS )Nr   r¿   rŒ   )rö   TF)rp   r   rÀ   Ú_google_section_regexr    r¢   rC   r¦   r÷   rB   Ú_directive_regexÚ
startswith)r   rÁ   r    Úheader_indentÚsection_indentÚdirective_sectionr   r   r   r”   I  s   




ÿz"GoogleDocstring._is_section_headerc                 C  s6   | j  d¡}| j  p|  ¡ p| jo|o|  || j¡ S rŽ   ©rp   r   r”   rr   r   rs   )r   r’   r   r   r   r   W  s   ÿÿúz!GoogleDocstring._is_section_breakc                 C  s¨   | j jd urP| j jD ]G}t|tƒr| j| j| ¡ < q
|d dkr+| j| j|d  ¡ < q
|d dkr<| j| j|d  ¡ < q
| j 	|d  ¡ | j¡| j|d  ¡ < q
d S d S )NrŒ   Úparams_styler   Úreturns_style)
rb   Únapoleon_custom_sectionsrl   r.   Ú_parse_custom_generic_sectionrC   rÀ   Ú"_parse_custom_params_style_sectionÚ#_parse_custom_returns_style_sectionr   )r   Úentryr   r   r   r„   c  s   
ÿÿÿíz%GoogleDocstring._load_custom_sectionsc                 C  s  |   ¡ | _| jr0| jdv r0g }t t¡ |  ¡ }W d   ƒ n1 s#w   Y  | j |¡ d S | j	r„|  
¡ riz*|  ¡ }d| _|  ¡ | _t |¡rQ|g|  ¡ ¢}n	| j| ¡  |ƒ}W d| _d| _nd| _d| _w | jsu|  ¡ |   ¡  }n|  ¡ }| j |¡ | j	s3d S d S )N)Ú	attributeÚdataÚpropertyTFr   )r˜   rq   ri   rh   Ú
contextlibÚsuppressr"   Ú_parse_attribute_docstringr´   rp   r”   rÃ   rr   r÷   rs   r   r    r¼   rC   rÀ   r–   )r   ÚresrÁ   r†   r   r   r   r…   {  s6   

ÿ

€ÿîzGoogleDocstring._parserÁ   c                 C  s   |   ¡ }|  ||¡S r   )r¼   rÞ   )r   rÛ   rÁ   r†   r   r   r   rv   š  s   z!GoogleDocstring._parse_admonitionc                 C  s4   |   ¡ \}}|  dd|¡}|r| dd| g¡ |S )Nr4   ú	:type: %s)rº   rò   r´   )r   r-   r«   r†   r   r   r   r  Ÿ  s
   z*GoogleDocstring._parse_attribute_docstringc                 C  s  g }|   ¡ D ]q\}}}|s|  |¡}| jjr1d| }| |  ||¡¡ |r0| d|› d|› ¡ q| d| ¡ | jrJd| jv sEd| jv rJ| d¡ | d¡ |  dd|¡}| |  	|d	¡¡ |rr| d¡ | |  	d
| gd	¡¡ | d¡ q| jjr| d¡ |S )Nz
:ivar %s: z	:vartype rë   z.. attribute:: úno-indexÚnoindexú   :no-index:r4   rÜ   r  )
r·   Ú_lookup_annotationrb   Únapoleon_use_ivarr´   ræ   r‘   rk   rò   r×   )r   rÁ   r†   ri   r-   r«   rí   r¶   r   r   r   rw   ¦  s0   
€



z)GoogleDocstring._parse_attributes_sectionc                 C  s6   t dƒt dƒdœ}| jj}| | ¡ |¡}|  ||¡S )NÚExampleÚExamples)rK   rL   )r   rb   Ú$napoleon_use_admonition_for_examplesr   rÀ   Ú_parse_generic_section)r   rÁ   ÚlabelsÚuse_admonitionÚlabelr   r   r   rx   Á  s   þz'GoogleDocstring._parse_examples_sectionc                 C  s   |   |d¡S )NF)r  ©r   rÁ   r   r   r   r	  Ê  s   z-GoogleDocstring._parse_custom_generic_sectionc                 C  s   |   ||  ¡ ¡S r   )rõ   r·   r!  r   r   r   r
  Î  s   z2GoogleDocstring._parse_custom_params_style_sectionc                 C  s   | j dd}|  ||¡S )NT©r»   )r½   rõ   ©r   rÁ   r¶   r   r   r   r  Ñ  s   z3GoogleDocstring._parse_custom_returns_style_sectionc                 C  s6   ddg}ddg}|   ¡ }|  |d¡}|| | dg S )Nz.. rubric:: Usage:r4   z.. code-block:: pythonrÜ   )r¾   r×   )r   rÁ   ÚheaderÚblockr†   r   r   r   Ú_parse_usage_sectionÕ  s
   z$GoogleDocstring._parse_usage_sectionr  c                 C  sV   |   |  ¡ ¡}|  |¡}|rd| }|  |d¡}nd| }|r'|dg|¢d‘S |dgS )Nz.. admonition:: %srÜ   z.. rubric:: %sr4   )rÝ   r¼   r§   r×   )r   rÁ   r  r†   r$  r   r   r   r  Ü  s   
z&GoogleDocstring._parse_generic_sectionc                 C  s0   |   ¡ }| jjr| j|dddS |  tdƒ|¡S )NÚkeywordÚkwtype)ré   rê   zKeyword Arguments)r·   rb   Únapoleon_use_keywordrî   rõ   r   r#  r   r   r   ry   é  s   ÿz0GoogleDocstring._parse_keyword_arguments_sectionc                 C  sx   g }| j ddD ]1\}}}| d| ¡ | jr&d| jv s!d| jv r&| d¡ |r4| dg|  |d¡¢¡ | d¡ q|S )	NF)r™   z.. method:: %sr  r  r  r4   rÜ   )r·   r‘   rk   r´   r×   )r   rÁ   r†   ri   r-   r«   r   r   r   rz   ò  s   
z&GoogleDocstring._parse_methods_sectionc                 C  ó   | j j}|  tdƒ|¡S )NÚNotes)rb   Ú!napoleon_use_admonition_for_notesr  r   ©r   rÁ   r  r   r   r   r{   þ  ó   z$GoogleDocstring._parse_notes_sectionc                 C  ó6   | j jr| jdd}|  |¡S |  ¡ }|  tdƒ|¡S )NT©r®   zOther Parameters©rb   Únapoleon_use_paramr·   rî   rõ   r   r#  r   r   r   r|     ó
   
z/GoogleDocstring._parse_other_parameters_sectionc                 C  r/  )NTr0  Ú
Parametersr1  r#  r   r   r   ru     r3  z)GoogleDocstring._parse_parameters_sectionc           
      C  sÈ   | j ddd}g }|D ]O\}}}| j |¡}|r#| d¡r#| d¡}nt |¡r5| d¡}||d d… }|r;d| nd	}|  |¡}t|ƒrMdd
 |¡ nd	}	| 	d|› d|	› ¡ q|rb| 	d	¡ |S )NFT)r™   r›   r<   r1   rŒ   rÍ   râ   r4   z
    z:raisesr¿   )
r·   Ú	_name_rgxr    r¡   Ú_xref_regexÚfindrÝ   rì   r‰   r‘   )
r   rÁ   r¶   r†   ri   r-   r«   ÚmÚposr¬   r   r   r   r     s    



z%GoogleDocstring._parse_raises_sectionc                 C  r/  )NTr0  ÚReceivesr1  r#  r   r   r   r}   &  r3  z'GoogleDocstring._parse_receives_sectionc                 C  r*  )NÚ
References)rb   Ú&napoleon_use_admonition_for_referencesr  r   r-  r   r   r   r€   /  r.  z)GoogleDocstring._parse_references_sectionc           
      C  sØ   |   ¡ }t|ƒdk}|rdn| jj}g }|D ]H\}}}|r%|  |d|¡}	n|  |||¡}	|rD|r:| |  d|	¡¡ q| |  d|	¡¡ qt|	ƒrQ| |  d|	¡¡ |r^|r^| d| dg¡ q|rj|d rj| d¡ |S )	NrŒ   Fr4   z          * z:returns: * z
:returns: z
:rtype: %srÍ   )	r½   r   rb   Únapoleon_use_rtyperò   r´   ræ   rì   r‘   )
r   rÁ   r¶   rô   Ú	use_rtyper†   ri   r-   r«   rí   r   r   r   r~   3  s(   €
z&GoogleDocstring._parse_returns_sectionc                 C  s   |   d|¡S ©NÚseealso)rv   r!  r   r   r   r   M  s   z'GoogleDocstring._parse_see_also_sectionc                 C  s   |   tdƒ|  ¡ ¡S )NÚWarns)rõ   r   r·   r!  r   r   r   r‚   P  s   z$GoogleDocstring._parse_warns_sectionc                 C  s   | j dd}|  tdƒ|¡S )NTr"  ÚYields)r½   rõ   r   r#  r   r   r   rƒ   S  s   z%GoogleDocstring._parse_yields_sectionútuple[str, str, str]c           	      C  sÀ   g }g }d}d}t t |¡ƒD ]A\}}|r| |¡ qt |¡}|d dkrK|rKd}|| ¡ | ¡ … }| |d | ¡ … ¡ | || ¡ d … ¡ q| |¡ qd |¡ 	¡ |d |¡ 	¡ fS )Nr4   Fr   r   T)
rã   Ú_xref_or_code_regexrµ   r‘   Ú_single_colon_regexÚsearchÚstartÚendr‰   r¢   )	r   r’   Úbefore_colonÚafter_colonr©   Úfound_colonrå   Úsourcer8  r   r   r   rž   W  s   
z)GoogleDocstring._partition_field_on_colonc                 C  sŒ   |rDd}t |ƒD ]
\}}|r|} nq|dkrg }d}ttt|ƒƒƒD ]}|| }|r/|} nq#|dks<|d t|ƒk rD|||d … }|S )NrÍ   r   rŒ   )rã   ÚreversedÚranger   )r   r†   rG  rå   r’   rH  r   r   r   rÝ   k  s&   þþzGoogleDocstring._strip_emptyc                 C  sv   | j jr9| jdv r9| jr9t| dƒs,t| j di ƒ}| t| j di ƒp"i ¡ t| jd |ƒ| _|| jv r9t	| j| dƒS dS )N)r@   r?   Ú	exceptionÚ_annotationsÚautodoc_type_aliasesr¥   zfully-qualified-except-typingr4   )
rb   Únapoleon_attr_annotationsrh   rj   rt   rÑ   Úupdater
   rP  r   )r   ri   Úlocalnsr   r   r   r  ~  s$   
ýú

ÿz"GoogleDocstring._lookup_annotation©NNr4   r4   NN©r5   r6   r7   r8   r9   r:   r;   r.   r<   r.   r=   r   r>   r   r   r   ©r   r.   )r   r‹   )rŒ   )r   r   r   r‹   ©TF©r™   rš   r›   rš   r   rœ   )TFF)r™   rš   r›   rš   r®   rš   r   r¯   )r   r¸   ©F©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   )rß   r.   r†   r‹   rà   rá   r   r‹   )rç   rè   )r¶   r¯   ré   r.   rê   r.   r   r‹   )ri   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   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Á   r.   r   r‹   ©rÁ   r.   r   r‹   )rÁ   r.   r  rš   r   r‹   )r’   r.   r   rC  )r†   r‹   r   r‹   )ri   r.   r   r.   )Ar'   r(   r)   r*   ÚreÚcompileÚVERBOSEr5  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Ö   rË   r×   r   rÕ   r”   r   r„   r…   rv   r  rw   rx   r	  r
  r  r&  r  ry   rz   r{   r|   ru   r   r}   r€   r~   r   r‚   rƒ   rž   rÝ   r  r   r   r   r   r3   Y   s˜    >ý	ø
V




ýÿ
ÿ






üü


	

	









	





	


	
	

	





r3   Útokensr‹   c                   s6   t  | ¡}d‰ d
‡ fdd„‰d
‡fdd	„}t||ƒƒS )N©ÚoptionalÚdefaultrb  úcollections.deque[str]r   úIterator[str]c                 3  s¶    d}d }	 z|   ¡ }W n
 ty   Y d S w |dkr|}q| ¡ s#q|ˆ v r7|  |¡ |d ur5|  |¡ d S |d ur@|V  d }|dkrI|d7 }n|dkrQ|d8 }|V  |dkrZd S q)Nr   Tú, Ú{rŒ   Ú})r!   Ú
IndexErrorr¢   Ú
appendleft)rb  Úopen_bracesÚprevious_tokenÚtoken)Úkeywordsr   r   Útakewhile_set™  s<   €ÿ


áz,_recombine_set_tokens.<locals>.takewhile_setc                 3  sR    	 z|   ¡ }W n
 ty   Y d S w |dkr%|  d¡ d ˆ | ƒ¡V  n|V  q)NTri  r4   )r!   rk  rl  r‰   )rb  ro  )rq  r   r   Úcombine_set½  s   €ÿ
öz*_recombine_set_tokens.<locals>.combine_set)rb  rf  r   rg  )ÚcollectionsÚdequeÚlist)rb  Útoken_queuerr  r   )rp  rq  r   Ú_recombine_set_tokens•  s
   
$rw  Úspecc                   s&   d	dd„‰ ‡ fdd„t  | ¡D ƒ}|S )
NÚitemr.   r   r‹   c                 S  s2   t  | ¡r| d d… }| dd … }|d|gS | gS )Né   é   râ   )Ú_default_regexr    )ry  re  Úotherr   r   r   ÚpostprocessÎ  s
   

z(_tokenize_type_spec.<locals>.postprocessc                   s"   g | ]}ˆ |ƒD ]}|r|‘qqS r   r   )r°   Ú	raw_tokenry  ©r~  r   r   rÇ   Ù  s    ýüÿz'_tokenize_type_spec.<locals>.<listcomp>)ry  r.   r   r‹   )Ú_token_regexrµ   )rx  rb  r   r€  r   Ú_tokenize_type_specÍ  s
   

þr‚  ro  Úlocationrá   c                 C  s4  ddd„}|   d¡s|  d¡rd}|S || ƒs5|   d	¡r!|  d
¡s5|   d¡r+|  d¡s5|   d¡r9|  d¡r9d}|S |   d	¡rLtjtdƒ| |d d}|S |  d
¡r_tjtdƒ| |d d}|S |   d¡rrtjtdƒ| |d d}|S |  d¡r…tjtdƒ| |d d}|S | dv rd}|S t | ¡r–d}|S d}|S )Nro  r.   r   rš   c                 S  s$   zt | ƒ W dS  ty   Y dS w )NFT)ÚcomplexÚ
ValueError)ro  r   r   r   Ú
is_numericã  s   
ýÿz_token_type.<locals>.is_numericrâ   Ú	delimiterri  rj  ú"ú'Úliteralz-invalid value set (missing closing brace): %s©rƒ  z-invalid value set (missing opening brace): %s)r‰  rˆ  z4malformed string literal (missing closing quote): %sz4malformed string literal (missing opening quote): %src  ÚcontrolÚ	referencer=   )ro  r.   r   rš   )r  rÐ   Úloggerr[   r   r6  r    )ro  rƒ  r†  Útype_r   r   r   Ú_token_typeâ  sx   
	-Õÿþþýýüü&
Ûý
âý
éý
ðý
÷
ûþr  c                   s~   ˆd u ri ‰ddd„‰ t | ƒ}t|ƒ}‡fd	d
„|D ƒ}dd„ ‡ ‡fdd„dd„ dd„ dd„ dœ‰d ‡fdd„|D ƒ¡}|S )Nr=   r.   r/   údict[str, str]Údefault_translationr   c                 S  sP   |  | | ¡}|tv r|dkrd}n
|dkr|dkrd}t |¡d u r&|| }|S )Nú:class:`%s`ú	:obj:`%s`z...z:obj:`%s <Ellipsis>`)r   Ú_SINGLETONSr6  r    )r=   r/   r’  Útranslationr   r   r   Úconvert_obj%  s   z-_convert_numpy_type_spec.<locals>.convert_objc                   s   g | ]	}|t |ˆ ƒf‘qS r   )r  )r°   ro  r‹  r   r   rÇ   8  s    z,_convert_numpy_type_spec.<locals>.<listcomp>c                 S  ó   d|  S )Nz``%s``r   ©Úxr   r   r   Ú<lambda>;  ó    z*_convert_numpy_type_spec.<locals>.<lambda>c                   s   ˆ | ˆdƒS )Nr“  r   r™  )r—  r/   r   r   r›  <  s    c                 S  r˜  )Nz*%s*r   r™  r   r   r   r›  =  rœ  c                 S  ó   | S r   r   r™  r   r   r   r›  >  ó    c                 S  r  r   r   r™  r   r   r   r›  ?  rž  )rŠ  r=   rŒ  r‡  r  r4   c                 3  s"    | ]\}}ˆ   |¡|ƒV  qd S r   )r   )r°   ro  r  )Ú
convertersr   r   r²   B  s
   € ÿ
ÿz+_convert_numpy_type_spec.<locals>.<genexpr>)r=   r.   r/   r‘  r’  r.   r   r.   )r‚  rw  r‰   )r-   rƒ  r/   rb  Úcombined_tokensÚtypesÚ	convertedr   )r—  rŸ  rƒ  r/   r   Ú_convert_numpy_type_spec  s    
ûþr£  c                      s–   e Zd ZdZ						d2d3‡ fdd„Zd4dd„Zd5‡ fdd„Z	d6d7dd „Z	d8d9d#d$„Zd:d%d&„Z	d;d'd(„Z
d;d)d*„Zd<d-d.„Zd=d0d1„Z‡  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 no_index 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.

    Nr4   r5   r6   r7   r8   r9   r:   r;   r.   r<   r=   r   r>   r   r   c              	     s$   dg| _ tƒ  |||||||¡ d S )Nz
.. index::)rB   r    r‡   )r   r5   r7   r9   r;   r<   r=   r>   r$   r   r   r‡   ¨  s   
zNumpyDocstring.__init__rá   c                 C  sj   z| j d urt | j ¡nd }W n ty   d }Y nw | j}|d u r(|d u r(d S |d u r.d}|› d|› S )Nr4   z:docstring of )rj   rd   ÚgetfileÚ	TypeErrorri   )r   Úfilepathr<   r   r   r   Ú_get_locationµ  s   ÿzNumpyDocstring._get_locationc                   s.   t ƒ j}d|v rd t|| d¡ƒ¡S ||ƒS )Nrh  )r    r£   r‰   rn   rµ   )r   r<   Úfuncr$   r   r   r£   Ã  s   z&NumpyDocstring._escape_args_and_kwargsTFr™   rš   r›   rœ   c           	      C  sÆ   | j  ¡ }|r|  |¡\}}}n|d}}| ¡ | ¡ }}|  |¡}|r,|s,|  |¡}|r5|s5||}}| jjrFt||  	¡ | jj
pCi d}|  |¡d }|  |  |¡¡}|  || j¡ ¡ }|||fS )Nr4   )rƒ  r/   rŒ   )rp   r&   rž   r¢   r£   r  rb   r¤   r£  r¨  r¥   r¦   r§   r“   r%   r†   )	r   r™   r›   r’   ri   r   r-   r   r«   r   r   r   r­   Ë  s(   





ý
zNumpyDocstring._consume_fieldr»   r¯   c                 C  s   | j ddS )NT)r›   )r·   )r   r»   r   r   r   r½   è  s   z'NumpyDocstring._consume_returns_sectionc                 C  s"   | j  ¡ }t |¡s| j  ¡  |S r   )rp   r&   r   r    r!  r   r   r   rÃ   í  s   


z&NumpyDocstring._consume_section_headerc                 C  s\   | j  d¡| j  d¡}}| j  p-|  ¡ p-||  kodkn  p-| jo-|o-|  || j¡ S )Nr   rŒ   r4   r  )r   Úline1Úline2r   r   r   r   ô  s   ÿþÿùz NumpyDocstring._is_section_breakc                 C  st   | j  d¡| j  d¡}}| ¡ }|| jv r"t|tƒr"tt |¡ƒS | j	r8t
 |¡r8| j	D ]
}| |¡r7 dS q-dS )Nr   rŒ   TF)rp   r   rÀ   rC   rl   r.   rš   Ú_numpy_section_regexr    rB   r   r  )r   rÁ   Ú	underliner  r   r   r   r”     s   


ÿz!NumpyDocstring._is_section_headerrÁ   r‹   c                 C  s4   |   ¡ }z|  |¡W S  ty   |  d|¡ Y S w r?  )r¼   Ú _parse_numpydoc_see_also_sectionr…  rÞ   )r   rÁ   r†   r   r   r   r     s   ÿz&NumpyDocstring._parse_see_also_sectionÚcontentc                   sò  g ‰ d#‡fdd„‰d$‡ ‡fdd„}d%‡fdd„}d}g }|D ]x}|  ¡ s%qˆj |¡}|rb|| ¡ d…   ¡  d¡rb|||ƒ |d| ¡ … || ¡ d… }}| dd¡d   ¡ g}|d sag }q| d¡s‹|||ƒ d}d|v r„| d¡D ]}|  ¡ r‚||g ƒ qwq|  ¡ rŠ|}q|dur–| |  ¡ ¡ q|||ƒ ˆ s g S tt|ˆ ƒƒ‰ g }	d}
ˆ D ]@\}}}|r¾d|› d|› d}nd| }|sÆ|
rÑ|	dg7 }	|	|g7 }	n
|	d  d | 7  < |rë|	ˆ 	d 
|¡g¡7 }	d}
q­d!}
q­|	dg7 }	ˆ d"|	¡S )&a—  
        See Also
        --------
        func_name : Descriptive text
            continued text
        another_func_name : Descriptive text
        func_name1, func_name2, :meth:`func_name`, func_name3

        Licence
        -------

        Derived from the NumpyDoc implementation of ``_parse_see_also``,
        which was under the following licence:

            Copyright (C) 2008 Stefan van der Walt <stefan@mentat.za.net>,
                               Pauli Virtanen <pav@iki.fi>

            Redistribution and use in source and binary forms, with or without
            modification, are permitted provided that the following conditions are
            met:

             1. Redistributions of source code must retain the above copyright
                notice, this list of conditions and the following disclaimer.
             2. Redistributions in binary form must reproduce the above copyright
                notice, this list of conditions and the following disclaimer in
                the documentation and/or other materials provided with the
                distribution.

            THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
            IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
            WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
            DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
            INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
            (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
            SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
            HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
            STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
            IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
            POSSIBILITY OF SUCH DAMAGE.
        Útextr.   r   útuple[str, str | None]c                   sL   ˆ j  | ¡}|r | ¡ }|d du r|d dfS |d |d fS td|  ƒ‚)zMatch ':role:`name`' or 'name'rŒ   NrÜ   r   z%s is not a item name)r5  r    Úgroupsr…  )r°  r8  Úgr#   r   r   Úparse_item_name?  s   zHNumpyDocstring._parse_numpydoc_see_also_section.<locals>.parse_item_namer<   rá   Úrestr‹   r   c                   s4   | sd S ˆ| ƒ\} }ˆ   | | ¡ |f¡ | ¡  d S r   )r‘   ÚcopyÚclear)r<   rµ  Úrole)Úitemsr´  r   r   Ú	push_itemJ  s
   zBNumpyDocstring._parse_numpydoc_see_also_section.<locals>.push_itemr©  Údescriptionr¸  ú!tuple[str, list[str], str | None]c                   sn   ˆ j j}|d us
|s| ||fS | | | ¡}ˆ j |¡}|s"|||fS | ¡ }|d }|d p1|d }|||fS )Nr¸  r<   Úname2)rb   r¥   r   r5  r    Ú	groupdict)r©  r»  r¸  r/   Ú
translatedr    r²  Únew_funcr#   r   r   Ú	translateQ  s   


zBNumpyDocstring._parse_numpydoc_see_also_section.<locals>.translateNr¿   rŒ   r   râ   r³   Tz:`r1   r”  r4   rÍ   z, %sFr@  )r°  r.   r   r±  )r<   rá   rµ  r‹   r   r   )r©  r.   r»  r‹   r¸  rá   r   r¼  )r¢   r5  r    rH  r  rµ   r‘   ru  r   r×   r‰   rÞ   )r   r¯  rº  rÁ  Úcurrent_funcrµ  r’   r8  r©  r†   Úlast_had_descr<   rÒ   r¸  Úlinkr   )r¹  r´  r   r   r®    sh   )
"€


€þ€€


z/NumpyDocstring._parse_numpydoc_see_also_sectionrU  rV  )r   rá   r\  rX  rY  rZ  r[  rW  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   r¤  J  s(    `ø
	ÿÿ



r¤  r   )r-   r.   r/   r0   r   r.   )rb  r‹   r   r‹   )rx  r.   r   r‹   )ro  r.   rƒ  rá   r   r.   )NN)r-   r.   rƒ  rá   r/   r0   r   r.   )7r*   Ú
__future__r   rs  r  rd   r_  Ú	functoolsr   Ú	itertoolsr   Útypingr   r   Úsphinx.localer   r   Úsphinx.utilr	   Úsphinx.util.typingr
   r   Úcollections.abcr   r   Úsphinx.applicationr   Úsphinx.configr   ÚSphinxConfigÚ	getLoggerr'   rŽ  r`  r   rÿ   rŸ   r¬  rE  rD  r6  rü   rý   r  r|  r•  rt  r   r2   r3   rw  r‚  r  r£  r¤  r   r   r   r   Ú<module>   sn    





ÿÿ
ÿÿÿ	      
B
8=ý-