class documentation

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`.

Class Method get_standard_config_files Return list of config files, from environment or standard.
Method __init__ Set up OptionParser instance.
Method check_args Undocumented
Method check_values Store positional arguments as runtime settings.
Method get_config_file_settings Returns a dictionary containing appropriate config file settings.
Method get_default_values Needed to get custom `Values` instances.
Method get_option_by_dest Get an option by its dest.
Method get_standard_config_settings Undocumented
Method populate_from_components Collect settings specification from components.
Method set_defaults_from_dict Undocumented
Class Variable booleans Lookup table for boolean configuration file settings.
Class Variable config_section The name of the config file section specific to this component (lowercase, no brackets). Override in subclasses.
Class Variable default_error_encoding Undocumented
Class Variable default_error_encoding_error_handler Undocumented
Class Variable settings_defaults Defaults for settings without command-line option equivalents.
Class Variable settings_spec Runtime settings and command-line options common to all Docutils front ends. Setting specs specific to individual Docutils components are also used (see `populate_from_components()`).
Class Variable standard_config_files Docutils configuration files, using ConfigParser syntax.
Class Variable threshold_choices Possible inputs for for --report and --halt threshold values.
Class Variable thresholds Lookup table for --report and --halt threshold values.
Class Variable version_template Default version message.
Instance Variable components Undocumented
Instance Variable config_files List of paths of applied configuration files.
Instance Variable lists Set of list-type settings.
Instance Variable relative_path_settings Settings containing filesystem paths. Override in subclasses. Settings listed here are to be interpreted relative to the current working directory.
Instance Variable version Undocumented

Inherited from SettingsSpec:

Class Variable config_section_dependencies A list of names of config file sections that are to be applied before `config_section`, in order (from general to specific). In other words, the settings in `config_section` are to be overlaid on top of the settings from these sections...
Class Variable settings_default_overrides A dictionary of auxiliary defaults, to override defaults for settings defined in other components' `setting_specs`. Override in subclasses.
@classmethod
def get_standard_config_files(cls): (source)

Return list of config files, from environment or standard.

def __init__(self, components=(), defaults=None, read_config_files=False, *args, **kwargs): (source)

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.

def check_args(self, args): (source)

Undocumented

def check_values(self, values, args): (source)

Store positional arguments as runtime settings.

def get_config_file_settings(self, config_file): (source)

Returns a dictionary containing appropriate config file settings.

def get_default_values(self): (source)

Needed to get custom `Values` instances.

def get_option_by_dest(self, dest): (source)

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.

def get_standard_config_settings(self): (source)

Undocumented

def populate_from_components(self, components): (source)

Collect 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.

def set_defaults_from_dict(self, defaults): (source)

Undocumented

booleans: dict[str, bool] = (source)

Lookup table for boolean configuration file settings.

config_section: str = (source)

The name of the config file section specific to this component (lowercase, no brackets). Override in subclasses.

default_error_encoding = (source)

Undocumented

default_error_encoding_error_handler: str = (source)

Undocumented

settings_defaults: dict = (source)

Defaults for settings without command-line option equivalents. See https://docutils.sourceforge.io/docs/user/config.html#internal-settings

settings_spec = (source)

Runtime settings and command-line options common to all Docutils front ends. Setting specs specific to individual Docutils components are also used (see `populate_from_components()`).

standard_config_files: list[str] = (source)

Docutils configuration files, using ConfigParser syntax. Filenames will be tilde-expanded later. Later files override earlier ones.

threshold_choices = (source)

Possible inputs for for --report and --halt threshold values.

thresholds: dict[str, int] = (source)

Lookup table for --report and --halt threshold values.

version_template = (source)

Default version message.

components = (source)

Undocumented

config_files: list = (source)

List of paths of applied configuration files.

lists: dict = (source)

Set of list-type settings.

relative_path_settings: list[str] = (source)

Settings containing filesystem paths. Override in subclasses. Settings listed here are to be interpreted relative to the current working directory.

version = (source)

Undocumented