
    Kin                       d Z ddlmZ dZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZmZmZmZmZ dd	lmZmZ dd
lmZmZmZ ddlmZmZ ddlmZ dZerddlmZ d(d)dZ  G d de      Z! G d de      Z" G d de      Z# G d de      Z$ G d de      Z% G d de      Z& G d de      Z' G d de      Z( G d  d!ejR                        Z* G d" d#e      Z+ G d$ d%e      Z, G d& d'e      Z-y)*zMiscellaneous directives.    )annotationsreStructuredTextN)Path)urlopen)URLError)frontendionodesstatemachineutils)	Directiveconvert_directive_function)
directivesrolesstates)	CodeBlockNumberLines)miscF)StrPathc                    |r"| j                  d      rt        |      }| dd  } nt        |      j                  }t        j                  d || z        S )N/   )
startswithr   parentr   relative_path)pathsourceroot_prefixbases       p/home/jay/workspace/scripts/.codegraph-venv/lib/python3.12/site-packages/docutils/parsers/rst/directives/misc.py
adapt_pathr!      sM    
 ts+K ABxF|""tT$Y//    c                  j   e Zd ZdZdZdZdZej                  ej                  ej                  ej                  eeeej                  ej                   ej                  de      ej                  ej                  dZ eej&                        j(                  dz  ZddZdd	Zdd
ZddZddZddZy)Includea  
    Include content read from a separate source file.

    Content may be parsed by the parser, or included as a literal
    block.  The encoding of the included file can be specified.  Only
    a part of the given file argument may be included by specifying
    start and end line or text to match before and/or after the text
    to be used.

    https://docutils.sourceforge.io/docs/ref/rst/directives.html#include
    r   r   TN)literalcodeencodingparser	tab-width
start-lineend-linestart-after
end-beforenumber-linesclassnameincludec                    | j                   j                  j                  x| _        }|j                  s| j	                  d| j
                  z        | j                  j                  d|j                        | _        | j                  j                  dd      | j                  j                  dd      | j                  j                  dd      | j                  j                  dd      f| _	        t        j                  | j                  d	         }|j                  d
      r&|j                  d      rd|dd z   }| j                  }n|j                   }t#        || j                   j                  j$                  |      }|| j                  d<   | j'                  |      }d| j                  v r| j)                  |      S d| j                  v r| j+                  |      S d| j                  v r| j-                  |      S | j/                  |       g S )zInclude a file as part of the content of this reST file.

        Depending on the options, the file content (or a clipping) is
        converted to nodes and returned or inserted into the input stream.
        "%s" directive disabled.r*   r+   Nr,   r-    r.   r   <>r   r   r   r&   r'   r)   )statedocumentsettingsfile_insertion_enabledwarningr1   optionsget	tab_widthclip_optionsr   r   	argumentsr   endswithstandard_include_pathr   r!   current_source	read_fileas_literal_blockas_code_blockcustom_parseinsert_into_input_lines)selfr;   r   r   inputstrings        r    runzInclude.runK   s    $(::#6#6#?#??..,,9DIIEFF))+x7I7IJ!\\--lDA!\\--j$?!\\--mR@!\\--lB?A t~~a01??3DMM#$6a#D44K"..K$**--<<%' "&XnnT*$((55T\\!%%k22t||#$$[11$$[1	r"   c           	        | j                   j                  d| j                  j                        }| j                  j                  }	 t        j                  |||      }| j                  j                  j                  |       	 |j                         }| j                   \  }}}	}
|s|$|j#                         }dj%                  |||       }|	rF|j'                  |	      }|dk  r| j                  d| j                   d      ||t)        |	      z   d }|
r:|j'                  |
      }|dk  r| j                  d| j                   d      |d| }|S # t        $ r# | j                  d| j                   d| d      t        $ r:}| j                  d| j                   dt        j                  |       d      d}~ww xY w# t        $ r:}| j                  d	| j                   d
