a
    mߛ`e$                     @   s   d Z ddlZddlmZ dZdZG dd deddZedd	d
ddddZdZG dd de	Z
G dd de
ZG dd deZG dd dZG dd deeZdS )a]  
This is the Docutils (Python Documentation Utilities) package.

Package Structure
=================

Modules:

- __init__.py: Contains component base classes, exception classes, and
  Docutils version information.

- core.py: Contains the ``Publisher`` class and ``publish_*()`` convenience
  functions.

- frontend.py: Runtime settings (command-line interface, configuration files)
  processing, for Docutils front-ends.

- io.py: Provides a uniform API for low-level input and output.

- nodes.py: Docutils document tree (doctree) node class library.

- statemachine.py: A finite state machine specialized for
  regular-expression-based text filters.

Subpackages:

- languages: Language-specific mappings of terms.

- parsers: Syntax-specific input parser modules or packages.

- readers: Context-specific input handlers which understand the data
  source and manage a parser.

- transforms: Modules used by readers and writers to modify DPS
  doctrees.

- utils: Contains the ``Reporter`` system warning class and miscellaneous
  utilities used by readers, writers, and transforms.

  utils/urischemes.py: Contains a complete mapping of known URI addressing
  scheme names to descriptions.

- utils/math: Contains functions for conversion of mathematical notation
  between different formats (LaTeX, MathML, text, ...).

- writers: Format-specific output translators.
    N)
namedtupleZreStructuredTextz0.17.1c                       s>   e Zd Zd fdd	Zdd Zdd	 Zd
d Zdd Z  ZS )VersionInfor   finalTc              	      sZ   d}||vrt d|f |dkr>|s.t d|dkr>t dtt| | ||||||S )N)ZalphaZbeta	candidater   zreleaselevel must be one of %r.r   z{releaselevel "final" must not be used with development versions (leads to wrong version ordering of the related __version__r   z%"serial" must be 0 for final releases)
ValueErrorsuperr   __new__)clsmajorminormicroreleaselevelserialreleaseZreleaselevels	__class__ 0lib/python3.9/site-packages/docutils/__init__.pyr   K   s    zVersionInfo.__new__c                 C   s   t |trt| }t| |S N)
isinstancetupler   __lt__selfotherr   r   r   r   \   s    
zVersionInfo.__lt__c                 C   s   t |trt| }t| |S r   )r   r   r   __gt__r   r   r   r   r   a   s    
zVersionInfo.__gt__c                 C   s   t |trt| }t| |S r   )r   r   r   __le__r   r   r   r   r   f   s    
zVersionInfo.__le__c                 C   s   t |trt| }t| |S r   )r   r   r   __ge__r   r   r   r   r   k   s    
zVersionInfo.__ge__)r   r   r   r   r   T)	__name__
__module____qualname__r   r   r   r   r   __classcell__r   r   r   r   r   H   s     r   z-major minor micro releaselevel serial release      r   T)r
   r   r   r   r   r   r   c                   @   s   e Zd ZdS )ApplicationErrorNr   r   r    r   r   r   r   r$          r$   c                   @   s   e Zd ZdS )	DataErrorNr%   r   r   r   r   r'      r&   r'   c                   @   s(   e Zd ZdZdZdZdZdZdZdZ	dS )SettingsSpecz
    Runtime setting specification base class.

    SettingsSpec subclass objects used by `docutils.frontend.OptionParser`.
    r   N)
r   r   r    __doc__Zsettings_specZsettings_defaultsZsettings_default_overridesZrelative_path_settingsZconfig_sectionZconfig_section_dependenciesr   r   r   r   r(      s   'r(   c                   @   s    e Zd ZdZdd ZdZdZdS )TransformSpecz
    Runtime transform specification base class.

    TransformSpec subclass objects used by `docutils.transforms.Transformer`.
    c                 C   s,   | j dkr(ddl}|dt t| j S g S )z;Transforms required by this class.  Override in subclasses.r   r   NzMdefault_transforms attribute deprecated.
Use get_transforms() method instead.)default_transformswarningswarnDeprecationWarninglist)r   r,   r   r   r   get_transforms   s    

zTransformSpec.get_transformsr   N)r   r   r    r)   r0   r+   Zunknown_reference_resolversr   r   r   r   r*      s
   r*   c                   @   s    e Zd ZdZdZdZdd ZdS )	Componentz#Base class for Docutils components.Nr   c                 C   s
   || j v S )z
        Is `format` supported by this component?

        To be used by transforms to ask the dependent component if it supports
        a certain input context or output format.
        )	supported)r   formatr   r   r   supports	  s    zComponent.supports)r   r   r    r)   Zcomponent_typer2   r4   r   r   r   r   r1      s   r1   )r)   syscollectionsr   Z__docformat____version__r   Z__version_info__Z__version_details__	Exceptionr$   r'   objectr(   r*   r1   r   r   r   r   <module>   s*   0(I.