Skip to content

Commit deaa1ee

Browse files
authored
Correct values parameter in setValues. (#2696)
1 parent 1a68bbe commit deaa1ee

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pymodbus/datastore/context.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from __future__ import annotations
44

5-
from collections.abc import Sequence
6-
75
# pylint: disable=missing-type-doc
86
from pymodbus.datastore.store import ModbusSequentialDataBlock
97
from pymodbus.exceptions import NoSuchIdException
@@ -61,7 +59,7 @@ def getValues(self, fc_as_hex: int, address: int, count: int = 1) -> list[int] |
6159
Log.error("getValues({},{},{}) not implemented!", fc_as_hex, address, count)
6260
return []
6361

64-
def setValues(self, fc_as_hex: int, address: int, values: Sequence[int | bool]) -> None | int:
62+
def setValues(self, fc_as_hex: int, address: int, values: list[int] | list[bool]) -> None | int:
6563
"""Set the datastore with the supplied values.
6664
6765
:param fc_as_hex: The function we are working with

pymodbus/datastore/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def getValues(self, address:int, count=1) -> Iterable:
100100
:raises TypeError:
101101
"""
102102

103-
async def async_setValues(self, address: int, values: list[int|bool]) -> None:
103+
async def async_setValues(self, address: int, values: list[int] | list[bool]) -> None:
104104
"""Set the requested values in the datastore.
105105
106106
:param address: The starting address

0 commit comments

Comments
 (0)