t        j                  |      z         d}~ww xY w)zQRead text file at `path`. Clip and return content.

        Provisional.
        r(   source_pathr(   error_handlerProblems with "z1" directive path:
Cannot encode input file path "z" (wrong locale?)." directive path:
.NProblem with "" directive:

r   z&Problem with "start-after" option of "z" directive:
Text not found.z%Problem with "end-before" option of ")r>   r?   r;   input_encodinginput_encoding_error_handlerr	   	FileInputrecord_dependenciesaddUnicodeEncodeErrorseverer1   OSErrorerror_stringreadUnicodeErrorrA   
splitlinesjoinfindlen)rK   r   r(   rQ   include_fileerrortext	startlineendline	starttextendtextlinesafter_indexbefore_indexs                 r    rF   zInclude.read_fileo   s-   
 <<##J0L0LMBB	8<<D196CEL MM--11$7	8$$&D
 261B1B.	7Iw,OO%E99U9W56D ))I.KQkk #&&*ii[0M#O P Pc)n456D99W-Lakk #&&*ii[0M#O P P&DG " 	2++		{ ;@@Dv F11 2 2  	<++		{:M!#!7 8; < <	<  	8++tyykH " 67 8 8	8s0   E G 3G5F==G	H5HHc                   | j                   d   }| j                  dk\  r|j                  | j                        }t        j                  d|| j                   j                  dg             }||_        | j                   j                  dd      dz   |_        | j                  |       d| j                   v r| j                   d   xs d}|j                  d	      }|t        |j                               z   }t        g |fg||      }|D ];  \  }}|r|t        j                  d||
      z  }$|t        j                  |      z  }= |gS |t        j                  |      z  }|gS )zOReturn list with literal_block containing `text`.

        Provisional
        r   r   r5   r0   )r   classesr+   r   r/   rW   )rr   )r>   r@   
expandtabsr
   literal_blockr?   r   lineadd_nameremovesuffixrf   rc   r   inlineText)	rK   ri   r   rt   	firstlinelastlinetokensrr   values	            r    rG   zInclude.as_literal_block   sK   
 h'>>Q??4>>2D++vt||'7'7'DF%!\\--lA>Bm$T\\)^49I$$T*D 3t'8#99H 2t*y(CF"( 7!U\\"eW%MMM!UZZ%66M	7  UZZ--Mr"   c                |   | j                   dk\  r|j                  | j                         }t        | j                  | j                  j                  d      g| j                  |j                  d      g| j                  | j                  | j                  | j                  | j                  	      }|j                         S )zNPass `text` to the `CodeBlock` directive class.

        Provisional.
        r   r'   rW   )r@   rs   r   r1   r>   poprw   linenocontent_offset
block_textr9   state_machinerM   )rK   ri   	codeblocks      r    rH   zInclude.as_code_block   s     >>Q??4>>2Ddii#||//78"ll#0067"kk"11"oo"jj"00	 	 }}r"   c                    | j                   d          }t        j                  |      }| j                  j                  j                         D ]  \  }}t        |||        | j                   d   |_        t        j                  |j                  |      }| j                  j                  j                  |_        | j                  j                  j                  |_        | j                  j                  j                  |_        | j                  j                  j                  |_        |j!                  ||       | j                  j                  j"                  j%                  |j"                         |j&                  j)                  |f       |j&                  j+                          | j                  j                  j,                  j%                  |j,                         |j.                  S )zParse with custom parser.

        Parse with ``self.options['parser']`` into a new (dummy) document,
        apply the parser's default transforms,
        return child elements.

        Provisional.
        r)   r   )r>   r   get_default_settingsr;   __dict__itemssetattr_sourcer   new_documentr9   r:   include_logidsnameids	nametypesparseparse_messagesextendtransformerpopulate_from_componentsapply_transformstransform_messageschildren)rK   ri   r)   r;   kvr:   s          r    rI   zInclude.custom_parse   sn    (h')008MM**002 	$DAqHa#	$<<1%%h&6&6A#zz22>>zz**..::..66!ZZ00::T8$

**11(2I2IJ55vi@--/

..55''	)   r"   c                N   | j                   d   }t        j                  || j                  d      }t	        |      D ]a  \  }}t        |      | j                  j                  kD  s)|dz   | j                   j                  dd      z   }| j                  d| d| d	       | j                  j                  j                  }|sGt        j                  d
| j                  j                  j                        }|j!                  |df       || j"                  f|v rHd t%        |      D        }	dj'                  |g|	      }
| j                  d| j(                   d|
       |j!                  || j"                  f       |dd| dgz  }| j*                  j-                  ||       y
)z\Insert file content into the rST input of the calling parser.

        Provisional.
        r   T)convert_whitespacer   r+   r   "z": line z exceeds the line-length-limit.N)NNr5   r5   c              3  &   K   | ]	  \  }}|  y wr%    ).0pthopts      r    	<genexpr>z2Include.insert_into_input_lines.<locals>.<genexpr>  s     HJS#CHs   z
