
    _Og                        S r SSKrSSKrSSKrSSKrSSKJr  \R                  (       a  SSK	J
r
   " S S5      r " S S\R                  5      r\" S	S
/\R                  S9 " S S\5      5       r " S S\5      r " S S\R                  5      r " S S\R                  5      r\" SS
/\R                  S9 " S S\5      5       r\" SS
/\R                  S9 " S S\5      5       r " S S\5      r " S S\5      r " S S\R                  5      r " S  S!\R                  5      r\" S"S
/\R                  S9 " S# S$\5      5       rg)%z
This module defines the interfaces that can to be implemented for
Pydoc-Markdown to implement custom loaders for documentation data,
processors or renderers.
    N)Union)ApiSuitec                   *    \ rS rSrSrS\SS4S jrSrg)Context'   z>
Context data that is passed to plugins when they are loaded.
	directoryreturnNc                     Xl         g Nr   )selfr   s     ^/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/pydoc_markdown/interfaces.py__init__Context.__init__,   s    "    r   )__name__
__module____qualname____firstlineno____doc__strr   __static_attributes__ r   r   r   r   '   s    ## #$ #r   r   c                   &    \ rS rSrS\SS4S jrSrg)
PluginBase0   contextr	   Nc                     g r   r   )r   r   s     r   initPluginBase.init1       r   r   )r   r   r   r   r   r   r   r   r   r   r   r   0   s    G  r   r   z!!pydoc_markdown.interfaces.Loaderz<import>)stylec                   r    \ rS rSrSr\R                  S\R                  \	R                     4S j5       rSrg)Loader5   z
This interface describes an object that is capable of loading documentation
data. The location from which the documentation is loaded must be defined
with the configuration class.
r	   c                     g r   r   r   s    r   loadLoader.loadC       r   r   N)r   r   r   r   r   abcabstractmethodtIterabledocspecModuler(   r   r   r   r   r$   r$   5   s5     	ajj0  r   r$   c                       \ rS rSrSrg)LoaderErrorH   r   N)r   r   r   r   r   r   r   r   r2   r2   H   s    r   r2   c                   z    \ rS rSrSr\R                  S\R                  S\	S\
R                  \	   4S j5       rSrg)	ResolverL   zV
A resolver can be used by a #Processor to replace cross references with a hyperlink.
scoperefr	   c                     g r   r   )r   r7   r8   s      r   resolve_refResolver.resolve_refQ   r*   r   r   N)r   r   r   r   r   r+   r,   r/   	ApiObjectr   r-   Optionalr:   r   r   r   r   r5   r5   L   sD     	!2!2  C  r   r5   c            
           \ rS rSrSr\R                  SSS\R                  S\	S\
R                  \R                     4S j5       rS	rg
)
ResolverV2V   zNew style interface for resolving based on a text ref from in the context of a #docspec.ApiObject
to find another. This is different from #Resolver because it returns the resolved object directly, instead
of some string representation of it.
suiter   r7   r8   r	   c                     g r   r   )r   rA   r7   r8   s       r   resolve_referenceResolverV2.resolve_reference\   r*   r   r   N)r   r   r   r   r   r+   r,   r/   r<   r   r-   r=   rC   r   r   r   r   r?   r?   V   sW    
 	z ':K:K RU Z[ZdZdelevevZw  r   r?   z$!pydoc_markdown.interfaces.Processorc                       \ rS rSrSr\R                  S\R                  \	R                     S\R                  \   SS4S j5       rSrg)		Processora   z
A processor is an object that takes a list of #docspec.Module#s as an input and
transforms it in an arbitrary way. This usually processes docstrings to convert from
various documentation syntaxes to plain Markdown.
modulesresolverr	   Nc                     g r   r   r   rH   rI   s      r   processProcessor.processo   r*   r   r   )r   r   r   r   r   r+   r,   r-   Listr/   r0   r=   r5   rL   r   r   r   r   rF   rF   a   sM     	qvvgnn5 HAU Z^  r   rF   z#!pydoc_markdown.interfaces.Rendererc                   .   \ rS rSrSrS\R                  \R                     S\R                  \
   SS4S jrS\R                  \R                     S\R                  \
   4S jr\R                  S\R                  \R                     SS4S	 j5       rS
rg)Renderert   a   
A renderer is an object that takes a list of #docspec.Module#s as an input and produces
output files or writes to stdout. It may also expose additional command-line arguments.
There can only be one renderer at the end of the processor chain.

