Skip to content

Commit 4268c2b

Browse files
committed
Replace int conversion with int division
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 150ba2c commit 4268c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/timeseries/mock_microgrid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ async def _comp_data_send_task(
260260
) -> None:
261261
for value in range(1, self._num_values + 1):
262262
timestamp = datetime.now(tz=timezone.utc)
263-
val_to_send = value + int(int(comp_id) / 10)
263+
val_to_send = value + int(comp_id) // 10
264264
# for inverters with component_id > 100, send only half the messages.
265265
if int(comp_id) % 10 == self.inverter_id_suffix:
266266
if int(comp_id) < 100 or value <= 5:

0 commit comments

Comments
 (0)