> zcircular inclusion in "rV   r5   z.. end of inclusion from ")r>   r   string2linesr@   	enumeraterf   r;   line_length_limitr?   r=   r9   r:   r   r   r   rE   appendrA   reversedrd   r1   r   insert_input)rK   ri   r   	textlinesiru   line_nor   rE   source_chaininclusion_chains              r    rJ   zInclude.insert_into_input_lines   s   
 h' --dDNNAEG	 !+ 	:GAt4y4==:::a%$,,"2"2<"CCllQvhhwi @9 $9 : :	: jj))55"00 $djj&9&9&H&HJN0DEFD%%&+5H(;2GHL$kk6*AL*ABO,,!8 D//>.? A B BFD$5$567b6vha@AA	''	6:r"   N)returnlist)r   r   r   str)ri   r   r   zlist[nodes.literal_block])ri   r   r   r   )ri   r   r   None)__name__
__module____qualname____doc__required_argumentsoptional_argumentsfinal_argument_whitespacer   flag	unchangedr(   parser_nameintunchanged_requiredvalue_orclass_optionoption_specr   r   __file__r   rD   rM   rF   rG   rH   rI   rJ   r   r"   r    r$   r$   *   s    
  $(oo%//)22'33 #!$"","?"?!+!>!>#6:#6#6w#D&33%//1K !1889D"H.`8(!:;r"   r$   c                      e Zd ZdZdZdZdZej                  ej                  ej                  ej                  dZdZd Zy)Rawz
    Pass through content unchanged

    Content is included in output based on type argument

    Content may be included inline (content section of directive) or
    imported from a file or url.
    r   r   T)fileurlr(   r0   c                0   | j                   j                  j                  }|j                  r(|j                  s:d| j
                  v sd| j
                  v r| j                  d| j                  z        ddj                  | j                  d   j                         j                               i}| j
                  j                  d|j                        }|j                  }| j                  rWd| j
                  v sd| j
                  v r| j!                  d| j                  z        d	j                  | j                        }n>d| j
                  v rd| j
                  v r| j!                  d
| j                  z        t#        | j
                  d   | j                   j                  j$                  |j&                        }	 t)        j*                  |||      }|j,                  j/                  |       	 |j7                         }||d<   nwd| j
                  v rY| j
                  d   }		 t;        |	      j7                         }
