Skip to content

Commit ea139b5

Browse files
committed
fix: making ruff happy
1 parent 8e420ab commit ea139b5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

iglu_python/mag.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import numpy as np
44
import pandas as pd
55

6-
from .utils import CGMS2DayByDay, check_data_columns, is_iglu_r_compatible
6+
from .utils import CGMS2DayByDay, check_data_columns
77

88

99
def mag(
1010
data: Union[pd.DataFrame, pd.Series],
11-
n: int|None = None, # to match new IGLU-R behavior
11+
n: int|None = None, # to match a new IGLU-R behavior
1212
dt0: Optional[int] = None,
1313
inter_gap: int = 45,
1414
tz: str = "",
@@ -28,7 +28,7 @@ def mag(
2828
DataFrame with columns 'id', 'time', and 'gl', or a Series of glucose values
2929
n : int|None, default=None
3030
Integer giving the desired interval in minutes over which to calculate
31-
the change in glucose. Default is None - will be automatically set to dt0
31+
the change in glucose. Default is None - will be automatically set to dt0
3232
(from data collection frequency).
3333
dt0 : Optional[int], default=None
3434
Time interval between measurements in minutes. If None, it will be automatically
@@ -86,7 +86,12 @@ def mag(
8686
return out
8787

8888

89-
def mag_single(gl: pd.Series, n: int|None = None, dt0: Optional[int] = None, inter_gap: int = 45, tz: str = "") -> float:
89+
def mag_single(
90+
gl: pd.Series,
91+
n: int|None = None, # to match a new IGLU-R behavior
92+
dt0: Optional[int] = None,
93+
inter_gap: int = 45,
94+
tz: str = "") -> float:
9095
"""Calculate MAG for a single subject"""
9196
# Convert data to day-by-day format
9297
data_ip = CGMS2DayByDay(gl, dt0=dt0, inter_gap=inter_gap, tz=tz)

0 commit comments

Comments
 (0)