@@ -4470,7 +4470,7 @@ def subnets_list(
4470
4470
[green]$[/green] btcli subnets list
4471
4471
"""
4472
4472
if json_output and live_mode :
4473
- print_error ("Cannot use --json-output and --live at the same time." )
4473
+ print_error ("Cannot use ` --json-output` and ` --live` at the same time." )
4474
4474
return
4475
4475
self .verbosity_handler (quiet , verbose , json_output )
4476
4476
subtensor = self .initialize_chain (network )
@@ -4515,6 +4515,9 @@ def subnets_price(
4515
4515
help = "Show the price in log scale." ,
4516
4516
),
4517
4517
html_output : bool = Options .html_output ,
4518
+ quiet : bool = Options .quiet ,
4519
+ verbose : bool = Options .verbose ,
4520
+ json_output : bool = Options .json_output ,
4518
4521
):
4519
4522
"""
4520
4523
Shows the historical price of a subnet for the past 24 hours.
@@ -4532,6 +4535,10 @@ def subnets_price(
4532
4535
[green]$[/green] btcli subnets price --all --html
4533
4536
[green]$[/green] btcli subnets price --netuids 1,2,3,4 --html
4534
4537
"""
4538
+ if json_output and html_output :
4539
+ print_error ("Cannot specify both `--json-output` and `--html`" )
4540
+ return
4541
+ self .verbosity_handler (quiet = quiet , verbose = verbose , json_output = json_output )
4535
4542
if netuids :
4536
4543
netuids = parse_to_list (
4537
4544
netuids ,
@@ -4540,23 +4547,23 @@ def subnets_price(
4540
4547
)
4541
4548
if all_netuids and netuids :
4542
4549
print_error ("Cannot specify both --netuid and --all-netuids" )
4543
- raise typer . Exit ()
4550
+ return
4544
4551
4545
4552
if not netuids and not all_netuids :
4546
4553
netuids = Prompt .ask (
4547
- "Enter the [blue]netuid(s)[/blue] to view the price of in comma-separated format [dim](or Press Enter to view all subnets)[/dim]" ,
4554
+ "Enter the [blue]netuid(s)[/blue] to view the price of in comma-separated format [dim]"
4555
+ "(or Press Enter to view all subnets)[/dim]" ,
4548
4556
)
4549
4557
if not netuids :
4550
4558
all_netuids = True
4551
- html_output = True
4552
4559
else :
4553
4560
netuids = parse_to_list (
4554
4561
netuids ,
4555
4562
int ,
4556
4563
"Netuids must be a comma-separated list of ints, e.g., `--netuids 1,2,3,4`." ,
4557
4564
)
4558
4565
4559
- if all_netuids :
4566
+ if all_netuids and not json_output :
4560
4567
html_output = True
4561
4568
4562
4569
if html_output and is_linux ():
@@ -4570,6 +4577,7 @@ def subnets_price(
4570
4577
interval_hours ,
4571
4578
html_output ,
4572
4579
log_scale ,
4580
+ json_output ,
4573
4581
)
4574
4582
)
4575
4583
0 commit comments