diff --git a/chia/cmds/chia.py b/chia/cmds/chia.py index bba5754c5b1e..ae1350ce22ce 100644 --- a/chia/cmds/chia.py +++ b/chia/cmds/chia.py @@ -137,8 +137,6 @@ def run_daemon_cmd(ctx: click.Context, wait_for_unlock: bool) -> None: def main() -> None: - import chia.cmds.signer # noqa - cli() diff --git a/chia/cmds/signer.py b/chia/cmds/signer.py index b5afcd803a10..c5e7ac8fcced 100644 --- a/chia/cmds/signer.py +++ b/chia/cmds/signer.py @@ -38,7 +38,7 @@ def _clear_screen() -> None: os.system("cls" if os.name == "nt" else "clear") -@wallet_cmd.group("signer", help="Get information for an external signer") +@click.group("signer", help="Get information for an external signer") def signer_cmd() -> None: pass # pragma: no cover diff --git a/chia/cmds/wallet.py b/chia/cmds/wallet.py index aef8f2a80029..14dddf5d46da 100644 --- a/chia/cmds/wallet.py +++ b/chia/cmds/wallet.py @@ -34,6 +34,17 @@ def wallet_cmd(ctx: click.Context) -> None: pass +# TODO: must come after the definition above because of an import loop. the command +# class framework should be expanded to support definition without a group to be a +# member of and later attachment to a group using standard click mechanisms. + + +import chia.cmds.signer # noqa: E402 + +# TODO: ignoring as i'm guessing this is tied to the import loop +wallet_cmd.add_command(chia.cmds.signer.signer_cmd) # type: ignore[has-type] + + @wallet_cmd.command("get_transaction", help="Get a transaction") @click.option( "-wp",