ok

Mini Shell

Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/docutils/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/docutils/__pycache__/frontend.cpython-311.pyc

�

2�DgB�����dZdZddlZddlZddlZddlmZddlZddlZddlZddl	Z	ddl
Z
ddl
mZmZd�Z
d�Z	d#d�Z	d#d	�Z	d#d
�Z	d#d�Z	d#d�Z	d#d
�Z	d#d�Z	d#d�Z	d#d�Z	d#d�Z	d#d�Z	d#d�Z	d#d�Zd$d�Zd�Zd�ZGd�dej��ZGd�dej ��Z Gd�dej!e
j"��Z!Gd�dej#��Z$Gd �d!e%��Z&d"�Z'dS)%a
Command-line and common processing for Docutils front-end tools.

This module is provisional.
Major changes will happen with the switch from the deprecated
"optparse" module to "arparse".

Applications should use the high-level API provided by `docutils.core`.
See https://docutils.sourceforge.io/docs/api/runtime-settings.html.

Exports the following classes:

* `OptionParser`: Standard Docutils command-line processing.
  Deprecated. Will be replaced by an ArgumentParser.
* `Option`: Customized version of `optparse.Option`; validation support.
  Deprecated. Will be removed.
* `Values`: Runtime settings; objects are simple structs
  (``object.attribute``).  Supports cumulative list settings (attributes).
  Deprecated. Will be removed.
* `ConfigParser`: Standard Docutils config file processing.
  Provisional. Details will change.

Also exports the following functions:

Interface function:
   `get_default_settings()`.  New in 0.19.

Option callbacks:
   `store_multiple()`, `read_config_file()`. Deprecated.

Setting validators:
  `validate_encoding()`, `validate_encoding_error_handler()`,
  `validate_encoding_and_error_handler()`,
  `validate_boolean()`, `validate_ternary()`,
  `validate_nonnegative_int()`, `validate_threshold()`,
  `validate_colon_separated_string_list()`,
  `validate_comma_separated_list()`,
  `validate_url_trailing_slash()`,
  `validate_dependency_file()`,
  `validate_strip_class()`
  `validate_smartquotes_locales()`.

  Provisional.

Misc:
  `make_paths_absolute()`, `filter_settings_spec()`. Provisional.
�reStructuredText�N)�
SUPPRESS_HELP)�io�utilsc��|D]}t|j|d���|���D]\}}t|j||���dS)z�
    Store multiple values in `parser.values`.  (Option callback.)

    Store `None` for each attribute named in `args`, and store the value for
    each key (attribute name) in `kwargs`.
    N)�setattr�values�items)�option�opt�value�parser�args�kwargs�	attribute�keys        �q/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/docutils/frontend.py�store_multiplerEsf���0�0�	���
�y�$�/�/�/�/��l�l�n�n�+�+�
��U���
�s�E�*�*�*�*�+�+�c���	|�|��}n,#t$r}|�|��Yd}~nd}~wwxYw|j�||��dS)zQ
    Read a configuration file during option processing.  (Option callback.)
    N)�get_config_file_settings�
ValueError�errorr	�update)rrr
r�new_settings�errs      r�read_config_filerRsz����6�6�u�=�=�����������S�����������������
�M����v�.�.�.�.�.s��
A�<�Ac��|dkrdS	tj|��n$#t$rtd|�d|�d����wxYw|S)N�z	setting "z": unknown encoding: "�")�codecs�lookup�LookupError��settingr
�
option_parser�
config_parser�config_sections     r�validate_encodingr)]sp����{�{��t�.��
�e�������.�.�.��k�$�W�W�e�e�e�-�.�.�	.�.�����Ls	��!Ac�r�	tj|��n #t$rtd|z���wxYw|S)Nz�unknown encoding error handler: "%s" (choices: "strict", "ignore", "replace", "backslashreplace", "xmlcharrefreplace", and possibly others; see documentation for the Python ``codecs`` module))r!�lookup_errorr#r$s     r�validate_encoding_error_handlerr,is^��5���E�"�"�"�"���5�5�5��
,�/4�
4�5�5�	5�5�����Ls��4c��d|vre|�d��\}}t|dz||||��|r|�||dz|��nt|j|dz|��n|}t|||||��|S)z�
    Side-effect: if an error handler is included in the value, it is inserted
    into the appropriate place as if it was a separate setting/option.
    �:�_error_handler)�splitr,�setrr	r))r%r
r&r'r(�encoding�handlers       r�#validate_encoding_and_error_handlerr4vs����e�|�|�!�K�K��,�,���'�'��&�&����>�	+�	+�	+��	O����n�g�8H�.H�%�
'�
'�
'�
'�
�M�(�'�4D�*D�g�N�N�N�N����g�x��#�^�5�5�5��Orc���t|t��r|S	|j|������S#t
$rt
d|z���wxYw)z|Check/normalize boolean settings:
         True:  '1', 'on', 'yes', 'true'
         False: '0', 'off', 'no','false', ''
    zunknown boolean value: "%s")�
