When I did my last pull request I noticed some weird usage of argparse's `add_argument' kwargs.
Parsing of command-line arguments is now done in a separate function
which returns the parsed arguments. Additionally, most of the
add_argument calls are now using the correct way to display help
about what the argument is doing. Previously the metavar kwarg was
used and not the help kwarg. I added some additional information
where I thought the current help message was not enough (e.g. for the
play_pause indicator it is really helpful to know that the argument
expects a command separated string where 'play' comes first and 'pause'
comes second.) Also, I added default values where possible to remove
the kind of boilerplate code that checked if the command line
argument is present and if so replaced a default value. This is now
handled by argparse using the default kwarg.
When I did my last pull request I noticed some weird usage of argparse's `add_argument' kwargs.
Parsing of command-line arguments is now done in a separate function which returns the parsed arguments. Additionally, most of the
add_argument
calls are now using the correct way to display help about what the argument is doing. Previously themetavar
kwarg was used and not thehelp
kwarg. I added some additional information where I thought the current help message was not enough (e.g. for the play_pause indicator it is really helpful to know that the argument expects a command separated string where 'play' comes first and 'pause' comes second.) Also, I added default values where possible to remove the kind of boilerplate code that checked if the command line argument is present and if so replaced a default value. This is now handled by argparse using thedefault
kwarg.