Z}R d Z dZddlZddlZddlZddlmZ ddlZddlZddlZddl Z ddl Z ddl mZmZ d Z d Z d#dZ d#d Z d#d Z d#dZ d#dZ d#d Z d#dZ d#dZ d#dZ d#dZ d#dZ d#dZ d#dZd$dZd Zd Z G d dej Z G d dej Z G d dej! e j" Z! G d dej# Z$ G d 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)ioutilsc |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)setattrvaluesitems)optionoptvalueparserargskwargs attributekeys q/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/docutils/frontend.pystore_multipler E sf 0 0 y$////llnn + + U sE****+ + c | | }n,# t $ r}| | Y d}~nd}~ww xY w|j || dS )zQ Read a configuration file during option processing. (Option callback.) N)get_config_file_settings ValueErrorerrorr update)r r r r new_settingserrs r read_config_filer R sz 66u== S Mv.....s A<Ac |dk rd S t j | n$# t $ r t d| d|d w xY w|S )N z setting "z": unknown encoding: "")codecslookupLookupErrorsettingr option_parser config_parserconfig_sections r validate_encodingr) ] sp {{t. e . . .k$WWeee- . . .. Ls !A c r t j | n # t $ r t d|z w xY w|S )Nzunknown 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, i s^ 5E"""" 5 5 5 , /4 45 5 55 Ls 4c d|v re| 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, setr r r) )r% r r&