diff options
| author | Scott Gasch <[email protected]> | 2022-05-28 12:58:51 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-05-28 12:58:51 -0700 |
| commit | 56bc30dfecdf11d477c97afe0ebef234a18ee258 (patch) | |
| tree | 2c7057a9c663af1277c3dddcff55af5315c3ffd3 | |
| parent | c08841600a2f61049cdb1a152407a1fb8ca129a5 (diff) | |
Allowances for getting sphinx docs set up.
| -rw-r--r-- | argparse_utils.py | 2 | ||||
| -rw-r--r-- | config.py | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/argparse_utils.py b/argparse_utils.py index 83a3aa4..6055f1a 100644 --- a/argparse_utils.py +++ b/argparse_utils.py @@ -33,6 +33,8 @@ class ActionNoYes(argparse.Action): --enable_the_thing --no_enable_the_thing + These arguments can be used to indicate the inclusion or exclusion of + binary exclusive behaviors. """ def __init__(self, option_strings, dest, default=None, required=False, help=None): @@ -106,6 +106,11 @@ ARGS = argparse.ArgumentParser( formatter_class=OptionalRawFormatter, fromfile_prefix_chars="@", epilog=f'{PROGRAM_NAME} uses config.py ({__file__}) for global, cross-module configuration setup and parsing.', + # I don't fully understand why but when loaded by sphinx sometimes + # the same module is loaded many times causing any arguments it + # registers via module-level code to be redefined. Work around + # this iff the program is 'sphinx-build' + conflict_handler='resolve' if PROGRAM_NAME == 'sphinx-build' else 'error', ) # Keep track of if we've been called and prevent being called more |
