
    _Og66                    N   S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSK	J
r
  SSKrSSKrSSKJr  SSKJr  SSKJr  SSKJrJrJr  SS	KJr  SS
KJr  SSKJrJr  SSKJr  / SQr Sr!\RD                  " \#5      r$ " S S5      r%SIS jr&\RN                  " \ S9\RP                  " SSS9\RR                  " \5      \RT                  " S\RV                  " / SQ5      SS9\RT                  " SSSSS9\RT                  " SS SS!S9\RT                  " S"S#S$S%SS&\!-   S'9\RT                  " S(S)S*S+SS,\!-   S'9\RT                  " S-S.S/SS0\!-   S'9\RT                  " S1S2SS3\!-   S49\RT                  " S5SS6S49\RT                  " S7S8SS9S:9\RT                  " S;S<S=SS>S:9\RT                  " S?SS@S:9\RT                  " SASSBS49\RT                  " SCSSDS:9\RT                  " SESFS9SG 5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       r,\#SH:X  a  \," 5         gg)Ja  
Pydoc-Markdown is a renderer for Python API documentation in Markdown format.

With no arguments it will load the default configuration file. If the
*config* argument is specified, it must be the name of a configuration file
or a YAML formatted object for the configuration.
    )annotationsN)Path)convert_dataclass_to_schema)dump_module)ClassTypeHint)PydocMarkdown__version__static)PythonLoader)MarkdownRenderer)ContextServer)watch_paths)zpydoc-markdown.ymlzpydoc-markdown.yamlzpyproject.tomlzFUsing this option will disable loading the default configuration file.c                      \ rS rSrSr     S             SS jjrSS jrSS jrSS jrSS jr	SSS	 jjr
