403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/ext/autosummary/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/ext/autosummary/__pycache__/generate.cpython-39.pyc
a

�abxg�@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlmZddl
mZmZmZmZmZmZmZmZmZddlmZddlmZddlZddlmZmZdd	lm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&dd
l'm(Z(ddl)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/ddlm0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl6m7Z7m8Z8m9Z9ddl:m;Z;m<Z<ddl=m>Z>ddl?m@Z@e7�AeB�ZCGdd�d�ZDGdd�de�ZEedd�dd�ZFeGdd�dd �ZHeGdd�d!d"�ZIdIeGeGeGd$�d%d&�ZJGd'd(�d(�ZKGd)d*�d*�ZLee$eeGd+�d,d-�ZMdJeGeeeKeGeNeeNeeGeGeGd.�d/d0�ZOdKeeGeGeGeGe"eGeNeeNeGdd5�d6d7�ZPeeGeeEd8�d9d:�ZQdLeGeGeGeeEd;�d<d=�ZRdMeeGeGeGeeEd>�d?d@�ZSejTdA�dBdC�ZUejVdDd�feeGddE�dFdG�ZWeBdHk�reW�dS)Na"
    sphinx.ext.autosummary.generate
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Usable as a library or script to generate automatic RST source files for
    items referred to in autosummary:: directives.

    Each generated RST file contains a single auto*:: directive which
    extracts the docstring of the referred item.

    Example Makefile rule::

       generate:
               sphinx-autogen -o source/generated source/*.rst

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�NullTranslations)�path)	�Any�Dict�List�
NamedTuple�Sequence�Set�Tuple�Type�Union)�TemplateNotFound)�SandboxedEnvironment)�__display_version__�package_dir)�Sphinx)�Builder)�Config)�RemovedInSphinx50Warning)�
Documenter)�
import_module)�ImportExceptionGroup�get_documenter�import_by_name�import_ivar_by_name)�__)�ModuleAnalyzer�PycodeError)�SphinxComponentRegistry)�logging�rst�split_full_qualified_name)�getall�safe_getattr)�	ensuredir)�SphinxTemplateLoaderc@s0eZdZdZedd�dd�Zedd�dd�ZdS)	�DummyApplicationz3Dummy Application class for sphinx-autogen command.N)�
translator�returncCsxt�|_t�|_g|_d|_||_d|_d|_d|_	|j�
didd�|j�
didd�|j�
dddt�|j��dS)	N�/rF�autosummary_contextT�autosummary_filename_map�autosummary_ignore_module_all�env)
r�configr�registryZ
messagelog�srcdirr'�	verbosityZ
_warncountZwarningiserror�add�boolZinit_values)�selfr'�r5�C/usr/lib/python3.9/site-packages/sphinx/ext/autosummary/generate.py�__init__<szDummyApplication.__init__)�argsr(cGsdS�Nr5)r4r8r5r5r6�emit_firstresultKsz!DummyApplication.emit_firstresult)�__name__�
__module__�__qualname__�__doc__rr7rr:r5r5r5r6r&9sr&c@s.eZdZUeed<eed<eed<eed<dS)�AutosummaryEntry�namer�template�	recursiveN)r;r<r=�str�__annotations__r3r5r5r5r6r?Os
r?)�appr(cCslddlm}m}m}m}m}m}m}m}m	}	m
}
m}|||||||	|
|||g}|D]}
|j�
|
j|
�qRdS)Nr)�AttributeDocumenter�ClassDocumenter�DataDocumenter�DecoratorDocumenter�ExceptionDocumenter�FunctionDocumenter�MethodDocumenter�ModuleDocumenter�NewTypeAttributeDocumenter�NewTypeDataDocumenter�PropertyDocumenter)�sphinx.ext.autodocrFrGrHrIrJrKrLrMrNrOrPr/Zadd_documenter�objtype)rErFrGrHrIrJrKrLrMrNrOrPZdocumenters�
documenterr5r5r6�setup_documentersVs4�rT)�msgr(cCstjdtdd�t|�dS)Nz_simple_info() is deprecated.���
stacklevel)�warnings�warnr�print�rUr5r5r6�_simple_infoes�r]cCs&tjdtdd�td|tjd�dS)Nz_simple_warn() is deprecated.rVrWz	WARNING: )�file)rYrZrr[�sys�stderrr\r5r5r6�_simple_warnks�ra�=)�title�liner(cCs$d|vrtd��|d|t|�S)N�
zCan only underline single lines)�
ValueError�len)rcrdr5r5r6�
_underlineqsrhc@sNeZdZdZdeeefedd�dd�Zee	d�dd�Z
eeed	�d
d�ZdS)
�AutosummaryRendererzA helper class for rendering.N)rE�template_dirr(cCs�t|t�rtjdtdd�|r.tjdtdd�tj�tddd�g}t	|j
|jj|�}t
|d�|_tj|jjd	<tj|jjd
<t|jjd<t|ttf�r�|jr�|j�d�|j�|j�n.t|t�r�|jjr�|j�d�|j�|jj�dS)
NzLThe first argument for AutosummaryRenderer has been changed to Sphinx objectrVrWz<template_dir argument for AutosummaryRenderer is deprecated.�ext�autosummary�	templates)�loader�escape�e�	underlinezjinja2.ext.i18n)�
isinstancerrYrZr�osr�joinrr%r0r.�templates_pathrr-r ro�filtersrhrr&r'�
add_extensionZinstall_gettext_translationsrE)r4rErjZsystem_templates_pathrnr5r5r6r7zs0
���
zAutosummaryRenderer.__init__)�
template_namer(cCs<tjdtdd�z|j�|�WdSty6YdS0dS)zCheck if template file exists.z+AutosummaryRenderer.exists() is deprecated.rVrWTFN)rYrZrr-�get_templater
)r4rxr5r5r6�exists�s�zAutosummaryRenderer.exists)rx�contextr(cCsbz|j�|�}WnFtyVz|j�d|�}WntyP|j�d�}Yn0Yn0|�|�S)zRender a template file.zautosummary/%s.rstzautosummary/base.rst)r-ryr
�render)r4rxr{rAr5r5r6r|�szAutosummaryRenderer.render)N)
r;r<r=r>rrrrCr7r3rzrr|r5r5r5r6riws
ric@sXeZdZeedd�dd�Zeeed�dd�Zeeeed�d	d
�Zee	ed�dd
�Z
dS)�
ModuleScannerN)rE�objr(cCs||_||_dSr9)rE�object)r4rEr~r5r5r6r7�szModuleScanner.__init__)r@�valuer(cCst|j||j�jSr9)rrErrR)r4r@r�r5r5r6�get_object_type�szModuleScanner.get_object_type)r@r�rRr(c
CsZz|j�d|||di�WStyT}z$tjtd�||dd�WYd}~dSd}~00dS�Nzautodoc-skip-memberFz\autosummary: failed to determine %r to be documented, the following exception was raised:
%srl)�type)rEr:�	Exception�logger�warningr)r4r@r�rR�excr5r5r6�
is_skipped�s
�
�zModuleScanner.is_skipped)�imported_membersr(c	Cs�g}t|j|jj�D]�}zt|j|�}Wnty>d}Yn0|�||�}|�|||�r\qz0t�	|�rnd}nt|d�|jj
kr�d}nd}Wnty�d}Yn0|jjj}|r�|�|�q|dur�|�|�qdt
|j�vr|r|�|�q|S)NTr<F�__all__)�
members_ofrrEr.r#�AttributeErrorr�r��inspectZismoduler;r,�append�dir)r4r��membersr@r�rR�imported�respect_module_allr5r5r6�scan�s2


zModuleScanner.scan)r;r<r=rr7rCr�r3r�rr�r5r5r5r6r}�s
r})r~�confr(cCs"|jrt|�St|�pt|�SdS)z�Get the members of ``obj``, possibly ignoring the ``__all__`` module attribute

    Follows the ``conf.autosummary_ignore_module_all`` setting.N)r,r�r")r~r�r5r5r6r��sr�)r@r~�parentrArxr�rErBr{�modname�qualnamer(c	s�t�||��ttttd��fdd��ttttfd��fdd��ttttfd��fdd��ttttfd����fd	d
��gdftttttttttttfd����fd
d�
}ttttttfd��fdd�}ttttttfd��fdd�}
i}|�|��j	dk�r�t
�|�}|�|�|d<||dh|d�\|d<|d<||dh|d�\|d<|d<||dh|d�\|d<|d<||d�\|d <|d!<t|d"�}|�r6|�r6|
|�\|d#<|d$<nl�j	dk�r6t
|�|d<tt
|��t|j���|d%<||d&hd'g�\|d(<|d)<||d*d+h�\|d <|d!<|	du�sJ�du�rVt��\}	��j	d,v�rv��d-d.�d/|d<�j	d0v�r��}n��d-d.�d1}�|d2<|	|d<�|d3<||d4<�j	|d5<t��d6|d7<|�r�|�||�S|��j	|�SdS)8N)r~r@rRr(c
sXz��d|||di�WStyR}z$tjtd�||dd�WYd}~dSd}~00dSr�)r:r�r�r�r)r~r@rRr��rEr5r6�skip_member�s
�
�z1generate_autosummary_content.<locals>.skip_member)r~r(cs&tjj�|�gt�}dd�|��D�S)NcSsi|]\}}||j�qSr5)r)�.0r@�memberr5r5r6�
<dictcomp>�zKgenerate_autosummary_content.<locals>.get_class_members.<locals>.<dictcomp>)�sphinxrkZautodoc�get_class_membersr#�items)r~r�)r�r5r6r�sz7generate_autosummary_content.<locals>.get_class_membersc	sDi}t|�j�D].}zt||�||<Wqty<YqYq0q|Sr9)r�r.r#r�)r~r�r@r�r5r6�get_module_memberssz8generate_autosummary_content.<locals>.get_module_memberscs(�jdkr�|�S�jdkr$�|�SiS)N�module�class)rR)r~)�docr�r�r5r6�get_all_memberss


z5generate_autosummary_content.<locals>.get_all_membersT)r~�types�include_publicr�r(cs�g}g}�|�}|��D]�\}}t�||�}	|	j|vr|sLt|dd�|jkr�|||	j�}
|
durdq|
dur�|�|�|�|�q|�|�||vs�|�d�s|�|�q||fS)Nr<TF�_)r�rrR�getattrr;r��
startswith)r~r�r�r�r��publicZall_membersr@r�rSZskipped)rEr�r�r5r6�get_memberss"


z1generate_autosummary_content.<locals>.get_members)r�r(csxgg}}zRt���}|��}|D]6\}}|dkr"||vr"|�|�|�d�s"|�|�q"WntynYn0||fS)z'Find module attributes with docstrings.�r�)rZ
for_moduleZfind_attr_docsr�r�r)r��attrsr�ZanalyzerZ	attr_docs�	namespaceZ	attr_name�r@r5r6�get_module_attrs0s



z6generate_autosummary_content.<locals>.get_module_attrsc	szg}t�|j�D]R\}}}�d|}zt|�}|rBt|d�rBWqWntyVYn0|�|�qdd�|D�}||fS)N�.Z__sphinx_mock__cSs$g|]}|�d�d�d�s|�qS)r����r�)�splitr�)r��xr5r5r6�
<listcomp>Kr�zEgenerate_autosummary_content.<locals>.get_modules.<locals>.<listcomp>)�pkgutilZiter_modules�__path__r�hasattr�ImportErrorr�)r~r�r�r�Z_ispkg�fullnamer�r�r�r5r6�get_modules?sz1generate_autosummary_content.<locals>.get_modulesr�r��function)r�Z	functionsZ
all_functionsr��classesZall_classes�	exception�
exceptionsZall_exceptionsZ
attributesZall_attributesr��modulesZall_modulesZinherited_members�methodr7�methodsZall_methods�	attribute�property)r�r�r�r��r)r�r�r�Zobjnamer@rRrbrq)rrrCr3rr	rr
�updaterRr}r�r�r��set�__dict__�keysr!�rsplitrgr|)r@r~r�rArxr�rErBr{r�r�r�r�r��ns�scanner�	ispackageZ	shortnamer5)rEr�r�r�r�r@r�r�r6�generate_autosummary_content�sh
	 ��$$

���
�
���
r��.rstFT�utf-8)�sources�
output_dir�suffix�	base_path�builderrjr�rE�	overwrite�encodingr(c
sl|rtjdtdd�|r(tjdtdd�tt|��}
t|
�dkr^|
dd�dg|
dd�}
t�td	�d
�	|
��|r�t�td�|��dur��fdd
�|D�}t
|�}t|�}g}
|r�|jj
}ni}tt|�td�D�]h}|jdur�q�|p�tj�|j�}t|�z*t|jdd�\}}}}|�|dd�}Wn�t�y}z�z&t|j�\}}}}|�|dd�}Wn�t�y�}zv|j�r�|j|jg}n|j|g}ttdd�|D���}t�td�|jd�	|��WYd}~WYd}~q�WYd}~n
d}~00WYd}~n
d}~00i}|�r*|�|jj�t|||||j |||j!|||�}tj�	||�"||�|�}tj�#|��rt$||	d��}|�%�}Wd�n1�s�0Y||k�r�q�nJ|�rFt$|d|	d��}|�&|�Wd�n1�s�0Y|
�'|�q�t$|d|	d��}|�&|�Wd�n1�s20Y|
�'|�q�|
�rht(|
||�|||||d�	dS)Nz?builder argument for generate_autosummary_docs() is deprecated.rVrWzDtemplate_dir argument for generate_autosummary_docs() is deprecated.��
z...i����z,[autosummary] generating autosummary for: %sz, zutosummary] writing to %scsg|]}tj��|��qSr5)rsrrt)r��filename�r�r5r6r��r�z-generate_autosummary_docs.<locals>.<listcomp>)�keyT�Zgrouped_exceptionr�r�css |]}dt|�j|fVqdS�z* %s: %sN�r�r;�r�rpr5r5r6�	<genexpr>�r�z,generate_autosummary_docs.<locals>.<genexpr>z5[autosummary] failed to import %s.
Possible hints:
%sre)r��w)r�r�r�r�rjr�rEr�))rYrZr�list�sortedrgr��inforrtri�find_autosummary_in_filesr.r+r�rCrrs�abspathr$rr@�replacerrr��	__cause__r�r�r�r*r�rArB�get�isfile�open�read�writer��generate_autosummary_docs)r�r�r�r�r�rjr�rEr�r�Zshowed_sourcesrAr�Z	new_filesZfilename_map�entryrr@r~r�r�r�r�Zexc2r��errorsr{Zcontentr��fZold_contentr5r�r6r��s���
�


�B
�(
**�r�)�	filenamesr(c	Cs^g}|D]P}t|ddd��.}|����}|�t||d��Wd�q1sN0Yq|S)z^Find out what items are documented in source/*.rst.

    See `find_autosummary_in_lines`.
    r��ignore)r�r��r�N)r�r��
splitlines�extend�find_autosummary_in_lines)r��
documentedr�r��linesr5r5r6r��s2r�)r@r�r�r(c

Cs�|rtjdtdd�z2t|dd�\}}}}t�|���}t|||d�WStyXYnnt	y�}z:t
tdd�|jD���}	t
d	|d
�|	�f�WYd}~n&d}~0ty�t
d|�Yn0gS)
znFind out what items are documented in the given object's docstring.

    See `find_autosummary_in_lines`.
    zBmodule argument for find_autosummary_in_docstring() is deprecated.rVrWTr�)r�r�css |]}dt|�j|fVqdSr�r�r�r5r5r6r�r�z0find_autosummary_in_docstring.<locals>.<genexpr>z'Failed to import %s.
Possible hints:
%sreNz_Failed to import '%s'; the module executes module level statement and it might call sys.exit().)rYrZrr�pydocZgetdocr�r�r�rr�r�r�r[rt�
SystemExit)
r@r�r�Z	real_namer~r�r�r�r�r�r5r5r6�find_autosummary_in_docstring�s$�*�r�)r�r�r�r(cCs�t�d�}t�d�}t�d�}t�d�}t�d�}t�d�}t�d�}	g}
d}d	}d	}
|}d}d
}|D�]�}|�rt|�|�}|r�d}qf|�|�}|r�|�d�}|rftj�tj�|�|�}qf|	�|�}|r�|�d���}
qf|���	d
�r�qf|�|�}|�rV|�d���}|�	d��r|dd	�}|�r@|�	|d��s@d||f}|
�
t|||
|��qf|��rf|�	|d��rpqfd}|�|�}|�r�d}|�d�}d}d	}d	}
qf|�|�}|�r�|�d���}|
�
t||d��qf|�|�}|rf|�d�}qfqf|
S)a�Find out what items appear in autosummary:: directives in the
    given lines.

    Returns a list of (name, toctree, template) where *name* is a name
    of an object and *toctree* the :toctree: path of the corresponding
    autosummary directive (relative to the root of the file name), and
    *template* the value of the :template: option. *toctree* and
    *template* ``None`` if the directive does not have the
    corresponding options set.
    z^(\s*)\.\.\s+autosummary::\s*z.^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$z4^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$z%^\s+(~?[_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?z^\s+:recursive:\s*$z^\s+:toctree:\s*(.*?)\s*$z^\s+:template:\s*(.*?)\s*$FNr�Tr��:�~r�z%s.%s� r�rV)�re�compile�match�grouprsrrt�dirname�stripr�r�r?�searchr�r�)r�r�r�Zautosummary_reZ
automodule_reZ	module_reZautosummary_item_reZrecursive_arg_reZtoctree_arg_reZtemplate_arg_rer�rBZtoctreerAZcurrent_moduleZin_autosummaryZbase_indentrd�mr@r5r5r6r�
s�
��







�

�


�

r�)r(cCs�tjdtd�td�d�}|jddddtd	�|jd
dtd�d
�|jddddtd�d�|jdddddtd�d�|jdddddtd�d�|jddd d!d"td#�d�|jd$d%d d&d"td'�d�|S)(Nz#%(prog)s [OPTIONS] <SOURCE_FILE>...z:For more information, visit <https://www.sphinx-doc.org/>.a�
Generate ReStructuredText using autosummary directives.

sphinx-autogen is a frontend to sphinx.ext.autosummary.generate. It generates
the reStructuredText files from the autosummary directives contained in the
given input files.

The format of the autosummary directive is documented in the
``sphinx.ext.autosummary`` Python module and can be read using::

  pydoc sphinx.ext.autosummary
)�usage�epilog�descriptionz	--version�versionZshow_versionz%%(prog)s %s)�action�destr
�source_file�+z&source files to generate rST files for)�nargs�helpz-oz--output-dir�storer�z directory to place all output in)rrrz-sz--suffixr�r z/default suffix for files (default: %(default)s))rr�defaultrz-tz--templatesrmz0custom template directory (default: %(default)s)z-iz--imported-members�
store_truer�Fz0document imported members (default: %(default)s)z-az--respect-module-allr�zPdocument exactly the members in module __all__ attribute. (default: %(default)s))�argparse�ArgumentParserr�add_argumentr)�parserr5r5r6�
get_parserls@�
��
���
�
�rr�)�argvr(cCs�tj�tjd�tj�tj�td�d�tj�	gd�\}}t
|�}t�|t
jt
j�t|�t��|�}|jr�|jj�t�|j��|j|j_t|j|jd|j|j|d�dS)Nr��localer�r�)r�rE)r�r�	setlocale�LC_ALLZinit_consolersrrtr�initr&rZsetupr_�stdoutr`rTr�
parse_argsrmr.rur�r�r�r,r�rr�r�r�)rr'r�rEr8r5r5r6�main�s
�r#�__main__)rb)NN)	Nr�NNNFNTr�)NN)NN)Xr>rr�rrsr�r�rr_rY�gettextrr�typingrrrrrr	r
rrZjinja2r
Zjinja2.sandboxrZ
sphinx.localer�rrZsphinx.applicationrZsphinx.buildersrZ
sphinx.configrZsphinx.deprecationrrQrZsphinx.ext.autodoc.importerrZsphinx.ext.autosummaryrrrrrZ
sphinx.pycoderrZsphinx.registryrZsphinx.utilrr r!Zsphinx.util.inspectr"r#Zsphinx.util.osutilr$Zsphinx.util.templater%Z	getLoggerr;r�r&r?rTrCr]rarhrir}r�r3r�r�r�r�r�rrrr#r5r5r5r6�<module>s�,
:6���
�f
��_."


Youez - 2016 - github.com/yon3zu
LinuXploit