isinstance�bool�booleans�strip�lower�KeyErrorr#r$s     r�validate_booleanr<�sv���%�������A��%�e�k�k�m�m�&9�&9�&;�&;�<�<���A�A�A��7�%�?�@�@�@�A���s�0A
�
A'c��t|t��s|�|S	|j|������S#t
$r|cYSwxYw)z�Check/normalize three-value settings:
         True:  '1', 'on', 'yes', 'true'
         False: '0', 'off', 'no','false', ''
         any other value: returned as-is.
    )r6r7r8r9r:r;r$s     r�validate_ternaryr>�sj���%�����%�-�����%�e�k�k�m�m�&9�&9�&;�&;�<�<�������������s�0A�A�Ac�N�t|��}|dkrtd���|S)Nrz(negative value; must be positive or zero)�intrr$s     r�validate_nonnegative_intrA�s*����J�J�E��q�y�y��C�D�D�D��Lrc���	t|��S#t$rJ	|j|���cYS#tt
f$rt
d|z���wxYwwxYw)Nzunknown threshold: %r.)r@r�
thresholdsr:r;�AttributeErrorr#r$s     r�validate_thresholdrE�s���@��5�z�z����@�@�@�	@� �+�E�K�K�M�M�:�:�:�:���.�)�	@�	@�	@��6��>�?�?�?�	@����@���s��
A%�=�A%�$A!�!A%c���t|t��s|�d��}n<|���}|�|�d����|S)Nr.)r6�listr0�pop�extend)r%r
r&r'r(�lasts      r�$validate_colon_separated_string_listrK�sU���e�T�"�"�&����C� � ����y�y�{�{��
���T�Z�Z��_�_�%�%�%��Lrc���t|t��s|g}|���}d�|�d��D��}|�|��|S)zHCheck/normalize list arguments (split at "," and strip whitespace).
    c�b�g|],}|�d���|�d����-S)z 	
)r9)�.0�is  r�
<listcomp>z1validate_comma_separated_list.<locals>.<listcomp>�s5��K�K�K�!�!�'�'�'�:J�:J�K�Q�W�W�W�
�
�K�K�Kr�,)r6rGrHr0rI)r%r
r&r'r(rJr
s       r�validate_comma_separated_listrR�s`���e�T�"�"������9�9�;�;�D�K�K�t�z�z�#���K�K�K�E�	�L�L������Lrc�B�|sdS|�d��r|S|dzS)Nz./�/)�endswithr$s     r�validate_url_trailing_slashrV�s2�����t�	����	�	�����s�{�rc�t�	tj|��S#t$rtjd��cYSwxYw�N)r�DependencyList�OSErrorr$s     r�validate_dependency_filer[�sJ��*��#�E�*�*�*���*�*�*��#�D�)�)�)�)�)�*���s��7�7c��t|||||��}|D]=}tj�|��}||krt	d|�d|�d�����>|S)NzInvalid class value z
 (perhaps z?))rR�docutils�nodes�make_idr)r%r
r&r'r(�cls�
normalizeds       r�validate_strip_classrb�s���
*�'�5�-�*7��
I�
I�E��2�2���^�+�+�C�0�0�
��*����*� #���Z�Z�Z�1�2�2�
2���Lrc	�:�t|||||��}g}|D�]}	|�dd��\}}nT#t$r|�|��Y�?t$r't	d|�dd��z���wxYw|���}|�d��}	t|	��dkr|	}n9t|��dkr&t	d|�dd��z���|�||f����|S)z~Check/normalize a comma separated list of smart quote definitions.

    Return a list of (language-tag, quotes) string tuples.r.�z4Invalid value "%s". Format is "<language>:<quotes>".�ascii�backslashreplace�z[Invalid value "%s". Please specify 4 quotes
    (primary open/close; secondary open/close).)rRr0rD�appendr�encoder9�len)
r%r
r&r'r(�	lc_quotes�item�lang�quotes�multichar_quotess
          r�validate_smartquotes_localesrp�sw��
*�'�5�-�*7��
I�
I�E��I��)�)��
	I��:�:�c�1�-�-�L�D�&�&���	�	�	�
���T�"�"�"��H��	I�	I�	I��A�#�{�{�7�4F�G�G�H�I�I�
I�	I����
������!�<�<��,�,���� � �A�%�%�%�F�F�
��[�[�A�
�
��O�#�{�{�7�4F�G�G�H�I�I�
I�	���$���(�(�(�(��s�6�B�0Bc������tj���|D]I}||vrC||}t|t��r�fd�|D��}n|rt	�|��}|||<�JdS)z�
    Interpret filesystem path settings relative to the `base_path` given.

    Paths are values in `pathdict` whose keys are in `keys`.  Get `keys` from
    `OptionParser.relative_path_settings`.
    Nc�0��g|]}t�|����S�)�make_one_path_absolute)rN�path�	base_paths  �rrPz'make_paths_absolute.<locals>.<listcomp>)s3���,�,�,�!�0�	�4�@�@�,�,�,r)�os�getcwdr6rGrt)�pathdict�keysrvrr
s  `  r�make_paths_absoluter{s�������I�K�K�	��"�"���(�?�?��S�M�E��%��&�&�
A�,�,�,�,�%*�,�,�,����
A�.�y�%�@�@��!�H�S�M��"�"rc�|�tj�tj�||����SrX)rwru�abspath�join)rvrus  rrtrt0s&��
�7�?�?�2�7�<�<�	�4�8�8�9�9�9rc��t|��}tdt|��d��D]�}g}||D]f}d�|dD��d}||vr�||���vr|�||���Q|�|���gt|��||<��t|��S)ajReturn a copy of `settings_spec` excluding/replacing some settings.

    `settings_spec` is a tuple of configuration settings
    (cf. `docutils.SettingsSpec.settings_spec`).

    Optional positional arguments are names of to-be-excluded settings.
    Keyword arguments are option specification replacements.
    (See the html4strict writer for an example.)
    ��c�t�g|]5}|�d���|dd��dd����6S)z--r�N�-�_)�
