On Fri, May 31, 2024 at 7:22 AM Luca Vizzarro <luca.vizza...@arm.com> wrote: > > The existing argument handling in the code relies on basic argparse > functionality and a custom argparse action to integrate environment > variables. This commit improves the current handling by augmenting > argparse. > > This rework implements the following improvements: > - There are duplicate expressions scattered throughout the code. To > improve readability and maintainability, these are refactored > into list/dict comprehensions or factory functions. > - Instead of relying solely on argument flags, error messages now > accurately reference environment variables when applicable, enhancing > user experience. For instance: > > error: environment variable DTS_DPDK_TARBALL: Invalid file > > - Knowing the number of environment variables and arguments set > allow for a useful help page display when none are provided. > - A display of which environment variables have been detected and their > corresponding values in the help page, aiding user awareness. > > Signed-off-by: Luca Vizzarro <luca.vizza...@arm.com> > Reviewed-by: Paul Szczepanek <paul.szczepa...@arm.com>
Reviewed-by: Jeremy Spewock <jspew...@iol.unh.edu>