logging_helpers.get_when_to_notify()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 8
nop 2
dl 0
loc 10
rs 10
c 0
b 0
f 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