startswith�replace)rN�
opt_strings  rrPz(filter_settings_spec.<locals>.<listcomp>DsS��8�8�8�&�%�0�0��6�6�8�
�1�2�2��.�.�s�C�8�8�8�8�8rrdr)rG�rangerjrzrh�tuple)�
settings_spec�excluder��settingsrO�newopts�opt_spec�opt_names        r�filter_settings_specr�4s����M�"�"�H�
�1�c�(�m�m�Q�
'�
'�
%�
%���� ���
	)�
	)�H�8�8�*2�1�+�8�8�8�89�;�H��7�"�"���7�<�<�>�>�)�)����w�x�0�1�1�1�1����x�(�(�(�(��G�n�n�������?�?�rc�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)�Valuesz�Storage for option values.

    Updates list attributes by extension rather than by replacement.
    Works in conjunction with the `OptionParser.lists` instance attribute.

    Deprecated. Will be removed.
    c����tjdtd���t��j|i|��t|dd���t
j��|_dSdS)Nz@frontend.Values class will be removed in Docutils 0.21 or later.r���
stacklevel�record_dependencies)	�warnings�warn�DeprecationWarning�super�__init__�getattrrrYr���selfrr�	__class__s   �rr�zValues.__init__Zsv����
�3�(�Q�	8�	8�	8�	8�	�����$�)�&�)�)�)��4�.��5�5�=�',�';�'=�'=�D�$�$�$�>�=rc�&�t|t��r|j}t|��}|j���D]6}t
||��r$||vr t||��}|r|||z
}||=�7|�|��dSrX)	r6r��__dict__�dict�listsrz�hasattrr��
_update_loose)r��
other_dictr&r%r
s     rrz
Values.updatecs����j�&�)�)�	-�#�,�J��*�%�%�
�$�*�/�/�1�1�	,�	,�G��t�W�%�%�
,�'�Z�*?�*?���g�.�.���,��Z��0�0�E�"�7�+�����:�&�&�&�&�&rc���tj��5tjdt���|�|j���cddd��S#1swxYwYdS)z Return a shallow copy of `self`.�ignore��category)�defaultsN)r��catch_warnings�filterwarningsr�r�r�)r�s r�copyzValues.copyos���
�
$�
&�
&�	:�	:��#�H�7I�J�J�J�J��>�>�4�=�>�9�9�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:�	:�	:s�6A�A�Ac�f�t||d���t|||��t||��S)znReturn ``self.name`` or ``default``.

        If ``self.name`` is unset, set ``self.name = default``.
        N)r�r)r��name�defaults   r�
setdefaultzValues.setdefaultus8��
�4��t�$�$�,��D�$��(�(�(��t�T�"�"�"r)	�__name__�
__module__�__qualname__�__doc__r�rr�r��
__classcell__�r�s@rr�r�Qso���������>�>�>�>�>�
'�
'�
'�:�:�:�#�#�#�#�#�#�#rr�c�N��eZdZdZejjddgzZ�fd�Z�fd�Z�xZ	S)�Optionz`Add validation and override support to `optparse.Option`.

    Deprecated. Will be removed.
    �	validator�	overridesc�r��tjdtd���t��j|i|��dS)NzDThe frontend.Option class will be removed in Docutils 0.21 or later.r�r�)r�r�r�r�r�r�s   �rr�zOption.__init__�sJ����
�3�(�Q�	8�	8�	8�	8�	�����$�)�&�)�)�)�)�)rc	���t���||||��}|j}|r�|jrxt	||��}	|�|||��}n>#t
$r1}t
jd|�dtj	|�������d}~wwxYwt|||��|jrt||jd��|S)z�
        Call the validator function on applicable settings and
        evaluate the 'overrides' option.
        Extends `optparse.Option.process`.
        zError in option "z":
    N)r��process�destr�r��	Exception�optparse�OptionValueErrorr�error_stringrr�)
r�rr
r	r�resultr%�	new_valuerr�s
         �rr�zOption.process�s����������e�V�V�<�<���)���	6��~�
4����0�0��7� $���w��v� F� F�I�I�� �7�7�7�"�3�3��3�3���� 4� 4� 4�6�7�7�7�����7��������3�3�3��~�
6������5�5�5��
s�A�
B�),B�B)
r�r�r�r�r�r��ATTRSr�r�r�r�s@rr�r�sq���������

