Total Complexity | 2 |
Total Lines | 11 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | def get_when_to_notify( |
||
2 | data_length: int, notification_percentage_interval: int |
||
3 | ) -> list[int]: |
||
4 | notify_at_indexes: list[int] = [] |
||
5 | for i in range(1, int(100 / notification_percentage_interval) - 1): |
||
6 | notify_at_index = int( |
||
7 | data_length * (notification_percentage_interval / 100) * i |
||
8 | ) |
||
9 | notify_at_indexes.append(notify_at_index + 1) |
||
10 | return notify_at_indexes |
||
11 |