Skip to content

1.7.4

Choose a tag to compare

@bw2 bw2 released this 10 Mar 23:26
· 12 commits to master since this release
d798e3a

Bug Fixes

  • Fix environment variables being ignored when using subparsers (#350). The _find_insertion_index() method now detects subparser commands and inserts env var / config file args before the subcommand, so the parent parser processes them correctly.

Improvements

  • Add input validation to ArgumentParser.init() with clear error messages (#349):
    • config_file_parser_class must be a ConfigFileParser subclass (or instance); suggests formatter_class if wrong type is passed
    • formatter_class validates it's a HelpFormatter subclass; suggests config_file_parser_class if swapped
    • default_config_files, args_for_setting_config_path, and args_for_writing_out_config_file must be lists/tuples, not strings
    • config_file_open_func must be callable

Docs

  • Convert README from reStructuredText to Markdown (#347, #348)