�O�!�[�+�$>�>�E�*�*�*�*�*���������rr�c���eZdZdZgd�Z	d���Z	dddddd	�Z	d
d
d
d
dddddd�	Z	e	e
jd
d��pej
pdZdZddgddgddif�ddgddif�dddgded�f�ddgd d!d"�f�d#d$d%gd&d'd(d)�f�d*d+d,gd&d-d(d)�f�d.d/gd&dd(d)�f�d0d1d2gded�f�d3d4gdd5if�d6d7gd8ed9d:�f�d;d<gd=d&d>d>d?�f�d@dAgd=d&dBdC�f�dDdEgd=d dF�f�dGdHgddedI�f�dJdKgdLd dF�f�dMdNgddOdedP�f�dQdRgd dOd"�f�dSdTgded�f�dUdVgd dWd"�f�dXdYgdZd[d\ed]�f�d^d_gdZd`d\ed]�f�dadbdcgeddddeedf�f�dgdhdigd&dddd)�f�djdkdlgd&dddd)�f�dmdngedoddeedp�f�dqdrgd&ddod)�f�dsdtgeduddeedp�f�dvdwgded�f�dxdygd dzd"�f�d{d|gd}d~d�f�d�d�gddedI�f�d�d�gd�d dF�f�d�d�d�gd�ed��f�d�d�gd�ed��f�d�d�d�gd�d�ed��f�d�d�gd�ed��f�d�e�d�e�d��d�d�gd�eed��f�d�ezd�geed��f�d�d�d�gd�d�d�d��f�d�d�gd~edd��f�d�d�gd~d�d8ed��f�d�d�d�gd�d�if�d�d�d�gd�d�if�ed�gd�d�if�ed�gd�d�if�ed�gd�dif�ed�gd�dif�ed�gd�dif�ed�gd�dif�ed�gdZd�ed��f�ed�gd�dif�RfZ	ddddd��Z	d�Zd�ej�ejr
d�ejzpd��d�e
j ���d��d�e
j!�dǝZ"	dӈfdɄ	Z#dʄZ$e%d˄��Z&d̄Z'd̈́Z(d΄Z)dτZ*dЄZ+dфZ,d҄Z-�xZ.S)��OptionParsera
    Settings parser for command-line and library use.

    The `settings_spec` specification here and in other Docutils components
    are merged to build the set of command-line options and runtime settings
    for this process.

    Common settings (defined below) and component-specific settings must not
    conflict.  Short options are reserved for common settings, and components
    are restricted to using long options.

    Deprecated.
    Will be replaced by a subclass of `argparse.ArgumentParser`.
    )z/etc/docutils.confz./docutils.confz~/.docutilsz(info 1 warning 2 error 3 severe 4 none 5rdr�r�rg�)�info�warningr�severe�noneTF)	�1�on�yes�true�0�off�no�falserr2NrerfzGeneral Docutils OptionszaOutput destination name. Obsoletes the <destination> positional argument. Default: None (stdout).z--output�metavarz
