
    -Ph'                        d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl	m
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mZ d d	lmZ d d
lmZ e
rd dlmZ d dl	mZ ddZdddZddZd dZ dS )!    )annotationsN)Path)TYPE_CHECKING)__display_version__)
EXTENSIONS)create_modules_toc_filerecurse_tree)LOGGERApidocOptions_remove_old_files)__)	ensuredir)Sequence)Anyreturnargparse.ArgumentParserc                 	   t          j        dt          d          t          d                    } |                     ddddt           	           |                     d
t          d                     |                     ddt          d                     |                     dddddt          d                     |                     dddt          d                     |                     ddddt
          d t          d!          "           |                     d#d$dd%t          d&                     |                     d'd(dd)d*t          d+          ,           |                     d-d.dd/t          d0                     |                     d1d2dd3t          d4                     |                     d5d6dd7t          d8                     |                     d9dd:d;t          d<          ,           |                     d=d>d?d:t          d@                     |                     dAdBddCt          dD                     |                     dEdFddGt          dH                     |                     dIddJt          dK                     |                     dLdMdNt          dO          P           |                     dQdRddSdTt          dU          ,           |                                 }|                    dVddWt          dX                     |                    dYdZdd[t          d\                     |                     d]d^dd_t          d`                     |                     dadbddct          dd                     |                     dedfddgt          dh                     |                     didjddt          dk                     |                     dldmddnt          do                     |                     t          dp                    }|                    dqdrdsdtt          du          v           t          D ]2}|                    dw| dxdy| dst          dz          |z  {           3|                     t          d|                    }|                    d}d~ddt          d                     | S )NzH%(prog)s [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN, ...]z:For more information, visit <https://www.sphinx-doc.org/>.aE  
Look recursively in <MODULE_PATH> for Python modules and packages and create
one reST file with automodule directives per package in the <OUTPUT_PATH>.

The <EXCLUDE_PATTERN>s can be file and/or directory patterns that will be
excluded from generation.

Note: By default this script will not overwrite already created files.)usageepilogdescriptionz	--versionversionshow_versionz	%(prog)s )actiondestr   module_pathzpath to module to document)helpexclude_pattern*zGfnmatch-style file and/or directory patterns to exclude from generation)nargsr   z-oz--output-dirstoredest_dirTzdirectory to place all output)r   r   requiredr   z-q
store_truequietz,no output on stdout, just warnings on stderr)r   r   r   z-dz
--maxdepth	max_depth   z;maximum depth of submodules to show in the TOC (default: 4))r   r   typedefaultr   z-fz--forceforcezoverwrite existing filesz-lz--follow-linksfollow_linksFzNfollow symbolic links. Powerful when combined with collective.recipe.omelette.)r   r   r(   r   z-nz	--dry-rundry_runz%run the script without creating filesz-ez
--separateseparate_modulesz1put documentation for each module on its own pagez-Pz	--privateinclude_privatezinclude "_private" modulesz	--tocfiletoc_filemodulesz0filename of table of contents (default: modules)z-Tz--no-tocstore_falsez%don't create a table of contents filez-Ez--no-headingsno_headingszedon't create headings for the module/package packages (e.g. when the docstrings already contain them)z-Mz--module-firstmodule_firstz7put module documentation before submodule documentationz--implicit-namespacesimplicit_namespaceszNinterpret module paths according to PEP-0420 implicit namespaces specificationz--automodule-optionsautomodule_options z_Comma-separated list of options to pass to automodule directive (or use SPHINX_APIDOC_OPTIONS).)r   r(   r   z-sz--suffixsuffixrstzfile suffix (default: rst)z--remove-old
remove_oldzERemove existing files in the output directory that were not generatedz-Fz--fullfullz.generate a full project with sphinx-quickstartz-az--append-syspathappend_syspathz9append module_path to sys.path, used when --full is givenz-Hz--doc-projectheaderz(project name (default: root module name)z-Az--doc-authorauthorz,project author(s), used when --full is givenz-Vz--doc-versionz*project version, used when --full is givenz-Rz--doc-releasereleasezEproject release, used when --full is given, defaults to --doc-versionzextension optionsz--extensionsr   
extensionsappendz6enable arbitrary extensions, used when --full is given)metavarr   r   r   z--ext-append_constzsphinx.ext.z.enable %s extension, used when --full is given)r   constr   r   zProject templatingz-tz--templatedirTEMPLATEDIRtemplate_dirz%template directory for template files)r@   r   r   )	argparseArgumentParserr   add_argumentr   intadd_mutually_exclusive_groupadd_argument_groupr   )parserexclusive_groupgroupexts       V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx/ext/apidoc/_cli.py
get_parserrP      s   $XNOO J K K  F 1/11	     B/K,L,LMMM
U
 
     /00     >??	     MNN     *++     \
 
  	 	 	 788     CDD     ,--     BCC     788     
 
  
 
 
 IJJ     "\
 
	     !.
 
	     ,--     99;;O  S
 
	 !      @AA !    KLL     :;;     >??     <==     S
 
     %%b)<&=&=>>E	HII      
 
