Skip to content

Commit

Permalink
mypy 3.9 !!
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Dec 18, 2024
1 parent 6ef1fde commit e6061ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymodbus/client/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def convert_to_registers(
byte_list += b"\x00"
else:
if not isinstance(value, list):
value = [cast(int | float, value)]
value = cast(list[int], [value])
byte_list = bytearray()
for v in value:
byte_list.extend(struct.pack(f">{data_type.value[0]}", v))
Expand Down

0 comments on commit e6061ab

Please sign in to comment.