Skip to content

Commit e4230d5

Browse files
committed
Black formatting
Signed-off-by: Bram Stoeller <[email protected]>
1 parent 651119b commit e4230d5

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/power_grid_model/manual_testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _compact_json_dump(data: Any, io_stream: IO[str], indent: int, max_level: in
299299
{"id": 1, "u_rated": 10500.0, "extra": {"original_id": 456}},
300300
],
301301
"line": [
302-
{"id": 0, "node_from": 0, "node_to": 1, ...}
302+
{"id": 2, "node_from": 0, "node_to": 1, ...}
303303
]
304304
}
305305

tests/unit/test_manual_testing.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def test_is_nan():
7777
assert is_nan(single_value)
7878
array_f8 = np.array([0.1, 0.2, np.nan], dtype=np.dtype("f8"))
7979
assert not is_nan(array_f8)
80-
array_i4 = np.array([10, 2, -(2 ** 31), 40], dtype=np.dtype("i4"))
80+
array_i4 = np.array([10, 2, -(2**31), 40], dtype=np.dtype("i4"))
8181
assert not is_nan(array_i4)
82-
array_i1 = np.array([1, 0, -(2 ** 7), 1], dtype=np.dtype("i1"))
82+
array_i1 = np.array([1, 0, -(2**7), 1], dtype=np.dtype("i1"))
8383
assert not is_nan(array_i1)
8484
nan_array = np.array([np.nan, np.nan, np.nan])
8585
assert is_nan(nan_array)
@@ -145,15 +145,15 @@ def test_compact_json_dump():
145145
string_stream = io.StringIO()
146146
_compact_json_dump(data, string_stream, indent=2, max_level=0)
147147
assert (
148-
string_stream.getvalue()
149-
== """{"node": [{"id": 1, "x": 2}, {"id": 3, "x": 4}], "line": [{"id": 5, "x": 6}, {"id": 7, "x": {"y": 8.1, "z": 8.2}}]}"""
148+
string_stream.getvalue()
149+
== """{"node": [{"id": 1, "x": 2}, {"id": 3, "x": 4}], "line": [{"id": 5, "x": 6}, {"id": 7, "x": {"y": 8.1, "z": 8.2}}]}"""
150150
)
151151

152152
string_stream = io.StringIO()
153153
_compact_json_dump(data, string_stream, indent=2, max_level=1)
154154
assert (
155-
string_stream.getvalue()
156-
== """{
155+
string_stream.getvalue()
156+
== """{
157157
"node": [{"id": 1, "x": 2}, {"id": 3, "x": 4}],
158158
"line": [{"id": 5, "x": 6}, {"id": 7, "x": {"y": 8.1, "z": 8.2}}]
159159
}"""
@@ -162,8 +162,8 @@ def test_compact_json_dump():
162162
string_stream = io.StringIO()
163163
_compact_json_dump(data, string_stream, indent=2, max_level=2)
164164
assert (
165-
string_stream.getvalue()
166-
== """{
165+
string_stream.getvalue()
166+
== """{
167167
"node":
168168
[{"id": 1, "x": 2}, {"id": 3, "x": 4}],
169169
"line":
@@ -174,8 +174,8 @@ def test_compact_json_dump():
174174
string_stream = io.StringIO()
175175
_compact_json_dump(data, string_stream, indent=2, max_level=3)
176176
assert (
177-
string_stream.getvalue()
178-
== """{
177+
string_stream.getvalue()
178+
== """{
179179
"node":
180180
[
181181
{"id": 1, "x": 2},
@@ -207,8 +207,8 @@ def test_compact_json_dump_deep():
207207
string_stream = io.StringIO()
208208
_compact_json_dump(data, string_stream, indent=2, max_level=10)
209209
assert (
210-
string_stream.getvalue()
211-
== """{
210+
string_stream.getvalue()
211+
== """{
212212
"foo": 1,
213213
"bar":
214214
{
@@ -232,8 +232,8 @@ def test_compact_json_dump_batch():
232232
string_stream = io.StringIO()
233233
_compact_json_dump(data, string_stream, indent=2, max_level=4)
234234
assert (
235-
string_stream.getvalue()
236-
== """[
235+
string_stream.getvalue()
236+
== """[
237237
{
238238
"node":
239239
[

0 commit comments

Comments
 (0)