Skip to content

Commit

Permalink
Remove double conversion in int (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWaloo authored Sep 11, 2024
1 parent eb1d574 commit dbc6408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymodbus/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def unpack_bitstring(data: bytes) -> list[bool]:
byte_count = len(data)
bits = []
for byte in range(byte_count):
value = int(int(data[byte]))
value = int(data[byte])
for _ in range(8):
bits.append((value & 1) == 1)
value >>= 1
Expand Down

0 comments on commit dbc6408

Please sign in to comment.