Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pymodbus/repl/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def convert(self, value, param, ctx):
return None


def _process_args(args: list, string: bool = True):
def process_args(args: list, string: bool = True):
"""Internal function to parse arguments provided on command line.

:param args: Array of argument values
Expand Down Expand Up @@ -226,7 +226,7 @@ def _(event):
text = text.strip().split()
cmd = text[0].split(".")[1]
args = text[1:]
kwargs, execute = _process_args(args, string=False)
kwargs, execute = process_args(args, string=False)
if execute:
if text[0] in CLIENT_ATTRIBUTES:
result = Result(getattr(client, cmd))
Expand All @@ -242,7 +242,7 @@ def _(event):
result.raw()
if words[0] == "result.decode":
args = words[1:]
kwargs, execute = _process_args(args)
kwargs, execute = process_args(args)
if execute:
result.decode(**kwargs)
except KeyboardInterrupt:
Expand Down
4 changes: 2 additions & 2 deletions test/test_repl_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Test client sync."""
from pymodbus.repl.client.main import _process_args as process_args
from pymodbus.repl.client.main import process_args
from pymodbus.server.reactive.default_config import DEFAULT_CONFIG


Expand All @@ -10,7 +10,7 @@ def test_repl_default_config():


def test_repl_client_process_args():
"""Test argument processing in repl.client.main (_process_args function)."""
"""Test argument processing in repl.client.main ( process_args function)."""
resp = process_args(["address=11"], False)
assert resp == ({"address": 11}, True)

Expand Down