
    oheg+                         d Z ddlmZ dZdZ	 dZ	  G d d edd            Z edd	d
ddd      Z	  G d de      Z	 G d de	      Z
 G d d      Z G d d      Z G d dee      ZddlZd
ZerddZyddZy)ak  
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
  the Docutils document tree.

- 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.
    )
namedtuplereStructuredTextz0.20.1 c                   <     e Zd Z	 	 d fd	Zd Zd Zd Zd Z xZS )VersionInfoc           	          d}||vrt        d|d      |dk(  r|st        d      |dk7  rt        d      t        | 	  | ||||||      S )N)alphabeta	candidatefinalzreleaselevel must be one of .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super__new__)	clsmajorminormicroreleaselevelserialreleasereleaselevels	__class__s	           3/usr/lib/python3/dist-packages/docutils/__init__.pyr   zVersionInfo.__new__N   sz    ?}, -1 2 27"  "O P P { !HIIwsE5%+VW> 	>    c                 ^    t        |t              rt        | }t        j                  | |      S N)
isinstancetupler   __lt__selfothers     r   r    zVersionInfo.__lt__`   '    eU#'E||D%((r   c                 ^    t        |t              rt        | }t        j                  | |      S r   )r   r   r   __gt__r!   s     r   r&   zVersionInfo.__gt__e   r$   r   c                 ^    t        |t              rt        | }t        j                  | |      S r   )r   r   r   __le__r!   s     r   r(   zVersionInfo.__le__j   r$   r   c                 ^    t        |t              rt        | }t        j                  | |      S r   )r   r   r   __ge__r!   s     r   r*   zVersionInfo.__ge__o   r$   r   )r   r   r   r   r   T)	__name__
__module____qualname__r   r    r&   r(   r*   __classcell__)r   s   @r   r   r   K   s$     ./8<>$)
)
)
)r   r   z-major minor micro releaselevel serial release      r   T)r   r   r   r   r   r   c                       e Zd Zy)ApplicationErrorNr+   r,   r-    r   r   r2   r2          r   r2   c                       e Zd Zy)	DataErrorNr3   r4   r   r   r7   r7      r5   r   r7   c                   2    e Zd ZdZdZ	 dZ	 dZ	 dZ	 dZ	 dZ	y)SettingsSpecz
    Runtime setting specification base class.

    SettingsSpec subclass objects used by `docutils.frontend.OptionParser`.
    r4   N)
r+   r,   r-   __doc__settings_specsettings_defaultssettings_default_overridesrelative_path_settingsconfig_sectionconfig_section_dependenciesr4   r   r   r9   r9      sU    " M$L  "&N   N: #'r   r9   c                       e Zd ZdZd ZdZdZy)TransformSpeca  
    Runtime transform specification base class.

    Provides the interface to register "transforms" and helper functions
    to resolve references with a `docutils.transforms.Transformer`.

    https://docutils.sourceforge.io/docs/ref/transforms.html
    c                     | j                   dk7  r/ddl}|j                  dt               t	        | j                         S g S )z;Transforms required by this class.  Override in subclasses.r4   r   NzwTransformSpec: the "default_transforms" attribute will be removed in Docutils 2.0.
Use get_transforms() method instead.)default_transformswarningswarnDeprecationWarninglist)r"   rE   s     r   get_transformszTransformSpec.get_transforms   sB    ""b(MM A -. //00	r   r4   N)r+   r,   r-   r:   rI   rD   unknown_reference_resolversr4   r   r   rB   rB      s    	 "$r   rB   c                   "    e Zd ZdZdZ	 dZ	 d Zy)	Componentz#Base class for Docutils components.Nr4   c                     || 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"   formats     r   supportszComponent.supports  s     ''r   )r+   r,   r-   r:   component_typerN   rP   r4   r   r   rL   rL     s    -N IG(r   rL   Nc                    t         j                  j                  |       }t         j                  j                  t         j                  j                  t              d      }| j                  |      sJ | d|       |t        |      d  }t         j                  j                  d|      }t        dk(  r
|dk(  rd|z   }|S )Nr   z doesn't start with z/usr/share/docutils/buildlocalz
debian/tmp)ospathdirnamejoin__file__
startswithlen_debian_package)rV   buildlocrW   prefixsuffixdatadirs         r   _datadirra   *  s    ''//$'bggooh7<v&SdF(SS&V&'',,5v>
 g%(g*="W,Gr   c                 @    t         j                  j                  |       S r   )rU   rV   rW   )rV   r]   s     r   ra   ra   :  s    wwt$$r   r   )r:   collectionsr   __docformat____version____version_details__r   __version_info__	Exceptionr2   r7   r9   rB   rL   rU   r\   ra   r4   r   r   <module>ri      s   
.` #"  ')*]LN ')T 


  (y ' '  'Q Qh3 3l(m (( 
 %r   