t)        j>                  |
|	||      }	 |j7                         }|	|d<   n| jA                          tC        jD                  dfd| j
                  j                  dg       i|}| jF                  jI                  | jJ                        \  |_&        |_'        |gS # t0        $ r:}| j3                  d| j                   dt)        j4                  |       d      d }~ww xY w# t8        $ r:}| j3                  d| j                   dt)        j4                  |      z         d }~ww xY w# t<        t0        f$ rJ}| j3                  d| j                   d| j
                  d    dt)        j4                  |       d      d }~ww xY w# t8        $ r:}| j3                  d| j                   dt)        j4                  |      z         d }~ww xY w)Nr   r   r4   format r   r(   zF"%s" directive may not both specify an external file and have content.rW   zXThe "file" and "url" options may not be simultaneously specified for the "%s" directive.rO   rR   rS   rT   rU   rV   r   z" directive URL "z":
)r   rP   r(   rQ   r5   rr   r0   )(r9   r:   r;   raw_enabledr<   r>   r=   r1   rd   rB   lowersplitr?   rX   rY   contentrh   r!   rE   r   r	   rZ   r[   r\   r_   r^   r`   ra   rb   r   r   StringInputassert_has_contentr
   rawr   get_source_and_liner   r   ru   )rK   r;   
attributesr(   rQ   ri   r   raw_filerh   r   raw_textraw_nodes               r    rM   zRaw.run"  s   ::&&//$$33t||+u/D,,9DIIEFF):)@)@)B)H)H)J KL
<<##J0G0GH ==<<%$,,)>jj(*.))45 5 99T\\*Dt||#$jj8:>))DE E dll62"jj11@@&224D
7<<D196CE ,,006<}} $(Jx dll"\\%(F@"6?//1
 ~~X6/74ACH<}} $*Jx  ##%99R +t||/?/?/L +)+ ,,@@M		zK  GkkODII; ?,,.OOE,B+C1#F G GG   <kkN499+^"L$&OOE$:#; < << g& @kkODII; ?&&*ll5&9%:$%'__U%;$<A#? @ @@   <kkN499+^"L$&OOE$:#; < <<sa   K* 5L0 )M6 O *	L-35L((L-0	M395M..M36OAO

O	P5PPN)r   r   r   r   r   r   r   r   r   urir(   r   r   has_contentrM   r   r"   r    r   r     sO      $%??$..)22&335K K@r"   r   c                      e Zd ZdZd Zy)ReplaceTc                   t        | j                  t        j                        s| j	                  d| j
                  z        | j                          dj                  | j                        }t        j                  |      }| j                  j                  | j                  | j                  |       d }g }|D ]  }|st        |t        j                        r|}"t        |t        j                        rg |d<   |j                  |       S| j                   j	                  d| j
                   d| j"                        gc S  |r||j$                  z   S |S )NVInvalid context: the "%s" directive can only be used within a substitution definition.rW   backrefs
Error in "z1" directive: may contain a single paragraph only.ru   )
isinstancer9   r   SubstitutionDefrh   r1   r   rd   r   r
   Elementnested_parser   	paragraphsystem_messager   reporterr   r   )rK   ri   elementnodemessageselems         r    rM   zReplace.runi  s<   $**f&<&<=**-/3yy9: : 	!yy&--%

d.A.A '	)  
	GDJtU__=D%"6"67#%Z % MM''$TYYK 03 39= ( FG G
	G dmm++r"   Nr   r   r   r   rM   r   r"   r    r   r   e  s    Kr"   r   c                      e Zd ZdZdZdZdZej                  ej                  ej                  dZ	 e
j                  d      Zd Zy)	Unicodea{  
    Convert Unicode character codes (numbers) to characters.  Codes may be
    decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``,
    ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character
    entities (e.g. ``&#x262E;``).  Text following ".." is a comment and is
    ignored.  Spaces are ignored, and any other text remains as-is.
    r   r   T)trimltrimrtrimz( |\n|^)\.\. c           
        t        | j                  t        j                        s| j	                  d| j
                  z        | j                  j                  }d| j                  v rd|j                  d<   d|j                  d<   d| j                  v rd|j                  d<   d| j                  v rd|j                  d<   | j                  j                  | j                  d         d   j                         }t        j                         }|D ]0  }	 t        j                   |      }|t        j(                  |      z  }2 |j*                  S # t"        $ r/}| j	                  d|dt%        j&                  |            d }~ww xY w)	Nr   r   r   r   r   r   zInvalid character code: rW   )r   r9   r   r   rh   r1   r   r   r>   r   comment_patternr   rB   r
   r   r   unicode_code
ValueErrorr	   r`   ry   r   )rK   substitution_definitioncodesr   r'   decodedrh   s          r    rM   zUnicode.run  so   $**f&<&<=**-/3yy9: : #'"4"4"9"9T\\!:;#..w7:;#..w7dll":;#..w7dll":;#..w7$$**4>>!+<=a@FFH--/ 	+DC$11$7 uzz'**G	+ 	  Cjj$("//%*@"B C CCs   E	F*F  FN)r   r   r   r   r   r   r   r   r   r   recompiler   rM   r   r"   r    r   r     sO      $%??&OO&OO-K !bjj!12O r"   r   c                  &    e Zd ZdZdZdZdZdZd Zy)Classz
    Set a "class" attribute on the directive content or the next element.
    When applied to the next element, a "pending" element is inserted, and a
    transform does the work later.
    r   r   Tc                   	 t        j                  | j                  d         }g }| j                  r}t        j                         }| j                  j                  | j                  | j                  |       |D ]  }|d   j                  |        |j                  |j                         |S t        j                  t        j                   || j
                  d| j"                        }| j$                  j&                  j)                  |       |j+                  |       |S # t        $ r0 | j	                  d| j
                  d| j                  d   d      w xY w)Nr   z#Invalid class attribute value for "z" directive: "".rr   )r0   	directive)r   r   rB   r   rh   r1   r   r
   r   r9   r   r   r   r   pendingr   ClassAttributer   r   r:   note_pendingr   )rK   class_value	node_list	containerr   r   s         r    rM   z	Class.run  s.   	2$11$..2CDK
 	<<IJJ##DLL$2E2E$-/! 4Y&&{34Y//0  mm##%DII>!G ''44W=W%'  	2**99dnnQ/12 2	2s   "D# #9EN)	r   r   r   r   r   r   r   r   rM   r   r"   r    r   r     s%      $Kr"   r   c                  p    e Zd ZdZ ej
                  dej                  j                  fdz  z        Z	d Z
