Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlights since 3.1: * Clize now parses Sphinx-style docstrings. It is the recommended way of documenting functions now, as it is interoperable and not specific to Clize. * Value converters can now convert the default value for their parameter. Specify `convert_default=True` when decorating with `value_converter`. * `converters.file`: * you can use it without parenthesis now: `def * func(infile:converters.file):` * it now converts the default parameter: `infile:converters.file='-'` gives a file opener for stdin if no value was provided by the user * Dropped Python 2.6 support. Use Clize 3.1 if you need to support it. * Clize now shows a hint if a subcommand is misspelled. * Extension API changes: * `parser.CliBoundArguments` now uses the `attrs` package. Instead of parsing arguments on instantiation, it has a process_arguments method for this. This is a breaking change if you were instantiating it directly rather than use `parser.CliSignature.read_arguments` * Separate the value setting logic in `ParameterWithValue` to a `set_value` method. Most parameter types don't need to override `read_argument` anymore. * Separated the help CLI from documentation generation and display. Also comes with more `attrs`. This API is now documented. * Fix wrong docstring being used for header/footer text when the intended function had no (visible) parameters.
- Loading branch information