Reorder and improve command line argument definitions for better organization
- Change verbose to store_true action - Move verbose flag to logging section - Move auto-scan flag to end of options
This commit is contained in:
@@ -180,6 +180,12 @@ def parse_args() -> argparse.Namespace:
|
|||||||
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
||||||
help="Logging level (default: from env or INFO)",
|
help="Logging level (default: from env or INFO)",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--verbose",
|
||||||
|
action="store_true",
|
||||||
|
default=get_env_value("VERBOSE", False, bool),
|
||||||
|
help="Enable verbose debug output(only valid for DEBUG log-level)",
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--key",
|
"--key",
|
||||||
@@ -205,12 +211,6 @@ def parse_args() -> argparse.Namespace:
|
|||||||
default=get_env_value("SSL_KEYFILE", None),
|
default=get_env_value("SSL_KEYFILE", None),
|
||||||
help="Path to SSL private key file (required if --ssl is enabled)",
|
help="Path to SSL private key file (required if --ssl is enabled)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--auto-scan-at-startup",
|
|
||||||
action="store_true",
|
|
||||||
default=False,
|
|
||||||
help="Enable automatic scanning when the program starts",
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--history-turns",
|
"--history-turns",
|
||||||
@@ -252,10 +252,10 @@ def parse_args() -> argparse.Namespace:
|
|||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--verbose",
|
"--auto-scan-at-startup",
|
||||||
type=bool,
|
action="store_true",
|
||||||
default=get_env_value("VERBOSE", False, bool),
|
default=False,
|
||||||
help="Verbose debug output(default: from env or false)",
|
help="Enable automatic scanning when the program starts",
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
Reference in New Issue
Block a user