Hi Doug,

On Thu, 7 Jul 2022 at 09:26, Douglas Anderson <diand...@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 <diand...@chromium.org>
> Tested-by: Brian Norris <briannor...@chromium.org>
> Reviewed-by: Brian Norris <briannor...@chromium.org>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Fix doc string for --ignore-bad-tags
>
>  tools/patman/main.py | 55 ++++++++++++++++++++++----------------------
>  1 file changed, 28 insertions(+), 27 deletions(-)

Sadly this patch triggers an error:

Traceback (most recent call last):
  File "./tools/patman/patman", line 9, in <module>
    from argparse import ArgumentParser, BooleanOptionalAction
ImportError: cannot import name 'BooleanOptionalAction' from
'argparse' (/usr/lib/python3.8/argparse.py)


I've dropped it and the next one. Can you please take a look?

Regards,
Simon

Reply via email to