trevorld / r-argparse

command-line optional and positional argument parser
GNU General Public License v2.0
103 stars 11 forks source link

Allow use of add_help argument in ArgumentParser creation #27

Closed chlige closed 5 years ago

chlige commented 5 years ago

If the add_help argument is added in the ArgumentParser creation statement it is not properly translated into a Python boolean. Currently it is converted into a string. The following patch would properly convert an R boolean into a python boolean. I grant the main developer a non-exclusive unlimited license for the code in this patch.

argparse-patch.txt

trevorld commented 5 years ago

@chlige Thanks for the bug report (and patch)! Should be fixed now in the development version. Decided this was a good point for me to re-factor the convert_..._to_arguments code a bit to hopefully fix more of these conversion bugs so I didn't directly use your patch.