-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.vizzarro@arm.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information
Showing
2 changed files
with
235 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.