From 7ed0b3225eacccd25325103ae4c32a9f16e51dc4 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Sat, 4 Apr 2026 20:46:30 +0500 Subject: [PATCH] fix: clean up --json flag from PR #6 - Fix trailing whitespace (ruff W293) - Rename is_json -> json_output for clarity - Use console.print() instead of bare print() for consistency --- soup_cli/cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/soup_cli/cli.py b/soup_cli/cli.py index 7b13f79..d66414d 100644 --- a/soup_cli/cli.py +++ b/soup_cli/cli.py @@ -92,19 +92,19 @@ data.app.command(name="generate")(generate.generate) @app.command() def version( full: bool = typer.Option(False, "--full", "-f", help="Show system info and extras"), - is_json: bool = typer.Option(False, "--json", help="Output in JSON format"), + json_output: bool = typer.Option(False, "--json", help="Output in JSON format"), ): """Show Soup CLI version.""" import json import platform - if is_json: + if json_output: info = { "version": __version__, "python": platform.python_version(), "platform": platform.system().lower(), } - + if full: for lib in ["torch", "transformers", "peft", "trl", "datasets", "accelerate"]: try: @@ -124,8 +124,8 @@ def version( info[name] = "installed" except ImportError: pass - - print(json.dumps(info)) + + console.print(json.dumps(info), highlight=False) return if not full: