U
    [ªShó  ã                   @   sF   d Z dZddlmZ ddlmZmZ ddlmZ G dd„ dej	ƒZ	dS )	z+
Python Enhancement Proposal (PEP) Reader.
ÚreStructuredTexté    )Ú
standalone)ÚpepsÚfrontmatter)Úrstc                       sH   e Zd ZdZdZdZdZ‡ fdd„ZdddœZe	j
jZdd
d„Z‡  ZS )ÚReader)Zpep)zPEP Reader Option DefaultszfThe --pep-references and --rfc-references options (for the reStructuredText parser) are on by default.© z
pep reader)Zreaderszstandalone readerc                    sH   t ƒ  ¡ }| tj¡ | tj¡ | tj¡ | tj	tj
tjg¡ |S )N)ÚsuperÚget_transformsÚremover   ZDocTitleZSectionSubTitleZDocInfoÚextendr   ZHeadersZContentsZTargetNotes)ÚselfZ
transforms©Ú	__class__r   úG/root/rtd-docs/venv/lib/python3.8/site-packages/docutils/readers/pep.pyr
      s    
zReader.get_transformsé   )Zpep_referencesZrfc_referencesNc                 C   s.   |dkrt jd|  ¡ d}tj | |d¡ dS )z`parser` should be ``None``.NT)Zrfc2822ZinlinerÚ )r   ÚParserÚinliner_classr   r   Ú__init__)r   ÚparserÚparser_namer   r   r   r   ,   s    zReader.__init__)NN)Ú__name__Ú
__module__Ú__qualname__Ú	supportedZsettings_specZconfig_sectionZconfig_section_dependenciesr
   Zsettings_default_overridesr   ZstatesZInlinerr   r   Ú__classcell__r   r   r   r   r      s   	
r   N)
Ú__doc__Ú__docformat__Zdocutils.readersr   Zdocutils.transformsr   r   Zdocutils.parsersr   r   r   r   r   r   Ú<module>   s
   