<destination>z'Specify the document title as metadata.z--titlez<title>z2Include a "Generated by Docutils" credit and link.z--generatorz-g�
store_true)�actionr�z"Do not include a generator credit.z--no-generator�store_false�	generator)r�r�z2Include the date at the end of the document (UTC).z--datez-d�store_constz%Y-%m-%d�	datestamp)r��constr�zInclude the time & date (UTC).z--timez-tz%Y-%m-%d %H:%M UTCz'Do not include a datestamp of any kind.z--no-datestampz&Include a "View document source" link.z
--source-linkz-sz3Use <URL> for a source link; implies --source-link.z--source-urlz<URL>z-Do not include a "View document source" link.z--no-source-link�callback)�source_link�
source_url)r�r��
callback_argsz4Link from section headers to TOC entries.  (default)z--toc-entry-backlinks�
toc_backlinks�entry)r�r�r�r�z0Link from section headers to the top of the TOC.z--toc-top-backlinks�top)r�r�r�z+Disable backlinks to the table of contents.z--no-toc-backlinks)r�r�z6Link from footnotes/citations to references. (default)z--footnote-backlinks)r�r�r�z/Disable backlinks from footnotes and citations.z--no-footnote-backlinks�footnote_backlinksz0Enable section numbering by Docutils.  (default)z--section-numbering�
sectnum_xform)r�r�r�r�z&Disable section numbering by Docutils.z--no-section-numberingz/Remove comment elements from the document tree.z--strip-commentsz6Leave comment elements in the document tree. (default)z--leave-comments�strip_commentsz�Remove all elements with classes="<class>" from the document tree. Warning: potentially dangerous; use with caution. (Multiple-use option.)z--strip-elements-with-classrh�strip_elements_with_classesz<class>)r�r�r�r�z�Remove all classes="<class>" attributes from elements in the document tree. Warning: potentially dangerous; use with caution. (Multiple-use option.)z
--strip-class�
strip_classeszReport system messages at or higher than <level>: "info" or "1", "warning"/"2" (default), "error"/"3", "severe"/"4", "none"/"5"z--reportz-r�report_levelz<level>)�choicesr�r�r�r�z4Report all system messages.  (Same as "--report=1".)z	--verbosez-vz3Report no system messages.  (Same as "--report=5".)z--quietz-qzdHalt execution at system messages at or above <level>.  Levels as in --report.  Default: 4 (severe).z--halt�
halt_level)r�r�r�r�r�z6Halt at the slightest problem.  Same as "--halt=info".z--strictzjEnable a non-zero exit status for non-halting system messages at or above <level>.  Default: 5 (disabled).z
--exit-status�exit_status_levelz3Enable debug-level system messages and diagnostics.z--debugz Disable debug output.  (default)z
--no-debug�debugz-Send the output of system messages to <file>.z
--warnings�warning_streamz<file>)r�r�z1Enable Python tracebacks when Docutils is halted.z--tracebackz%Disable Python tracebacks.  (default)z--no-traceback�	tracebackzdSpecify the encoding and optionally the error handler of input text.  Default: <auto-detect>:strict.z--input-encodingz-iz<name[:handler]>)r�r�zlSpecify the error handler for undecodable characters.  Choices: "strict" (default), "ignore", and "replace".z--input-encoding-error-handler�strict)r�r�z^Specify the text encoding and optionally the error handler for output.  Default: utf-8:strict.z--output-encodingz-o�utf-8)r�r�r�z�Specify error handler for unencodable output characters; "strict" (default), "ignore", "replace", "xmlcharrefreplace", "backslashreplace".z--output-encoding-error-handlerzOSpecify text encoding and optionally error handler for error output.  Default: r.�.z--error-encodingz-ezSSpecify the error handler for unencodable characters in error output.  Default: %s.z--error-encoding-error-handlerz<Specify the language (as BCP 47 language tag).  Default: en.z
--languagez-l�
language_code�enz<name>)r�r�r�z)Write output file dependencies to <file>.z--record-dependencies)r�r�r�z6Read configuration settings from <file>, if it exists.z--config�string)r��typer�r�z,Show this program's version number and exit.z	--versionz-Vr��versionz Show this help message and exit.z--helpz-h�helpz--id-prefixr�rz--auto-id-prefix�%z--dump-settingsz--dump-internalsz--dump-transformsz--dump-pseudo-xmlz--expose-internal-attribute�expose_internals)r�r�r�z--strict-visitor)�_disable_config�_source�_destination�
_config_files�generalz%prog (Docutils z [%s]z	, Python rz, on �)rsc�j��i|_	g|_	dg|_tjdt
d���t
��j|tdtj
d���d�|��|js|j|_|g|�R|_
|�|j
��|j�|pi��|rp|jd	se	|���}n,#t$$r}|�|��Yd}~nd}~wwxYw|j�|j��dSdSdS)
z�Set up OptionParser instance.

        `components` is a list of Docutils components each containing a
        ``.settings_spec`` attribute.
        `defaults` is a mapping of setting default overrides.
        r�ztThe frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.r�r�N�N)�width)�option_class�add_help_option�	formatterr�)r��config_files�relative_path_settingsr�r�r�r�r�r�r��TitledHelpFormatterr��version_template�
components�populate_from_componentsr�r�get_standard_config_settingsrrr�)	r�r
r��read_config_filesrr�config_settingsrr�s	        �rr�zOptionParser.__init__�s������
�(����;�'7�&8��#��
�3�)�Q�	8�	8�	8�	8�	������'-�d�#+�#?�b�#I�#I�#I�	*�	*�"(�	*�	*�	*��|�	1��0�D�L��-�*�-�-����%�%�d�o�6�6�6��
���X�^��,�,�,��	;�T�]�3D�%E�	;�
 �"&�"C�"C�"E�"E�����
 �
 �
 ��
�
�3�������������
 �����M� � ��!9�:�:�:�:�:�	;�	;�	;�	;s�C$�$
D
�.D�D
c�L�|D]�}|��|j}|j�|j��tdt	|��d��D]�}|||dz�\}}}|r,tj|||��}|�|��n|}|D]=\}	}
}|j|
d|	i|��}|�	d��dkrd|j
|j<�>|jr|j
�|j������|D]*}|r&|jr|j
�|j���+dS)aoCollect settings specification from components.

        For each component, populate from the `SettingsSpec.settings_spec`
        structure, then from the `SettingsSpec.settings_defaults` dictionary.
        After all components have been processed, check for and populate from
        each component's `SettingsSpec.settings_default_overrides` dictionary.
        Nrr�r�r�rhT)r�r
rIr�rjr��OptionGroup�add_option_group�
add_option�getr�r��settings_defaultsr�r�settings_default_overrides)
r�r
�	componentr�rO�title�description�option_spec�group�	help_text�option_stringsrrs
             rrz%OptionParser.populate_from_components�s���$�	F�	F�I�� ��%�3�M��'�.�.��0�
2�
2�
2��1�c�-�0�0�!�4�4�

F�

