diff --git a/src/nxscli/commands/cmd_csv.py b/src/nxscli/commands/cmd_csv.py index c0c98cf..6bfc6d2 100644 --- a/src/nxscli/commands/cmd_csv.py +++ b/src/nxscli/commands/cmd_csv.py @@ -35,10 +35,10 @@ def cmd_pcsv( """[plugin] Store samples in CSV files. Each configured channel will be stored in a separate file. - If SAMPLES argument is set to 'i' then we capture data until enter + If SAMPLES argument is set to '0' then we capture data until enter is press. """ # noqa: D301 - # wait for enter if samples set to 'i' + # wait for enter if samples set to '0' assert ctx.phandler if samples == 0: # pragma: no cover ctx.waitenter = True diff --git a/src/nxscli/commands/cmd_printer.py b/src/nxscli/commands/cmd_printer.py index d692c5b..da3e22b 100644 --- a/src/nxscli/commands/cmd_printer.py +++ b/src/nxscli/commands/cmd_printer.py @@ -32,10 +32,10 @@ def cmd_printer( ) -> bool: """[plugin] Print data from stream. - If SAMPLES argument is set to 'i' then we capture data until enter + If SAMPLES argument is set to '0' then we capture data until enter is press. """ # noqa: D301 - # wait for enter if samples set to 'i' + # wait for enter if samples set to '0' assert ctx.phandler if samples == 0: # pragma: no cover ctx.waitenter = True diff --git a/src/nxscli/commands/cmd_udp.py b/src/nxscli/commands/cmd_udp.py index 0626781..f243673 100644 --- a/src/nxscli/commands/cmd_udp.py +++ b/src/nxscli/commands/cmd_udp.py @@ -22,7 +22,7 @@ "--address", type=str, default="127.0.0.1", - help="destinantion port. Default: 127.0.0.1", + help="destinantion address. Default: 127.0.0.1", ) @click.option( "--port", type=int, default=9870, help="destination port. Default: 9870" @@ -43,11 +43,10 @@ def cmd_pudp( ) -> bool: """[plugin] Stream parsed data to UDP port. - If SAMPLES argument is set to 'i' then we capture data until enter + If SAMPLES argument is set to '0' then we capture data until enter is press. - """ # noqa: D301 - # wait for enter if samples set to 'i' + # wait for enter if samples set to '0' assert ctx.phandler if samples == 0: # pragma: no cover ctx.waitenter = True diff --git a/src/nxscli/commands/interface/cmd_dummy.py b/src/nxscli/commands/interface/cmd_dummy.py index 7f58451..f4a28ab 100644 --- a/src/nxscli/commands/interface/cmd_dummy.py +++ b/src/nxscli/commands/interface/cmd_dummy.py @@ -14,10 +14,10 @@ @click.group(name="dummy", chain=True) @click.option("--writepadding", default=0) @click.option( - "--streamsleep", type=float, default=0.001, help="dummy dev parameter" + "--streamsleep", type=float, default=0.001, help="dummy dev parameter. Default: 0.001" ) @click.option( - "--samplesnum", type=int, default=100, help="dummy dev parameter" + "--samplesnum", type=int, default=100, help="dummy dev parameter. Default: 100" ) @pass_environment def cmd_dummy( diff --git a/src/nxscli/commands/interface/cmd_serial.py b/src/nxscli/commands/interface/cmd_serial.py index d99a98d..ea45bb7 100644 --- a/src/nxscli/commands/interface/cmd_serial.py +++ b/src/nxscli/commands/interface/cmd_serial.py @@ -13,8 +13,8 @@ @click.group(name="serial", chain=True) @click.argument("path", type=click.Path(resolve_path=False), required=True) -@click.option("--baud", default=115200) -@click.option("--writepadding", default=0) +@click.option("--baud", default=115200, help="Default: 115200") +@click.option("--writepadding", default=0, help="Default: 0") @pass_environment def cmd_serial( ctx: Environment, path: str, baud: int, writepadding: bool diff --git a/src/nxscli/phandler.py b/src/nxscli/phandler.py index c6c4c5a..cfc2d3c 100644 --- a/src/nxscli/phandler.py +++ b/src/nxscli/phandler.py @@ -349,7 +349,7 @@ def channels_configure( """ assert self._nxs - logger.info("configure channels = %s divider = %d", str(channels), div) + logger.info("configure channels = %s divider = %s", str(channels), str(div)) self._chanlist = self._chanlist_gen(channels) if not self._chanlist: diff --git a/tests/cli/test_main.py b/tests/cli/test_main.py index c8060d3..118baa9 100644 --- a/tests/cli/test_main.py +++ b/tests/cli/test_main.py @@ -13,12 +13,12 @@ def runner(mocker): def test_main(runner): result = runner.invoke(main) - assert result.exit_code == 0 + assert result.exit_code == 2 def test_main_dummy(runner): result = runner.invoke(main, ["dummy"]) - assert result.exit_code == 0 + assert result.exit_code == 2 def test_main_pdevinfo(runner):