Note that sometimes a renderer may need to perform some processing before the render step.
To keep the possibility open that a renderer may implement generic processing that could
used without the actual rendering functionality, #Renderer is a subclass of #Processor.
rH   rI   r	   Nc                     g r   r   rK   s      r   rL   Renderer.process   r!   r   c                     g r   r   r   rH   s     r   get_resolverRenderer.get_resolver   s    r   c                     g r   r   rU   s     r   renderRenderer.render   r*   r   r   )r   r   r   r   r   r-   rN   r/   r0   r=   r5   rL   rV   r+   r,   rY   r   r   r   r   rP   rP   t   s    qvvgnn5 HAU Z^ AFF7>>$: qzz(?S  	affW^^4   r   rP   c            
           \ rS rSrSr\R                   S
S\R                  S\R                  \
R                     S\R                  \   SS4S jj5       rS	rg)SinglePageRenderer   z(
Interface for rendering a single page.
NfprH   
page_titler	   c                     g r   r   )r   r^   rH   r_   s       r   render_single_page%SinglePageRenderer.render_single_page   s     	r   r   r   )r   r   r   r   r   r+   r,   r-   TextIOrN   r/   r0   r=   r   ra   r   r   r   r   r\   r\      s^     	[_((%&VVGNN%;IJTW	 r   r\   c            	           \ rS rSrSr\R                  S\R                  S\	R                  S\R                  \\R                  4   SS4S j5       rS	rg)
SingleObjectRenderer   z6
Interface for rendering a single #docspec.ApiObject.
r^   objoptionsr	   Nc                     g r   r   )r   r^   rg   rh   s       r   render_object"SingleObjectRenderer.render_object   r*   r   r   )r   r   r   r   r   r+   r,   r-   rc   r/   r<   Dictr   Anyrj   r   r   r   r   re   re      s^     	 w/@/@ 166RUWXW\W\R\K] bf  r   re   c                       \ rS rSrSr\R                  S\4S j5       r\R                  S\	R                  4S j5       rS\	R                  S\	R                  4S jrSrg	)
Server   a%  
This interface describes an object that can start a server process for
live-viewing generated documentation in the browser. #Renderer
implementations may additionally implement this interface to advocate their
compatibility with the `--server` and `--open` options of the pydoc-markdown
CLI.
r	   c                     g r   r   r'   s    r   get_server_urlServer.get_server_url   r*   r   c                     g r   r   r'   s    r   start_serverServer.start_server   r*   r   rL   c                     U$ )a  
Called when the files generated by pydoc-markdown have been updated.
This gives the implementation a chance to reload the server process.
The default implementation returns the *process* unchanged. Returning
#None will automatically call #start_server() afterwards.
r   )r   rL   s     r   reload_serverServer.reload_server   s	     r   r   N)r   r   r   r   r   r+   r,   r   rr   
subprocessPopenru   rx   r   r   r   r   ro   ro      sn     	   	j..  Z%5%5 *:J:J r   ro   c                   H    \ rS rSrSr\R                  S\SS4S j5       rSr	g)Builder   z
This interface can be implemented additionally to the #Renderer interface to
indicate that the renderer supports building another produce after the markdown
files have been rendered.
site_dirr	   Nc                     g)z
Invoke the build. The *site_dir* is the directory in which the output files should be
placed. Otherwise, the directory may be determined by the builder.
Nr   )r   r   s     r   buildBuilder.build   s    r   r   )
r   r   r   r   r   r+   r,   r   r   r   r   r   r   r}   r}      s/     	c d  r   r}   z'!pydoc_markdown.interfaces.SourceLinkerc                   v    \ rS rSrSr\R                  S\R                  S\	R                  \   4S j5       rSrg)SourceLinker   z
This interface is used to determine the URL to the source of an API object. Renderers
can use it to place a link to the source in the generated documentation.
rg   r	   c                     g r   r   )r   rg   s     r   get_source_urlSourceLinker.get_source_url   r*   r   r   N)r   r   r   r   r   r+   r,   r/   r<   r-   r=   r   r   r   r   r   r   r   r      s=    
 	'"3"3 

3  r   r   )r   r+   rz   typingr-   r/   databind.corer   TYPE_CHECKINGpydoc_markdown.util.docspecr   r   ABCr   FLATr$   	Exceptionr2   r5   r?   rF   rP   r\   re   ro   r}   r   r   r   r   <module>r      ss  ,     ??4# # 
 + **	Z 			) 	sww   . **	
 		 - **z ,	 	: SWW 8cgg  1 **: r   