y)RoleTz(%s)\s*(\(\s*(%s)\s*\)\s*)?$   c                l   | j                   | j                  kD  s| j                  s| j                  d| j                  z        | j                  d   }| j
                  j                  |      }|s"| j                  d| j                  d|d      |j                  d      }|j                  d      }g }|rt        j                  || j                  j                  | j                  | j                  j                        \  }}|s| j                  j                  j                  d	|z  t        j                  | j                   | j                         | j                  
      }||gz   S t        j"                  }t%        |d      rJ d| j                  d|d       	 t'        |      }| j                  j)                  | j                  dd | j                   |i       \  }	}
}}d|
vr	 t/        j0                  |      |
d<   t        j4                  |||
|      }t        j6                  ||       |S # t*        j,                  $ rq}| j                  j                  d| j                  d|dt        j                  | j                   | j                         | j                  
      }||gz   cY d}~S d}~ww xY w# t2        $ rq}| j                  j                  d| j                  d|dt        j                  | j                   | j                         | j                  
      }||gz   cY d}~S d}~ww xY w)z?Dynamically create and register a custom interpreted text role.z4"%s" directive requires arguments on the first line.r   r   z-" directive arguments not valid role names: "r   r      N#Unknown interpreted text role "%s".r   rB   z&Supplemental directive arguments for "z)" directive not supported (specified by "z" role).)option_presetsr   rV   rT   r0   zInvalid argument for ")r   r   r   rh   r1   argument_patternmatchgroupr   roler   languager9   r   r
   rt   r   generic_custom_rolehasattrr   parse_directive_blockr   MarkupErrorr   r   r   
CustomRoleregister_local_role)rK   argsr  new_role_namebase_role_namer   	base_rolerh   converted_rolerB   r>   r   r   detailr  s                  r    rM   zRole.run  s   ,DLL** %'+yy1 2 2||A%%++D1**(,		49 : :AQ"'** 2 2 ; ;T[[

###%Ix  

++119NJ''I 2 &  5'))11I9k2 	L59YY	K	L2	&7	BN11LL$d&9&9"2 2 7Y. '!*#-#:#:=#I  y'7K!!-6% !! 	&MM''3799fE##DOOT__E[[ ( "E ug%%	&  *++yy&*''I	 , &
  5'))*s?   AH2 *J9 2J6A&J1+J61J69	L3A&L.(L3.L3N)r   r   r   r   r   r   r   Inliner
simplenamer
  rM   r   r"   r    r  r    s<    K!rzz"A&,nn&?&?%AA%E#G H4r"   r  c                      e Zd ZdZdZdZd Zy)DefaultRolez&Set the default interpreted text role.r   Fc                   | j                   s%dt        j                  v rt        j                  d= g S | j                   d   }t        j                  || j                  j
                  | j                  | j                  j                        \  }}|c| j                  j                  j                  d|z  t        j                  | j                  | j                        | j                        }||gz   S |t        j                  d<   |S )Nr5   r   r  r   )rB   r   _rolesr  r   r  r   r9   r   rh   r
   rt   r   )rK   	role_namer  r   rh   s        r    rM   zDefaultRole.run  s    ~~U\\!LL$INN1%	It/A/A/J/J$(KK1D1DFh<JJ''--5	A##DOOT__E[[ . "E ug%%Rr"   N)r   r   r   r   r   r   rM   r   r"   r    r  r    s    0 %r"   r  c                      e Zd ZdZdZdZd Zy)Titler   r   Tc                R    | j                   d   | j                  j                  d<   g S )Nr   title)rB   r   r:   )rK   s    r    rM   z	Title.run6  s&    /3~~a/@##G,	r"   N)r   r   r   r   r   r   rM   r   r"   r    r#  r#  0  s     $r"   r#  c                      e Zd Zd Zd Zy)MetaBodyc                ^    | j                  |      \  }}| xj                  |z  c_        g |g fS )zMeta element.)	parsemetar   )rK   r  context
next_stater   blank_finishs         r    field_markerzMetaBody.field_marker=  s0    !^^E2lt:r!!r"   c           	     0   | j                  |      }t        j                  t        j                  |            }| j
                  j                  |j                               \  }}}}t        j                         }t        j                  t        j                  dj                  |                  |d<   |sM| j
                  j                  }| j                  j                  d|z  t        j                  ||            }	|	|fS |j                         }
	 t        j                  |
