The prompt_choices function would try to call string.ascii_lowercase(rv) where rv is a string. This would raise an error because ascii_lowercase is not a function. Assuming that the intended result is a lowercase version of the string, this has been changed to use rv.lower() Also the check:: if isinstance(string, basestring): has been changed to:: if type(string) is str: because basestring is not defined in python3.
If args has no attribute callback, the help text should be printed. Because there was a check to:: if args.callback is 'x': It would raise an error before the parser.print_help() was reached.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.