F��2?��!�A�#��2F�/��{�K��!�$�0��u�k�J�J�E��)�)�%�0�0�0�0� �E�;F�7�7�7�Y���-�U�-�~�8�9�8�06�8�8�F��z�z�(�+�+�x�7�7�26��
�6�;�/���.�F��M�(�(��)D�E�E�E��

F�$�	K�	K�I��
K�Y�A�
K��
�$�$�Y�%I�J�J�J��	K�	Krc��dtjvr0tjd�tj��}n|j}d�|D��S)z:Return list of config files, from environment or standard.�DOCUTILSCONFIGc�t�g|]5}|����tj�|����6Srs)r9rwru�
expanduser)rN�fs  rrPz:OptionParser.get_standard_config_files.<locals>.<listcomp>�s5��I�I�I�!�q�w�w�y�y�I���"�"�1�%�%�I�I�Ir)rw�environr0�pathsep�standard_config_files)r`r	s  r�get_standard_config_filesz&OptionParser.get_standard_config_files�sL���r�z�)�)��:�&6�7�=�=�b�j�I�I�L�L��4�L�I�I�|�I�I�I�Irc�.�tj��5tjdt���t	��}ddd��n#1swxYwY|���D]+}|�|�|��|���,|S)Nr�r�)r�r�r�r�r�r(rr)r�r��filenames   rrz)OptionParser.get_standard_config_settings�s���
�
$�
&�
&�	 �	 ��#�H�7I�J�J�J�J��x�x�H�	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 ��6�6�8�8�	K�	K�H��O�O�D�9�9�(�C�C�T�J�J�J�J��s�*A
�
A�Ac��t��}t��}tj��5tjdt
���|xj|�||��z
c_t��}ddd��n#1swxYwY|j	D]r}|s�t|jpd��|jfzD]M}||vr�|�
|��|�|��r|�|||���N�st!|j|jt&j�|����|jS)zAReturns a dictionary containing appropriate config file settings.r�r�Nrs)�ConfigParserr1r�r�r�r�r	�readr�r
r��config_section_dependenciesr(�add�has_sectionrr{r�r
rwru�dirname)r��config_filer'�appliedr�r�sections       rrz%OptionParser.get_config_file_settings�s���$���
��%�%��
�
$�
&�
&�	 �	 ��#�H�7I�J�J�J�J�����!3�!3�K��!F�!F�F����x�x�H�	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 ���		B�		B�I��
��!�)�"G�"M�2�N�N�(�7�9�:�
B�
B���g�%�%�����G�$�$�$� �,�,�W�5�5�B��O�O�M�'�$:�D�A�A�A��

B�	�H�-� �7��G�O�O�K�8�8�	:�	:�	:�� � s�AB
�
B�Bc��|�|��\|_|_t|j|j��|j|_|S)z/Store positional arguments as runtime settings.)�
check_argsr�r�r{r�r
r	r)r�r	rs   r�check_valueszOptionParser.check_values�sB��.2�o�o�d�.C�.C�+����+��F�O�T�-H�I�I�I�#�0����
rc��dx}}|r|�d��}|dkrd}|r|�d��}|dkrd}|r|�d��|r||kr|�d��||fS)Nrr�zMaximum 2 arguments allowed.z_Do not specify the same file for both source and destination.  It will clobber the source file.)rHr)r�r�source�destinations    rr6zOptionParser.check_argss���#�#����	��X�X�a�[�[�F���}�}����	#��(�(�1�+�+�K��c�!�!�"���	7��J�J�5�6�6�6��	I�f��+�+��J�J�H�
I�
I�
I��{�"�"rc�:�|j�|��dSrX)r�r�r�r�s  r�set_defaults_from_dictz#OptionParser.set_defaults_from_dicts���
���X�&�&�&�&�&rc���tj��5tjdt���t	|j��}ddd��n#1swxYwY|j|_|S)z(Needed to get custom `Values` instances.r�r�N)r�r�r�r�r�r�r	rr<s  r�get_default_valueszOptionParser.get_default_valuess���
�
$�
&�
&�	-�	-��#�H�7I�J�J�J�J��d�m�,�,�H�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-����	-�	-�	-�	-�"&�!2����s�0A�A�Ac�x�|j|gzD]}|jD]}|j|kr|ccS��td|z���)a
        Get an option by its dest.

        If you're supplying a dest which is shared by several options,
        it is undefined which option of those is returned.

        A KeyError is raised if there is no option with the supplied
        dest.
        zNo option with dest == %r.)�
option_groups�option_listr�r;)r�r�rrs    r�get_option_by_destzOptionParser.get_option_by_destsi���'�4�&�0�	"�	"�E��+�
"�
"���;�$�&�&�!�M�M�M�M�M�'�
"��3�d�:�;�;�;r)rsNF)/r�r�r�r�r'r0�threshold_choicesrCr8r��sys�stderrr�_locale_encoding�default_error_encoding�$default_error_encoding_error_handlerr<rrbrEr4r,r[rrrKr�rr(r]�__version__�__version_details__r��platformrr�r�classmethodr(rrr7r6r=r?rCr�r�s@rr�r��s	
�������
�
������
C�H�H�J�J��G���A��A�N�N�J�@���d�D�u��E�E�u�F�F�H�?�%�g�c�j�*�d�C�C�)�!#�!4�)�!(��,>�(�	#��e	�9��,��O�4�
6�e	�4��+�	�9�-�
/�e	�
?��$�
�L�/?�"A�"A�
B�e	�/��
���L�L�
N�e	�?��T�
�}�z�%0�2�2�
3�e	�+��T�
�}�&:�%0�2�2�
3�e	�"4��
���'2�4�4�
5�#e	�(3��D�
!�l�1A�$C�$C�
D�)e	�.@��
�Y��0�
2�/e	�2:��
��^�9�;�;�
<�3e	�:A�"�
#�"�m�g����
 �;e	�B=� �
!�"�m�e�
L�
L�
N�Ce	�H8��
 �"�m�
<�
<�
>�Ie	�NC�!�
"�!�a�(�*�*�
+�Oe	�V<�$�
%�'�=�
A�
A�
C�We	�\=� �
!�!�?��&6�8�8�
9�]e	�d3�#�
$�"�O�
<�
<�
>�ee	�j<��
�!�0@�
A�
A�
C�ke	�pC��
�"�,<�
=�
=�
?�qe	�v#�)�
)��'D��.B�D�D�	
E�we	�B#��
����.B�D�D�	
E�Ce	�NK��t�
�*;��'5�)�,>�@�@�
A�Oe	�XA���
�-�!�(6� 8� 8�
9�Ye	�^@��d�
�
��&4�6�6�
7�_e	�d9��*�"3�\�"#�	�$6�8�8�
9�ee	�nC��,�=�1�!-�/�/�
0�oe	�t6��
�):�&9�)*�y�+=�?�?�
@�ue	�@@��+�,�%5�7�7�
8�Ae	�F-��.�]�G�D�D�
F�Ge	�J:��.�#3��I�I�
K�Ke	�N>��/�l�t�)9�;�;�
<�Oe	�T2��
�{�m�L�L�
N�Ue	�XI��t�
$�(�;�=�=�
>�Ye	�bB�+�
,��-L�
M�
M�
O�ce	�j,���
%�(�W�;�=�=�
>�ke	�t5�-�
-��-L�
M�
M�	
O�ue	�e	�B$�
#�
#�%I�%I�%I�K��t�
$�(�5K�;�=�=�	
>�e	�J(�0�1�,�
,�:�7�9�9�	
:�Ke	�VI���
��T�,4�!6�!6�
7�We	�\6�"�
#��-E����
�]e	�dC��,�H�h�#-�;K�M�M�
N�ee	�j9���
��)�4�
6�ke	�n-��T�
�X�v�.�
0�oe	�t�-��9�b�/�	:�ue	�v�,�-�	�3�/?�	@�we	�z�+�,�x��.F�	G�{e	�|�,�-��,�/G�	H�}e	�~�-�.��<�0H�	I�e	�@�-�.��<�0H�	I�Ae	�B�7�8��'9�<�>�>�
?�Ce	�H�,�-��,�/G�	H�Ie	�e	�h�M�R0�-1�$(�)-�*.�0�0���
�N�N�$�/�/�#�7�D�&�x�'C�C�J�GI�J�J��;�,�,�.�.�q�1�1�1�3�<�<�<�	A��
#�";�";�";�";�";�";�HK�K�K�@�J�J��[�J����!�!�!�0���#�#�#�"'�'�'����<�<�<�<�<�<�<rr�c�R��eZdZdZdddd�Z	dZdZd�fd	�	Zd
�Zd�Z	d�Z
d
�Z�xZS)r,aZParser for Docutils configuration files.

    See https://docutils.sourceforge.io/docs/user/config.html.

    Option key normalization includes conversion of '-' to '_'.

    Config file encoding is "utf-8". Encoding errors are reported
    and the affected file(s) skipped.

    This class is provisional and will change in future versions.
    )�pep_html writer�
stylesheet)rO�stylesheet_path)rO�template)�pep_stylesheet�pep_stylesheet_path�pep_templateaThe "[option]" section is deprecated.
Support for old-format configuration files will be removed in Docutils 0.21 or later.  Please revise your configuration files.  See <https://docutils.sourceforge.io/docs/user/config.html>, section "Old-Format Configuration Files".zhUnable to read configuration file "%s": content not encoded as UTF-8.
Skipping "%s" configuration file.
Nc���|�tjdtd���g}t|t��r|g}|D]�}	|t���|d���z
}n9#t$r,tj	�
|j||fz��Y�_wxYwd|vr|�|��|�|�
||����|S)Nzbfrontend.ConfigParser.read(): parameter "option_parser" will be removed in Docutils 0.21 or later.r�r�r�)r2�options)r�r�r�r6�strr�r-�UnicodeDecodeErrorrErF�write�not_utf8_error�handle_old_config�validate_settings)r��	filenamesr&�read_okr*r�s     �rr-zConfigParser.readOs����$��M�7�-��
<�
<�
<�
<����i��%�%�	$�"��I�!�
	@�
	@�H�
��5�7�7�<�<��7�<�C�C�C����%�
�
�
��
� � ��!4��(�7K�!K�L�L�L���
�����D� � ��&�&�x�0�0�0��(��&�&�x��?�?�?���s�&A&�&3B�Bc��tj|jt|d��|�d��}|�d��s|�d��|���D]z\}}||jvr;|j|\}}|�|��s|�|��nd}|}|�	||��s|�
|||���{|�d��dS)NrrWr)r��
warn_explicit�old_warning�ConfigDeprecationWarning�get_sectionr0�add_sectionr
�old_settings�
has_optionr1�remove_section)r�r*rWrr
r4r%s       rr\zConfigParser.handle_old_configgs����t�/�1I�'��	,�	,�	,��"�"�9�-�-�����	�*�*�	(����Y�'�'�'�!�-�-�/�/�		2�		2�J�C���d�'�'�'�#'�#4�S�#9� ����'�'��0�0�.��$�$�W�-�-�-��#�����?�?�7�G�4�4�
2�����'�5�1�1�1�����I�&�&�&�&�&rc��|���D]�}|�|��D]�}	|�|��}n#t$rY�%wxYw|jr�|�||��}	|�|||||���}nB#t$r5}td|�d|�dtj	|���d|�d|��
���d}~wwxYw|�
|||��|jr|�
||jd���ߌ�dS)zi
        Call the validator function and implement overrides on all applicable
        settings.
        )r'r(zError in config file "z
", section "[z]":
    z	
        z = N)�sectionsrWrCr;r�rr�rrr�r1r�)	r�r*r&r4r%rr
r�rs	         rr]zConfigParser.validate_settingsys���
�}�}���	>�	>�G��<�<��0�0�
>�
>���*�=�=�g�F�F�F�F�������H������#�:� �H�H�W�g�6�6�E�I�$*�$4�$4�#�U�M�*.�w�%5�%H�%H�	�	��%�I�I�I�(�*H�(�*H�*H�6=�*H�*H�02���0D�0D�*H�*H�5<�*H�*H�AF�*H�*H�I�I�I�����I����
�H�H�W�g�y�9�9�9��#�>��H�H�W�f�&6��=�=�=��%
>�	>�	>s)�A�
A�A�3B�
C
�0C�C
c�R�|����dd��S)z
        Lowercase and transform '-' to '_'.

        So the cmdline form of option names can be used in config files.
        r�r�)r:r�)r��	optionstrs  r�optionxformzConfigParser.optionxform�s$����� � �(�(��c�2�2�2rc��tjdtd���	t||��S#t$ricYSwxYw)z�
        Return a given section as a dictionary.

        Return empty dictionary if the section doesn't exist.

        Deprecated. Use the configparser "Mapping Protocol Access" and
        catch KeyError.
        zNfrontend.OptionParser.get_section() will be removed in Docutils 0.21 or later.r�r�)r�r�r�r�r;)r�r4s  rrdzConfigParser.get_section�sc��	�
�C�(�Q�	8�	8�	8�	8�	���W�
�&�&�&���	�	�	��I�I�I�	���s�3�A�ArX)
r�r�r�r�rfrbr[r-r\r]rmrdr�r�s@rr,r,.s��������
�
�<�E�7�9�9�L��
	4���N�
������0'�'�'�$>�>�>�43�3�3�������rr,c��eZdZdZdS)rcz3Warning for deprecated configuration file features.N)r�r�r�r�rsrrrcrc�s������=�=�=�=rrcc���tj��5tjdt���t	|�����cddd��S#1swxYwYdS)a|Return default runtime settings for `components`.

    Return a `frontend.Values` instance with defaults for generic Docutils
    settings and settings from the `components` (`SettingsSpec` instances).

    This corresponds to steps 1 and 2 in the `runtime settings priority`__.

    __ https://docutils.sourceforge.io/docs/api/runtime-settings.html
       #settings-priority
    r�r�N)r�r�r�r�r�r?)r
s r�get_default_settingsrq�s���
�	 �	"�	"�=�=����3E�F�F�F�F��J�'�'�:�:�<�<�=�=�=�=�=�=�=�=�=�=�=�=����=�=�=�=�=�=s�<A�A!�$A!)NNrX)(r��
__docformat__r!�configparserr�rrw�os.pathrEr�r]rrrrr)r,r4r<r>rArErKrRrVr[rbrpr{rtr�r�r�r��SettingsSpec�RawConfigParserr,�
FutureWarningrcrqrsrr�<module>rxsK��
.�.�`#�
��
�
�
���������"�"�"�"�"�"�	�	�	�	�����
�
�
�
�����������������
+�
+�
+�/�/�/�:>�	�	�	�	�HL�
�
�
�
�GK�����09=�A�A�A�A�9=����� AE�����;?�@�@�@�@�GK�����FJ�
�
�
�
�"GK�����AE�*�*�*�*�=A�����EI�!�!�!�!�H"�"�"�"�(:�:�:����:+#�+#�+#�+#�+#�X�_�+#�+#�+#�\"�"�"�"�"�X�_�"�"�"�JG<�G<�G<�G<�G<�8�(�(�*?�G<�G<�G<�T|�|�|�|�|�<�/�|�|�|�~>�>�>�>�>�}�>�>�>�
=�
=�
=�
=�
=r

Zerion Mini Shell 1.0