SNN!%%%DEEK 	 	
 	
 	
 	
 %%b)=&>&>??E	788     M     argvSequence[str]rH   c               <   t          j        t           j        d           t          j                                          t          |           }|j        }t          d t          	                    |j
                  D                       }t          ||||j                  \  }}|j        rt          ||           n6|j        r/|                    t#          |||j        |j                             |j        r"|j        st)          ||j        |j                   dS )zRun the apidoc CLI.r5   c           
   3     K   | ]V}t          j        t          j        t	          t          |                                                                        V  Wd S )N)recompilefnmatch	translatestrr   resolve).0excludes     rO   	<genexpr>zmain.<locals>.<genexpr>  se         	
7$Sg)>)>)@)@%A%ABBCC     rQ   )r/   r   )locale	setlocaleLC_ALLsphinxinit_console_parse_argsr   tupledictfromkeysr   r	   rD   r9   _full_quickstartr.   r?   r   r8   r+   r   r!   r6   )rS   optsrootpathexcludeswritten_filesr/   s         rO   mainrn      s!   
V]B'''
M   tDH  }}T%9::    H
 *(HdDDUVVM7y 
w/////	 
#GT4=$BSTT	
 	
 	
  Et| E-DDD1rQ   r   c                  t                      }|                    | pt          j        dd                    }t	          |j                                                  x|_        }t	          |j                  |_        |                                s1t          j
        t          d          |           t          d          |j        |j        |_        |j                            d          |_        |j        st%          |j                   |j        st)                      |_        nFt+          |j        t,                    r,t)          |j                            d                    |_        t1          di |j        S )N   z%s is not a directory..,rR   )rP   
parse_argssysrS   r   r   r\   r!   is_dirr
   errorr   
SystemExitr;   namer6   removeprefixr+   r   r4   	frozenset
isinstancer[   splitr   __dict__)rS   rK   args	root_paths       rO   re   re     sI   \\FT1SXabb\22D $((8#9#9#A#A#C#CCDy''DM R0119===mm{n+**3//DK< !$-   " P"+++	D+S	1	1 P"+D,C,I,I#,N,N"O"O))4=)))rQ   rj   r/   	list[str]Nonec              8   ddl m} |                                 d}d}|D ]&}|                    |dz             r|}|d| dz  }'i dt	          | j                  dd	d
dd| j        d| j        pdd| j        pdd| j	        p| j        pddd| j
        z   dddddg dddddddd| j        d|ddt	          | j                  | j        d}| j        r |d                             | j                   | j        rd|d <   |d         d d          D ]O}d!|v rI|d                             |           |d                             |                    d!                     P| j        s%|                    |d| j        | j        "           d S d S )#Nr   )
quickstartr5   rq   z   
pathsepFdot_projectr<   Authorr   r=   r6   masterindexepubTr>   )zsphinx.ext.autodoczsphinx.ext.viewcodezsphinx.ext.todomakefile	batchfile	make_modemastertocmaxdepthmastertoctreelanguageen)r   r:   r$   rr   )silent	overwritetemplatedir)
sphinx.cmdr   sort
startswithr[   r!   r;   r<   r   r=   r6   r%   r   r:   r>   extendr$   remover|   r+   generater)   rD   )rj   r/   qsprev_moduletextmoduledrN   s           rO   ri   ri   5  s|   ++++++LLNNNKD ! ![3.// 	 f    DM""u 	s 	4;	
 	$+) 	4<%2 	4<54<52 	## 	' 	 	 
 
 
  	D!" 	T#$ 	T%& 	T^'( 	)* 	D+, 4+,,-/  A2  0	,t///z '
qqq! 3 3#::lO""3'''lO""399S>>222< Y
AddjdFWXXXXXY YrQ   )r   r   )rR   )rS   rT   r   rH   )rS   rT   r   r   )rj   r   r/   r   r   r   )!
__future__r   rE   rY   r`   rW   rt   pathlibr   typingr   sphinx.localerc   r   sphinx.cmd.quickstartr   sphinx.ext.apidoc._generater   r	   sphinx.ext.apidoc._sharedr
   r   r   r   sphinx.util.osutilr   collections.abcr   r   rP   rn   re   ri   rR   rQ   rO   <module>r      s   " " " " " "    				 



                       & & & & & & , , , , , , M M M M M M M M N N N N N N N N N N       ( ( ( ( ( ( ((((((d d d dN    6* * * *6/Y /Y /Y /Y /Y /YrQ   