class documentation

class OptionsManagerMixIn: (source)

Known subclasses: pylint.config.ConfigurationMixIn

View In Hierarchy

Handle configuration from both a configuration file and command line options.

Method __init__ Undocumented
Method add_optik_option Undocumented
Method add_option_group Undocumented
Method cb_set_provider_option Optik callback for option setting.
Method generate_config Write a configuration file according to the current configuration into the given stream or stdout.
Method global_set_option Set option on the correct option provider.
Method help Return the usage string for available options.
Method load_command_line_configuration Override configuration according to command line parameters.
Method load_config_file Dispatch values previously read from a configuration file to each option's provider.
Method load_configuration Override configuration according to given parameters.
Method load_configuration_from_config Undocumented
Method load_provider_defaults Initialize configuration using default values.
Method optik_option Get our personal option definition and return a suitable form for use with optik/optparse.
Method read_config_file Read the configuration file but do not load it (i.e. dispatching values to each option's provider).
Method register_options_provider Register an options provider.
Method reset_parsers Undocumented
Instance Variable cfgfile_parser Undocumented
Instance Variable cmdline_parser Undocumented
Instance Variable options_providers Undocumented
Method _parse_toml Parse and handle errors of a toml configuration file.
Instance Variable _all_options Undocumented
Instance Variable _maxlevel Undocumented
Instance Variable _mygroups Undocumented
Instance Variable _nocallback_options Undocumented
Instance Variable _optik_option_attrs Undocumented
Instance Variable _short_options Undocumented
def __init__(self, usage: str): (source)

Undocumented

def add_optik_option(self, provider: OptionsProviderMixin, optikcontainer: Any, opt: str, optdict: OptionDict): (source)

Undocumented

def add_option_group(self, group_name: str, _: Any, options: Any, provider: OptionsProviderMixin): (source)

Undocumented

def cb_set_provider_option(self, option: Option, opt: str, value: Any, parser: Any): (source)

Optik callback for option setting.

def generate_config(self, stream: TextIO|None = None, skipsections: tuple[str, ...] = ()): (source)

Write a configuration file according to the current configuration into the given stream or stdout.

def global_set_option(self, opt: str, value: Any): (source)

Set option on the correct option provider.

def help(self, level: int = 0) -> str: (source)

Return the usage string for available options.

def load_command_line_configuration(self, args: list[str]|None = None) -> list[str]: (source)

Override configuration according to command line parameters. return additional arguments

def load_config_file(self): (source)

Dispatch values previously read from a configuration file to each option's provider.

def load_configuration(self, **kwargs: Any): (source)

Override configuration according to given parameters.

def load_configuration_from_config(self, config: dict[str, Any]): (source)

Undocumented

def load_provider_defaults(self): (source)

Initialize configuration using default values.

def optik_option(self, provider: OptionsProviderMixin, opt: str, optdict: OptionDict) -> tuple[list[str], OptionDict]: (source)

Get our personal option definition and return a suitable form for use with optik/optparse.

def read_config_file(self, config_file: Path|None = None, verbose: bool = False): (source)

Read the configuration file but do not load it (i.e. dispatching values to each option's provider).

def register_options_provider(self, provider: OptionsProviderMixin, own_group: bool = True): (source)

Register an options provider.

def reset_parsers(self, usage: str = ''): (source)

Undocumented

cfgfile_parser = (source)

Undocumented

cmdline_parser = (source)

Undocumented

options_providers: list[OptionsProviderMixin] = (source)

Undocumented

def _parse_toml(self, config_file: Path, parser: configparser.ConfigParser): (source)

Parse and handle errors of a toml configuration file.

_all_options: collections.OrderedDict[Any, Any] = (source)

Undocumented

_maxlevel = (source)

Undocumented

_mygroups: dict[Any, Any] = (source)

Undocumented

_nocallback_options: dict[Any, Any] = (source)

Undocumented

_optik_option_attrs = (source)

Undocumented

_short_options: dict[Any, Any] = (source)

Undocumented