diff --git a/docs/scripts/generate_snippet.py b/docs/scripts/generate_snippet.py index f224ade43..da3064553 100755 --- a/docs/scripts/generate_snippet.py +++ b/docs/scripts/generate_snippet.py @@ -28,6 +28,8 @@ from rich.markup import escape from rich.progress import Progress +sys.path.insert(0, str(pathlib.Path(__file__).parents[2])) + from anta.cli.console import console from anta.cli.nrfu.utils import anta_progress_bar @@ -78,9 +80,6 @@ def main(args: list[str], output: Literal["svg", "txt"] = "svg") -> None: # possibly-used-before-assignment - prog / function_name -> not understanding sys.exit here... # pylint: disable=E0606 sys.argv = [prog, *args[1:]] - from pathlib import Path - - sys.path.insert(0, str(Path(__file__).parents[2])) module = import_module(module_path) function = getattr(module, function_name) diff --git a/docs/snippets/anta_nrfu_csv_help.txt b/docs/snippets/anta_nrfu_csv_help.txt index cef5b702f..cec309ffb 100644 --- a/docs/snippets/anta_nrfu_csv_help.txt +++ b/docs/snippets/anta_nrfu_csv_help.txt @@ -5,5 +5,5 @@ Usage: anta nrfu csv [OPTIONS] Options: --csv-output FILE Path to save report as a CSV file [env var: - ANTA_NRFU_CSV_CSV_OUTPUT] + ANTA_NRFU_CSV_CSV_OUTPUT; required] --help Show this message and exit. diff --git a/docs/snippets/anta_nrfu_json_help.txt b/docs/snippets/anta_nrfu_json_help.txt index fe08e99be..6aebec9c4 100644 --- a/docs/snippets/anta_nrfu_json_help.txt +++ b/docs/snippets/anta_nrfu_json_help.txt @@ -3,6 +3,8 @@ Usage: anta nrfu json [OPTIONS] ANTA command to check network state with JSON results. + If no `--output` is specified, the output is printed to stdout. + Options: -o, --output FILE Path to save report as a JSON file [env var: ANTA_NRFU_JSON_OUTPUT]