Skip to content
Snippets Groups Projects
Commit da2f1283 authored by Moul's avatar Moul
Browse files

Set general --gtest and --endpoint options as mutually exclusives

parent fb21125f
No related branches found
No related tags found
No related merge requests found
Pipeline #33468 failed
This commit is part of merge request !249. Comments created here will be created in the context of that merge request.
...@@ -19,7 +19,7 @@ from pathlib import Path ...@@ -19,7 +19,7 @@ from pathlib import Path
import rich_click as click import rich_click as click
from duniterpy.api.endpoint import endpoint as du_endpoint from duniterpy.api.endpoint import endpoint as du_endpoint
from silkaj import tui from silkaj import tools, tui
from silkaj.about import about from silkaj.about import about
from silkaj.auth import generate_auth_file from silkaj.auth import generate_auth_file
from silkaj.blockchain.blocks import list_blocks from silkaj.blockchain.blocks import list_blocks
...@@ -77,6 +77,8 @@ click.rich_click.OPTION_GROUPS = { ...@@ -77,6 +77,8 @@ click.rich_click.OPTION_GROUPS = {
{tui.endpoint_link(du_endpoint(G1_DEFAULT_ENDPOINT).host)}. \ {tui.endpoint_link(du_endpoint(G1_DEFAULT_ENDPOINT).host)}. \
--endpoint allows to specify a custom endpoint following the format: <host>:<port>/<path>. \ --endpoint allows to specify a custom endpoint following the format: <host>:<port>/<path>. \
<port> and <path> are optional. In case no port is specified, it defaults to 443.", <port> and <path> are optional. In case no port is specified, it defaults to 443.",
cls=tools.MutuallyExclusiveOption,
mutually_exclusive=["gtest"],
) )
@click.option( @click.option(
"--gtest", "--gtest",
...@@ -85,6 +87,8 @@ click.rich_click.OPTION_GROUPS = { ...@@ -85,6 +87,8 @@ click.rich_click.OPTION_GROUPS = {
help=f"Uses official ĞTest currency endpoint: \ help=f"Uses official ĞTest currency endpoint: \
{tui.endpoint_link(du_endpoint(G1_TEST_DEFAULT_ENDPOINT).host)}. \ {tui.endpoint_link(du_endpoint(G1_TEST_DEFAULT_ENDPOINT).host)}. \
Note that --endpoint has precedence over --gtest.", Note that --endpoint has precedence over --gtest.",
cls=tools.MutuallyExclusiveOption,
mutually_exclusive=["endpoint"],
) )
@click.option( @click.option(
"--auth-scrypt", "--auth-scrypt",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment