neithere / argh

An argparse wrapper that doesn't make you say "argh" each time you deal with it.
http://argh.rtfd.org
GNU Lesser General Public License v3.0
369 stars 55 forks source link

Strip trailing underscore from option names #223

Open djpohly opened 7 months ago

djpohly commented 7 months ago

Removes a trailing underscore from function argument names when inferring option names, to avoid name clashes with reserved words and builtins (e.g. --class or --all). Implements #222.

djpohly commented 7 months ago

(After some further testing, it looks like there are other places where the mapping needs to be adjusted, so this is a draft for now.)