[PATCH v2 4/6] patman: Make most bool arguments BooleanOptionalAction
Simon Glass
sjg at chromium.org
Tue Jul 5 11:59:08 CEST 2022
On Fri, 1 Jul 2022 at 14:24, Douglas Anderson <dianders at chromium.org> wrote:
>
> For boolean arguments it's convenient to be able to specify both the
> argument and its opposite on the command line. This is especially
> convenient because you can change the default via the settings file
> and being able express the opposite can be the only way to override
> things.
>
> Luckily python handles this well--we just need to specify things with
> BooleanOptionalAction. We'll do that for all options except
> "full-help" (where it feels silly). This uglifies the help text a
> little bit but does give maximum flexibility.
>
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
> Tested-by: Brian Norris <briannorris at chromium.org>
> Reviewed-by: Brian Norris <briannorris at chromium.org>
> ---
>
> Changes in v2:
> - Fix doc string for --ignore-bad-tags
>
> tools/patman/main.py | 55 ++++++++++++++++++++++----------------------
> 1 file changed, 28 insertions(+), 27 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list