class ConfigHandler(Generic[
Known subclasses: setuptools.config.setupcfg.ConfigMetadataHandler
, setuptools.config.setupcfg.ConfigOptionsHandler
, setuptools.tests.config.test_setupcfg.ErrConfigHandler
Handles metadata supplied in configuration files.
Method | __init__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | parse |
Parses configuration file items from one or more related sections. |
Method | parse |
Parses configuration file section. |
Class Variable | aliases |
Options aliases. For compatibility with various packages. E.g.: d2to1 and pbr. Note: `-` in keys is replaced with `_` by config parser. |
Class Variable | section |
Prefix for config sections handled by this handler. Must be provided by class heirs. |
Instance Variable | ensure |
Undocumented |
Instance Variable | ignore |
Undocumented |
Instance Variable | sections |
Undocumented |
Instance Variable | set |
Undocumented |
Instance Variable | target |
Undocumented |
Property | parsers |
Metadata item name to parser function mapping. |
Class Method | _exclude |
Returns a parser function to make sure field inputs are not files. |
Class Method | _get |
Returns parser function to represents value as a list. |
Class Method | _parse |
Represents value as boolean. |
Class Method | _parse |
Represents value as a dict. |
Class Method | _parse |
Represents value as a list. |
Class Method | _parse |
Parses section options into a dictionary. |
Class Method | _parse |
Parses section options into a dictionary. |
Class Method | _section |
Undocumented |
Method | _deprecated |
this function will wrap around parameters that are deprecated |
Method | _parse |
Represents value as a module attribute. |
Method | _parse |
Represents value as a string, allowing including text from nearest files using `file:` directive. |
Instance Variable | _referenced |
After parsing configurations, this property will enumerate all files referenced by the "file:" directive. Private API for setuptools only. |
Target
, options: AllCommandOptions
, ignore_option_errors, ensure_discovered: expand.EnsurePackagesDiscovered
):
(source)
¶
setuptools.config.setupcfg.ConfigMetadataHandler
, setuptools.config.setupcfg.ConfigOptionsHandler
Undocumented
setuptools.config.setupcfg.ConfigMetadataHandler
Options aliases. For compatibility with various packages. E.g.: d2to1 and pbr. Note: `-` in keys is replaced with `_` by config parser.
setuptools.config.setupcfg.ConfigMetadataHandler
, setuptools.config.setupcfg.ConfigOptionsHandler
, setuptools.tests.config.test_setupcfg.ErrConfigHandler
Prefix for config sections handled by this handler. Must be provided by class heirs.
setuptools.config.setupcfg.ConfigMetadataHandler
, setuptools.config.setupcfg.ConfigOptionsHandler
Metadata item name to parser function mapping.
Returns a parser function to make sure field inputs are not files. Parses a value after getting the key so error messages are more informative. :param key: :rtype: callable
Returns parser function to represents value as a list. Parses a value applying given methods one after another. :param parse_methods: :rtype: callable
Represents value as a list. Value is split either by separator (defaults to comma) or by lines. :param value: :param separator: List items separator character. :rtype: list
Parses section options into a dictionary. Optionally applies a given parser to each value. :param dict section_options: :param callable values_parser: function with 1 arg corresponding to option value :rtype: dict
Parses section options into a dictionary. Applies a given parser to each option in a section. :param dict section_options: :param callable values_parser: function with 2 args corresponding to key, value :rtype: dict
this function will wrap around parameters that are deprecated :param msg: deprecation message :param warning_class: class of warning exception to be raised :param func: function to be wrapped around
Represents value as a module attribute. Examples: attr: package.attr attr: package.module.attr :param str value: :rtype: str