Skip to content

Commit 540c335

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c87d416 commit 540c335

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

tests/resources/valid/2d.json

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
{
2-
"main": {
3-
"axes": [
4-
{
5-
"type": "variable",
6-
"edges": [1,2,3,4],
7-
"underflow": true,
8-
"overflow": false,
9-
"circular": false
10-
},
11-
{
12-
"type": "category_str",
13-
"categories": ["a", "b", "c"],
14-
"flow": false
15-
}
16-
],
17-
"storage": { "type": "double", "values": [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0], [10.0, 11.0, 12.0]] }
2+
"main": {
3+
"axes": [
4+
{
5+
"type": "variable",
6+
"edges": [1, 2, 3, 4],
7+
"underflow": true,
8+
"overflow": false,
9+
"circular": false
10+
},
11+
{
12+
"type": "category_str",
13+
"categories": ["a", "b", "c"],
14+
"flow": false
15+
}
16+
],
17+
"storage": {
18+
"type": "double",
19+
"values": [
20+
[1.0, 2.0, 3.0],
21+
[4.0, 5.0, 6.0],
22+
[7.0, 8.0, 9.0],
23+
[10.0, 11.0, 12.0]
24+
]
1825
}
1926
}
27+
}

tests/test_zip.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ def test_reg_load(tmp_path: Path) -> None:
5353
uhi.io.zip.write(zip_file, name, hist)
5454
with zipfile.ZipFile(tmp_file, "r") as zip_file:
5555
names = zip_file.namelist()
56-
rehists = {name[:-5]: uhi.io.zip.read(zip_file, name[:-5]) for name in names if name.endswith(".json")}
56+
rehists = {
57+
name[:-5]: uhi.io.zip.read(zip_file, name[:-5])
58+
for name in names
59+
if name.endswith(".json")
60+
}
5761
with zip_file.open("one.json") as f:
5862
native_one = json.load(f)
5963

0 commit comments

Comments
 (0)