From 4e76bca1d0f028cbc422124c36494b9d6ab56bba Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 17 Dec 2024 10:50:41 +0100 Subject: [PATCH] Address suggestions from code review Co-authored-by: Carlotta Sartore --- src/rod/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rod/__main__.py b/src/rod/__main__.py index 4109eb5..5cece3f 100644 --- a/src/rod/__main__.py +++ b/src/rod/__main__.py @@ -59,7 +59,7 @@ def main() -> None: args = parser.parse_args() - log_level = "DEBUG" if args.verbose else "INFO" + log_level = logging.DEBUG if args.verbose else logging.INFO logging.basicConfig(level=log_level) @@ -67,7 +67,9 @@ def main() -> None: # Ensure file argument is provided if output or `show` is specified. if not args.file and (args.output or args.show): - parser.error("The following arguments are required: FILE.") + parser.error( + "The `--file` argument is required when using `--output` or `--show`." + ) # Show the file attributes if no output file is specified. if args.file and not (args.output or args.show):