Skip to content

Commit e44fad8

Browse files
Format code with black
Signed-off-by: ela-kotulska-frequenz <[email protected]>
1 parent cc44983 commit e44fad8

File tree

6 files changed

+2
-10
lines changed

6 files changed

+2
-10
lines changed

examples/resampling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ async def run() -> None: # pylint: disable=too-many-locals
108108
second_stage_resampler.add_timeseries(average_chan.new_receiver(), _print_sample)
109109

110110
average_sender = average_chan.new_sender()
111+
111112
# Needed until channels Senders raises exceptions on errors
112113
async def sink_adapter(sample: Sample) -> None:
113114
assert await average_sender.send(sample)

src/frequenz/sdk/_data_handling/time_series.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ def evaluate(
478478

479479
# Symbol metadata is not available, e.g. component category
480480
if symbol_mapping is None:
481-
482481
# Component data is available and up to date
483482
if cache_lookup_result.entry is not None:
484483
kwargs[symbol] = cache_lookup_result.entry.value

src/frequenz/sdk/actor/_data_sourcing/microgrid_api_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ async def _handle_data_stream(
347347

348348
def process_msg(data: Any) -> None:
349349
tasks = []
350-
for (extractor, senders) in stream_senders:
350+
for extractor, senders in stream_senders:
351351
for sender in senders:
352352
tasks.append(sender.send(Sample(data.timestamp, extractor(data))))
353353
asyncio.gather(*tasks)

tests/actor/test_power_distributing.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ async def test_power_distributor_invalid_battery_id(self) -> None:
386386
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
387387
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
388388
):
389-
390389
distributor = PowerDistributingActor(service_channels)
391390

392391
# Mock that all requested batteries are working.
@@ -446,7 +445,6 @@ async def test_power_distributor_overlapping_batteries(self) -> None:
446445
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
447446
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
448447
):
449-
450448
distributor = PowerDistributingActor(service_channels)
451449

452450
# Mock that all requested batteries are working.
@@ -545,7 +543,6 @@ async def test_power_distributor_one_user_adjust_power_consume(
545543
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
546544
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
547545
):
548-
549546
distributor = PowerDistributingActor(service_channels)
550547

551548
# Mock that all requested batteries are working.
@@ -612,7 +609,6 @@ async def test_power_distributor_one_user_adjust_power_supply(
612609
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
613610
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
614611
):
615-
616612
distributor = PowerDistributingActor(service_channels)
617613

618614
# Mock that all requested batteries are working.
@@ -679,7 +675,6 @@ async def test_power_distributor_one_user_adjust_power_success(
679675
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
680676
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
681677
):
682-
683678
distributor = PowerDistributingActor(service_channels)
684679

685680
# Mock that all requested batteries are working.
@@ -739,7 +734,6 @@ async def test_not_all_batteries_are_working(
739734
with mock.patch("asyncio.sleep", new_callable=AsyncMock) and mock.patch(
740735
"frequenz.sdk.microgrid.get", return_value=mock_microgrid
741736
):
742-
743737
distributor = PowerDistributingActor({"user1": channel.service_handle})
744738

745739
# Mock that all requested batteries are working.

tests/data_ingestion/base_microgrid_data_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ async def _collect_microgrid_data(
129129
metric: [] for metric in metrics
130130
}
131131
while await select.ready():
132-
133132
for metric in metrics:
134133
if msg := getattr(select, metric):
135134
returned_data[metric].append(msg.inner)

tests/microgrid/test_graph.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def _check_predecessors_and_successors(graph: gr.ComponentGraph) -> None:
3232
}
3333

3434
for conn in graph.connections():
35-
3635
if conn.end not in expected_predecessors:
3736
expected_predecessors[conn.end] = set()
3837
expected_predecessors[conn.end].add(components[conn.start])

0 commit comments

Comments
 (0)