summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-06-02 08:23:18 -0700
committerScott Gasch <[email protected]>2022-06-02 08:23:18 -0700
commita0722abe80c416e0c174f3ff861566834402d43b (patch)
treeb80aaff7a143fc7eae3165d4174789a794d72f30 /config.py
parent2a6d7810f85b88fb89d11d3e6be64f974ab77f97 (diff)
Initial stab at a smarter doc/unit/integration/coverage test runner.
Diffstat (limited to 'config.py')
-rw-r--r--config.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/config.py b/config.py
index 7bf812e..c7c686d 100644
--- a/config.py
+++ b/config.py
@@ -254,6 +254,19 @@ def _reorder_arg_action_groups_before_help(entry_module: Optional[str]):
return reordered_action_groups
+def print_usage() -> None:
+ """Prints the normal help usage message out."""
+ ARGS.print_help()
+
+
+def usage() -> str:
+ """
+ Returns:
+ program usage help text as a string.
+ """
+ return ARGS.format_usage()
+
+
def _augment_sys_argv_from_environment_variables():
"""Internal. Look at the system environment for variables that match
arg names. This is done via some munging such that:
@@ -269,7 +282,7 @@ def _augment_sys_argv_from_environment_variables():
"""
- usage_message = ARGS.format_usage()
+ usage_message = usage()
optional = False
var = ''
for x in usage_message.split():