S
rg)RenderSession8   zm
Helper class to load the Pydoc-markdown configuration from a file, apply
overrides and invoke the renderer.
Nc                L    Xl         X l        X0l        X@l        XPl        X`l        g Nconfig
render_tocsearch_pathmodulespackagespy2)selfr   r   r   r   r   r   s          X/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/pydoc_markdown/main.py__init__RenderSession.__init__>   s#     $&     c                :   U R                   (       d/  U R                  (       d  U R                  (       d  U R                  b  [	        S UR
                   5       S5      nU(       d  [        S5        U R                   (       a  U R                   Ul         U R                  (       a  U R                  Ul        U R                  (       a  U R                  Ul        U R                  b   U R                  (       + UR                  l        U R                  Gb  [        [        UR                  5      5      R                  R                  5        H\  u  p4[        UR                   ["        5      (       d  M&  UR                   R                  [$        :X  d  MF  ['        UR                  U5      n  Oe   [        UR                  [$        5      (       a  UR                  nO7[        SR)                  [        UR                  5      R*                  5      5        U R                  Wl	        gg)z)
Applies overrides to the configuration.
Nc              3  T   #    U  H  n[        U[        5      (       d  M  Uv   M      g 7fr   )
isinstancer   ).0ls     r   	<genexpr>1RenderSession._apply_overrides.<locals>.<genexpr>U   s     Tn
1l8S11ns   (	(zno python loader foundz0renderer {!r} does not expose a MarkdownRenderer)r   r   r   r   nextloaderserrorparserprint_functionr   r   typerendererfieldsitemsr#   datatyper   r   getattrformat__name__)r   r   loader
field_namefieldmarkdowns         r   _apply_overridesRenderSession._apply_overridesN   s\    <<4==D,<,<@TTfnnTVZ[F./||!%}}"&--%)%5%5"xx#3788|,??&%@fooAV%W%^%^%d%d%f!
ennm<<ATATXhAh18*1UH &g
 foo/?@@%HLSSTXY_YhYhTiTrTrst"&//H 'r    c           	     
   [        5       nU R                  (       a  UR                  U R                  5        U R                  U5        [	        U R                  [
        5      (       a\  UR                  [        [        R                  R                  [        R                  R                  U R                  5      5      S95        UR                  (       a/  [        R                  SSR                  UR                  5      5        U$ )z4
Loads the configuration and applies the overrides.
)	directoryz"Unknown configuration options:
%s
z
------
)r   r   load_configr9   r#   strinitr   ospathdirnameabspathunknown_fieldsloggerwarningjoin)r   r   s     r   loadRenderSession.loadn   s    
 ;;t{{+f%dkk3''KK"''//"''//$++:V*WXY  NNA<CTCTU[UjUjCklr    c                   UR                  5       nUR                  U5        UR                  U5        [        S U 5       5      n[	        U R
                  [        5      (       a  UR                  U R
                  5        [        U5      $ )zG
Kicks off the rendering process and returns a list of files to watch.
c              3  L   #    U  H  oR                   R                  v   M     g 7fr   )locationfilename)r$   ms     r   r&   'RenderSession.render.<locals>.<genexpr>   s     ?w!**--ws   "$)	load_modulesprocessrendersetr#   r   r>   addlist)r   r   r   watch_filess       r   rR   RenderSession.render   sf    
 %%'wg?w??dkk3''OODKK(K  r    c                &    UR                  U5        g r   )build)r   r   site_dirs      r   rY   RenderSession.build   s    Xr    c                `   [        UR                  [        5      (       d7  [        SR	                  [        UR                  5      R                  5      5        Su  p4n/ n  U(       a  UR                  5       (       a  U(       a  U R                  5       n[        R                  S5        U R                  U5      nU(       a  UR                  5         [        U5      u  p4U(       a  UR                  R                  U5      nUcf  [        R                  S5        UR                  R                  5       nU(       a0  Sn[         R"                  " UR                  R%                  5       5        UR'                  S5        GM  ! U(       a  UR                  5         U(       a  UR)                  5         f f = f)z{
Watches files for changes and (re-) starts a server process that
serves an HTML page from the renderer output on the fly.
z*renderer {!r} cannot be used with --server)NNNz
Rendering.zStarting MkDocs serve.Fg      ?)r#   r.   r   r*   r3   r-   r4   is_setrH   rE   inforR   stopr   reload_serverstart_server
webbrowseropenget_server_urlwait	terminate)r   r   open_browserobservereventrQ   rV   s          r   
run_serverRenderSession.run_server   s.    &//622>EEd6??F[FdFdef#3 	$!%KK-"&++f"5K &1+&>OH"(//"?"?"H ?KK 89$oo::<G#',"(F(F(HI

3+ . !!# s   DE< <1F-)r   r   r   r   r   r   )NNNNN)r   zt.Union[None, dict, str]r   bool | Noner   t.List[str] | Noner   rm   r   rm   r   rl   returnNone)r   r   )rn   r   )r   r   rn   zt.List[str])r   r   rZ   r>   rn   ro   )F)r   r   rg   bool)r4   
__module____qualname____firstlineno____doc__r   r9   rH   rR   rY   rj   __static_attributes__ r    r   r   r   8   s     #'*.&*'+(   (	
 $ %  
 2@$!'$ '$r    r   c                 j    [        S/U Q7S[        R                  06  [        R                  " S5        g )Nzerror:file   )printsysstderrexit)argss    r   r*   r*      s#    	(+T+

+HHQKr    )helpr   F)requiredz--bootstrap)basemkdocshugoreadthedocs
docusauruszLCreate a Pydoc-Markdown configuration file in the current working directory.)r-   r   z	--verbosez-vTzIncrease log verbosity.)countr   z--quietz-qzDecrease the log verbosity.z--modulez-mr   MODULEzZThe module to parse and generated API documentation for. Can be specified multiple times. )metavarmultipler   z	--packagez-pr   PACKAGEzThe package to parse and generated API documentation for including all sub-packages and -modules. Can be specified multiple times. z--search-pathz-IPATHzVA directory to use in the search for Python modules. Can be specified multiple times. z--py2/--py3r   zSwitch between parsing Python 2 and Python 3 code. The default is Python 3. Using --py2 will enable parsing code that uses the "print" statement. This is equivalent of setting the print_function option of the "python" loader to False. )defaultr   z--render-toc/--no-render-toczCEnable/disable the rendering of the TOC in the "markdown" renderer.z--serverz-szWatch for file changes and re-render if needed and start the server for the configured renderer. This doesn't work for all renderers.)is_flagr   z--openz-org   z<Open the browser after starting the server with -s,--server.z--dumpzODump the loaded modules in Docspec JSON format to stdout, after the processors.z&--with-processors/--without-processorsz,Enable/disable processors. Only with --dump.z--buildzInvoke a build after the Markdown files are produced. Note that some renderers may not support this option (e.g. the "markdown" renderer).z
--site-dirz,Set the output directory when using --build.c           	        Ub  U(       d  [        S5        U
(       a  U	(       d  [        S5        U	(       a  U(       a  [        S5        U(       a  U(       d  [        S5        U(       Ga  U (       dI  U(       dB  U(       d;  U(       d4  U(       d-  U(       d&  U	(       d  U
(       d  U(       d  Uc  U(       d  U(       a  [        S5        US:X  a  [        R                   HC  n[        R                  R                  U5      (       d  M)  [        SR                  U5      5        ME     [        R                  R                  5        H[  u  nn[        U5      R                  R                  S	S	S
9  [        US5       nUR                  U5        SSS5        [        SU5        M]     g[        S [         5       S5      nU(       a  [        SR                  U5      5        [        S   n[        R                   [        R"                  [        R$                  [        R&                  S.n[        US5       nUR                  UU   5        SSS5        [        SU5        g[)        XEXhSL45      (       + nX#-
  nUS:  a  [*        R,                  nO^US:  a  [*        R.                  nOGUS:  a  [*        R0                  nO0US:  a  [*        R2                  nOUS:  a  [*        R4                  nOSn[*        R6                  " SUS9  U (       a@  U R9                  5       R;                  S5      (       d  SU ;   a  [<        R>                  " U 5      n U c  U(       a   [        S [         5       5      n [C        XXdXXS9nURE                  5       nU(       ab  URG                  5       nUb  US	L a  URI                  U5        U H  n[K        U[L        RN                  5        M     [L        RP                  " S5        U	(       a  URS                  UU
5        gURU                  U5        U(       a  URW                  UU5        gg! , (       d  f       GN= f! , (       d  f       GN= f! [@         a    [        S5         GNf = f)z-
Command-line entrypoint for Pydoc-Markdown.
NzC--with-processors/--without-processors can only be used with --dumpz%--open can only be used with --serverz---server and --build are incompatible optionsz(--site-dir can only be used with --buildz+--bootstrap must be used as a sole argumentr   zfile already exists: {!r}T)exist_okparentswcreatedc              3  r   #    U  H-  n[         R                  R                  U5      (       d  M)  Uv   M/     g 7fr   )r@   rA   isfiler$   xs     r   r&   cli.<locals>.<genexpr>D  s$     !S-=PQAR!!-=   (7	7r   )r   r   r   r      ry   z'[%(levelname)s - %(name)s]: %(message)s)r3   level{
c              3  r   #    U  H-  n[         R                  R                  U5      (       d  M)  Uv   M/     g 7fr   )r@   rA   existsr   s     r   r&   r   k  s#     L&6"''..:K11&6r   zconfig file not found.r   ),r*   r
   READTHEDOCS_FILESr@   rA   r   r3   r0   r   parentmkdirrc   writerz   r(   config_filenamesDEFAULT_CONFIGDEFAULT_MKDOCS_CONFIGDEFAULT_HUGO_CONFIGDEFAULT_DOCUSAURUS_CONFIGanyloggingDEBUGINFOWARNINGERRORCRITICALbasicConfiglstrip
startswithyaml	safe_loadStopIterationr   rH   rP   rQ   r   r{   stdoutr}   rj   rR   rY   )r   	bootstrapverbosequietr   r   r   r   r   serverrg   dumpwith_processorsrY   rZ   rM   contentfpexisting_filesourceload_implicit_config	verbosityr   sessionpydocmdmodules                             r   clir      sT   | "4STF56%=>89*?@%"4477>>(++5<<XFG 5 &,%=%=%C%C%E!'X%%++T4+H(C(BHHW% )i*	 &F* 	 !!S-=!SUYZM188GH'*H-- 6622$>>	F h$	*+ %)X&"G{tO#TUU IA~	a	a	b	b  HPUV 6==?--c22dfn'~.	,L&6LMF +aiG llnG&&("o&=OOG$F

+ 7L1wMM'8, E )( %$<  	,*+	,s*   4P)+P;	Q )
P8	;
Q
Q&%Q&__main__)rn   z
t.NoReturn)-rt   
__future__r   r   r@   r{   typingtrb   pathlibr   clickr   databind.corer   docspecr   typeapir   pydoc_markdownr   r	   r
   %pydoc_markdown.contrib.loaders.pythonr   )pydoc_markdown.contrib.renderers.markdownr   pydoc_markdown.interfacesr   r   pydoc_markdown.util.watchdogr   r   default_config_notice	getLoggerr4   rE   r   r*   commandargumentversion_optionoptionChoicer   rv   r    r   <module>r      s  , #  	 
      5  ! = = > F 5 4R ` 			8	$A$ A$H
 G5)k"	M	N	W
 k4t2KLiT0MN
!#8
9 
GI^
_ 
!#8
9 	
/ 2G
G	 "	N
 
H	 dND7u d!r ,dAo 
> l!OPx- Q O M # * Rx-v zE r    