Part of bzrlib.option View In Hierarchy
Known subclasses: bzrlib.conflicts.ResolveActionOption
The values for the options correspond to entries in the registry. Input must be a registry key. After validation, it is converted into an object using Registry.get or a caller-provided converter.
| Method | validate_value | Validate a value name |
| Method | convert | Convert a value name into an output type |
| Method | __init__ | Constructor. |
| Method | registry | Undocumented |
| Static Method | from_kwargs | Convenience method to generate string-map registry options |
| Method | add_option | Add this option to an Optparse parser |
| Method | iter_switches | Iterate through the list of switches provided by the option |
| Method | is_hidden | Undocumented |
| Method | _optparse_value_callback | Undocumented |
Inherited from Option:
| Method | short_name | Undocumented |
| Method | set_short_name | Undocumented |
| Method | get_negation_name | Undocumented |
| Method | _optparse_bool_callback | Undocumented |
| Method | _optparse_callback | Undocumented |
| Parameters | name | The option name. |
| help | Help for the option. | |
| registry | A Registry containing the values | |
| converter | Callable to invoke with the value name to produce the value. If not supplied, self.registry.get is used. | |
| value_switches | If true, each possible value is assigned its own switch. For example, instead of '--format knit', '--knit' can be used interchangeably. | |
| enum_switch | If true, a switch is provided with the option name, which takes a value. | |
| lazy_registry | A tuple of (module name, attribute name) for a registry to be lazily loaded. | |
| short_name | The short name for the enum switch, if any | |
| short_value_switches | A dict mapping values to short names |
name, help, value_switches and enum_switch are passed to the RegistryOption constructor. Any other keyword arguments are treated as values for the option, and their value is treated as the help.
| Returns | an iterator of (name, short_name, argname, help) | |