From 144e43b2a6669ffe94275e97ee6ec34bd8d154e7 Mon Sep 17 00:00:00 2001 From: Marko Luther Date: Thu, 24 Oct 2024 16:20:40 +0200 Subject: [PATCH] Improve type of parameter values of write_registers (#2411) --- pymodbus/client/mixin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymodbus/client/mixin.py b/pymodbus/client/mixin.py index b31e1ef87..bfc071e8a 100644 --- a/pymodbus/client/mixin.py +++ b/pymodbus/client/mixin.py @@ -2,6 +2,7 @@ from __future__ import annotations import struct +from collections.abc import Sequence from enum import Enum from typing import Generic, TypeVar @@ -341,7 +342,7 @@ def write_coils( def write_registers( self, address: int, - values: list[bytes | int], + values: Sequence[bytes | int], slave: int = 1, skip_encode: bool = False, no_response_expected: bool = False