From 7d79e919fa5578f7c91801ce74f8853482450bb6 Mon Sep 17 00:00:00 2001 From: Rima <153289003+casks-mutters@users.noreply.github.com> Date: Fri, 21 Nov 2025 02:31:19 -0500 Subject: [PATCH] Automatically swap from/to block if user passes reversed range Friendly UX: --from-block 200 --to-block 100 still works. --- quick_audit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quick_audit.py b/quick_audit.py index 9c4dae3..f703efb 100644 --- a/quick_audit.py +++ b/quick_audit.py @@ -56,6 +56,13 @@ def main() -> None: file=sys.stderr, ) sys.exit(1) + if args.from_block > args.to_block: + print( + f"INFO: Swapping from-block ({args.from_block}) and to-block ({args.to_block}) " + "to ensure ascending order.", + file=sys.stderr, + ) + args.from_block, args.to_block = args.to_block, args.from_block repo_dir = pathlib.Path(__file__).resolve().parent log_audit_path = repo_dir / "log_audit.py"