Skip to content

Commit 00d3e82

Browse files
committed
Fix formatting using black
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 344bd23 commit 00d3e82

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

tests/test_microgrid/test_client.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ async def test_components(self) -> None:
108108
[
109109
(66, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_LOAD),
110110
(99, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_SENSOR),
111-
(100, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_UNSPECIFIED),
111+
(
112+
100,
113+
microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_UNSPECIFIED,
114+
),
112115
(101, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_GRID),
113116
(103, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_JUNCTION),
114117
(104, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_METER),
@@ -168,7 +171,8 @@ async def test_connections(self) -> None:
168171
servicer.set_connections([(999, 9), (99, 19), (909, 101), (99, 91)])
169172
for component_id in [999, 99, 19, 909, 101, 91]:
170173
servicer.add_component(
171-
component_id, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY
174+
component_id,
175+
microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY,
172176
)
173177

174178
assert set(await microgrid.connections()) == {
@@ -180,7 +184,8 @@ async def test_connections(self) -> None:
180184

181185
for component_id in [1, 2, 3, 4, 5, 6, 7, 8]:
182186
servicer.add_component(
183-
component_id, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY
187+
component_id,
188+
microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY,
184189
)
185190

186191
servicer.set_connections(
@@ -261,7 +266,9 @@ async def test_connections(self) -> None:
261266
}
262267

263268
# different filters combine with AND logic
264-
assert set(await microgrid.connections(starts={1, 2, 4}, ends={4, 5, 6})) == {
269+
assert set(
270+
await microgrid.connections(starts={1, 2, 4}, ends={4, 5, 6})
271+
) == {
265272
Connection(2, 4),
266273
Connection(2, 5),
267274
Connection(4, 5),
@@ -309,7 +316,8 @@ def ListAllComponents(
309316
assert list(await microgrid.connections()) == []
310317
for component_id in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
311318
servicer.add_component(
312-
component_id, microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY
319+
component_id,
320+
microgrid_pb.ComponentCategory.COMPONENT_CATEGORY_BATTERY,
313321
)
314322
servicer.set_connections(
315323
[
@@ -344,7 +352,8 @@ def ListAllComponents(
344352
assert set(await microgrid.connections(starts={1})) == unfiltered
345353
assert set(await microgrid.connections(ends={9})) == unfiltered
346354
assert (
347-
set(await microgrid.connections(starts={1, 7}, ends={3, 9})) == unfiltered
355+
set(await microgrid.connections(starts={1, 7}, ends={3, 9}))
356+
== unfiltered
348357
)
349358

350359
finally:

0 commit comments

Comments
 (0)