AQIT 0.1.0
Loading...
Searching...
No Matches
cli_flags.py
Go to the documentation of this file.
1# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2"""Shared CLI flag helpers."""
3
4from __future__ import annotations
5
6import sys
7
8
10 args: list[str],
11 *,
12 save_hint: str | None = "--save <path>",
13 dir_hint: str | None = None,
14) -> None:
15 """Reject removed --output / --format flags with actionable hints."""
16 for i, a in enumerate(args):
17 if a not in ("--output", "--format", "--output-json"):
18 continue
19 print("Error: --output was removed.", file=sys.stderr)
20 print(" Use --check to save JSON + PNG check artifacts in the current directory.", file=sys.stderr)
21 if save_hint:
22 print(f" For a custom export path use {save_hint}.", file=sys.stderr)
23 if dir_hint:
24 print(f" For capture output directory use {dir_hint}.", file=sys.stderr)
25 sys.exit(1)
None reject_legacy_output_flags(list[str] args, *, str|None save_hint="--save <path>", str|None dir_hint=None)
Definition cli_flags.py:18