fix: refuse two output forms in diff_truth

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 08:40:01 +02:00
1 parent b23f5b04ad
commit 6dc373fcfd
3 files changed
+30 -3

No files matched your search

+9 -2
View File
@@ -168,12 +168,19 @@ def main() -> None:
"--all", action="store_true", help="diff all registered platforms"
)
group.add_argument("--platform", help="diff a single platform")
parser.add_argument(
# One output form: --json beside --format markdown printed JSON and
# dropped the markdown without a word.
output = parser.add_mutually_exclusive_group()
output.add_argument(
"--json", action="store_true", dest="json_output", help="JSON output"
)
parser.add_argument(
output.add_argument(
"--format", choices=["terminal", "markdown"], default="terminal"
)
output.add_argument(
"--markdown", action="store_const", const="markdown", dest="format",
help="same as --format markdown, the spelling validate_pr uses",
)
parser.add_argument("--truth-dir", default="dist/truth")
parser.add_argument("--platforms-dir", default="platforms")
parser.add_argument(