Skip to content

Commit ad03fae

Browse files
black
1 parent 328045b commit ad03fae

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

fourinsight/engineroom/utils/_datamanage.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,11 @@ def get_fun(ts_id, start, end, **kwargs):
635635
aggregation_period = kwargs.pop("aggregation_period", "tick")
636636
aggregation_function = kwargs.pop("aggregation_function", "mean")
637637
return self._drio_client.get_samples_aggregate(
638-
ts_id, start=start, end=end, aggregation_period=aggregation_period, aggregation_function=aggregation_function
638+
ts_id,
639+
start=start,
640+
end=end,
641+
aggregation_period=aggregation_period,
642+
aggregation_function=aggregation_function,
639643
)
640644

641645
elif self.storage == "archive":

tests/test_datamanage.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def test__get(self):
11191119
),
11201120
]
11211121
)
1122-
1122+
11231123
def test__get_warm_storage(self):
11241124
# Mock the drio_client
11251125
drio_client = Mock()
@@ -1139,9 +1139,9 @@ def test__get_warm_storage(self):
11391139
drio_client,
11401140
labels,
11411141
storage="warm",
1142-
convert_date=True,
1143-
raise_empty=False,
1144-
aggregation_period="1h",
1142+
convert_date=True,
1143+
raise_empty=False,
1144+
aggregation_period="1h",
11451145
aggregation_function="min",
11461146
)
11471147

@@ -1168,21 +1168,21 @@ def test__get_warm_storage(self):
11681168
start="<start-time>",
11691169
end="<end-time>",
11701170
aggregation_period="1h",
1171-
aggregation_function="min"
1171+
aggregation_function="min",
11721172
),
11731173
call(
11741174
"timeseriesid-b",
11751175
start="<start-time>",
11761176
end="<end-time>",
11771177
aggregation_period="1h",
1178-
aggregation_function="min"
1178+
aggregation_function="min",
11791179
),
11801180
call(
11811181
"timeseriesid-c",
11821182
start="<start-time>",
11831183
end="<end-time>",
11841184
aggregation_period="1h",
1185-
aggregation_function="min"
1185+
aggregation_function="min",
11861186
),
11871187
]
11881188
)
@@ -1201,11 +1201,7 @@ def test__get_warm_defaults(self):
12011201

12021202
# Instantiate DrioDataSource with storage="warm", no overrides
12031203
source = DrioDataSource(
1204-
drio_client,
1205-
labels,
1206-
storage="warm",
1207-
convert_date=True,
1208-
raise_empty=False
1204+
drio_client, labels, storage="warm", convert_date=True, raise_empty=False
12091205
)
12101206

12111207
# Call _get with defaults
@@ -1227,20 +1223,18 @@ def test__get_warm_defaults(self):
12271223
start="<start>",
12281224
end="<end>",
12291225
aggregation_period="tick",
1230-
aggregation_function="mean"
1226+
aggregation_function="mean",
12311227
),
12321228
call(
12331229
"ts-y",
12341230
start="<start>",
12351231
end="<end>",
12361232
aggregation_period="tick",
1237-
aggregation_function="mean"
1233+
aggregation_function="mean",
12381234
),
12391235
]
12401236
)
12411237

1242-
1243-
12441238

12451239
class Test_NullDataSource:
12461240
def test__init__(self):

0 commit comments

Comments
 (0)