Skip to content

Correct values docstrings of write_coils and readwrite_registers - #3065

Merged
janiversen merged 1 commit into
pymodbus-dev:devfrom
sankalpsthakur:docs/write-values-param
Oct 19, 2026
Merged

janiversen merged 1 commit into
pymodbus-dev:devfrom
sankalpsthakur:docs/write-values-param

Conversation

@sankalpsthakur

Copy link
Copy Markdown
Contributor

Follow-up to #3039, as suggested there: the values docstrings of write_coils and readwrite_registers said a single value can be passed, but both take a sequence. On dev, write_coils(0, True) raises TypeError: object of type 'bool' has no len(), and readwrite_registers(values=5) does the same for int. This drops the wrong part, so both now read like write_registers.

ruff check, ruff format --check and codespell on pymodbus/client/mixin.py are clean.

AI disclosure: written with help from AI coding tools (Claude Code); I reviewed the change and checked the behaviour above before submitting.

@janiversen janiversen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@janiversen
janiversen merged commit 77ad0c0 into pymodbus-dev:dev Oct 19, 2026
16 checks passed
@sankalpsthakur
sankalpsthakur deleted the docs/write-values-param branch October 19, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants