AQIT
0.1.0
Toggle main menu visibility
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
4
from
__future__
import
annotations
5
6
import
sys
7
8
9
def
reject_legacy_output_flags
(
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)
aquin.cli_flags.reject_legacy_output_flags
None reject_legacy_output_flags(list[str] args, *, str|None save_hint="--save <path>", str|None dir_hint=None)
Definition
cli_flags.py:18
aquin
cli_flags.py
AQIT · Aquin Labs Private Limited · Apache 2.0 · Generated by
1.18.0