nodeca/argparse — pull request #47 by hpaulj (2013-02-09 21:42:29+00:00)
Title: Conflict handler with 'resolve', issue #46

This closely follows the conflict handler code in argparse.py, implementing the 'error' and 'resolve' alternatives as ActionContainer functions.

Most of the changes are in action_container.js. Changes in group.js and argument_parser.js correctly pass the conflictHandler option to the container and container groups (such as parser._optionals). I also had to correct how .splice() is used to remove actions from lists.

test/conflict.js has tests for this change, including the relevant ones from test_argparse.py. I left one conflict handler test in base.js, but removed the 'resolve' test. Most of the tests look at the formatHelp output.