d         d   \  }}|||j!                         <   |
dd  D ]1  }	 t        j                  |      d   \  }}|||j!                         <   3 ||fS # t        j"                  $ r |
d   |d<   Y Zw xY w# t        j"                  $ r]}| j
                  j                  }| j                  j%                  d|d|d	t        j                  ||            }	|	|fcY d }~c S d }~ww xY w)
Nr   r   zNo content for meta tag "%s".r   r1   r   z"Error parsing meta tag attribute "z": rT   )parse_field_markerr
   unescaper   escape2nullr   get_first_known_indentedendmetard   ru   r   infort   r   extract_name_valuer   NameValueErrorrh   )rK   r  r1   indentedindentline_offsetr,  r   ru   msgr|   attnamevaltokenr  s                  r    r)  zMetaBody.parsemetaC  s   &&u-~~e//5688E	6;zz|..):):,/HHX,>*@ AY%%**D--$$1D8%%dD13C $$	% 33F1I>qALGS$'D! ABZ 		)E)$77>qA(+W]]_%		) \!! ## 	%!!9DL	% '' )))..mm))().)<)<T4)HJ L(()s1   1F .F%F"!F"%H8AHHHN)r   r   r   r-  r)  r   r"   r    r'  r'  ;  s    ""r"   r'  c                       e Zd ZdZdefiZd Zy)MetaTstate_classesc                   | j                          t        j                         }| j                  j	                  | j
                  | j                  |dd| j                        \  }}|| j                  z
  t        | j
                        k7  rU| j                  j                  dt        j                  | j                  | j                        | j                        }||z  }| j                  j                  j                  t        j                   t        j"                  f      xs d}|j$                  | j                  j                  || g S )Nr'  T)initial_stater,  state_machine_kwargszInvalid meta directive.r   r   )r   r
   r   r9   nested_list_parser   r   SMkwargsrf   r   rh   rt   r   r   r:   first_child_not_matching_classTitularr4  r   )rK   r   new_line_offsetr,  rh   indexs         r    rM   zMeta.runj  s   !}}(,

(D(DLL$--t$4!% )E )0% d111c$,,6GGMM'')##DOOT__E[[ ( "E EMD

##BB).

(CE JHI 	+/==

E%(	r"   N)r   r   r   r   r'  rF  rM   r   r"   r    r@  r@  d  s    K(-Hr"   r@  c                      e Zd ZdZd Zy)DateTc                   t        | j                  t        j                        s| j	                  d| j
                  z        dj                  | j                        xs d}t        j                  |      }t        j                  |      gS )Nr   rW   z%Y-%m-%d)r   r9   r   r   rh   r1   rd   r   timestrftimer
   ry   )rK   
format_strri   s      r    rM   zDate.run  ss    $**f&<&<=**-/3yy9: : YYt||,:

" }}Z(

4 !!r"   Nr   r   r"   r    rL  rL    s    K"r"   rL  c                  >    e Zd ZdZdZdZdej                  iZdZ	d Z
y)TestDirectivez3This directive is useful only for testing purposes.r   Toptionc           	        | j                   rdj                  | j                         }| j                  j                  d| j                  d| j
                  d| j                  dt        j                  ||      | j                        }|gS | j                  j                  d| j                  d| j
                  d| j                  d| j                        }|gS )NrW   zDirective processed. Type="z", arguments=z
, options=z
, content:r   z, content: None)
r   rd   r   r5  r1   rB   r>   r
   rt   r   )rK   ri   r5  s      r    rM   zTestDirective.run  s    <<99T\\*D==%%"iiG##D$/dkk & CD v	 ==%%#'99dnndllL[[ & "D vr"   N)r   r   r   r   r   r   r   r   r   r   rM   r   r"   r    rR  rR    s+    = $Z::;KKr"   rR  )r5   r5   )r   r   r   r   ).r   
__future__r   __docformat__r   rN  pathlibr   urllib.requestr   urllib.errorr   docutilsr   r	   r
   r   r   docutils.parsers.rstr   r   r   r   r   $docutils.parsers.rst.directives.bodyr   r   docutils.transformsr   TYPE_CHECKINGdocutils.nodesr   r!   r$   r   r   r   r   r  r  r#  SpecializedBodyr'  r@  rL  rR  r   r"   r    <module>ra     s   
   "" 	   " ! = = F : : G $&0`;i `;HT) Tni B) i ) X#I #L;9 ;|) 4I &"v%% &"R9 6"9 "<I r"   