Skip to content

Commit 1a68bbe

Browse files
authored
Correct return from getValues. (#2695)
1 parent 6268e3d commit 1a68bbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymodbus/datastore/context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def decode(self, fx):
3131
"""
3232
return self._fx_mapper[fx]
3333

34-
async def async_getValues(self, fc_as_hex: int, address: int, count: int = 1) -> Sequence[int | bool] | int:
34+
async def async_getValues(self, fc_as_hex: int, address: int, count: int = 1) -> list[int] | list[bool] | int:
3535
"""Get `count` values from datastore.
3636
3737
:param fc_as_hex: The function we are working with
@@ -41,7 +41,7 @@ async def async_getValues(self, fc_as_hex: int, address: int, count: int = 1) ->
4141
"""
4242
return self.getValues(fc_as_hex, address, count)
4343

44-
async def async_setValues(self, fc_as_hex: int, address: int, values: Sequence[int | bool]) -> None | int:
44+
async def async_setValues(self, fc_as_hex: int, address: int, values: list[int] | list[bool] ) -> None | int:
4545
"""Set the datastore with the supplied values.
4646
4747
:param fc_as_hex: The function we are working with
@@ -50,7 +50,7 @@ async def async_setValues(self, fc_as_hex: int, address: int, values: Sequence[i
5050
"""
5151
return self.setValues(fc_as_hex, address, values)
5252

53-
def getValues(self, fc_as_hex: int, address: int, count: int = 1) -> Sequence[int | bool]:
53+
def getValues(self, fc_as_hex: int, address: int, count: int = 1) -> list[int] | list[bool] :
5454
"""Get `count` values from datastore.
5555
5656
:param fc_as_hex: The function we are working with

0 commit comments

Comments
 (0)