Skip to content

Commit 0c4aef3

Browse files
🤖 pre-commit auto fixes [...]
1 parent b8de95b commit 0c4aef3

File tree

10 files changed

+31
-18
lines changed

10 files changed

+31
-18
lines changed

tests/enums/test_color_space.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the color space enum."""
2+
23
import pytest
34

45
import wsic

tests/test_wsic.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for `wsic` package."""
2+
23
import sys
34
import warnings
45
from pathlib import Path
@@ -1230,12 +1231,14 @@ def test_convert(
12301231
out_path,
12311232
shape=reader.shape,
12321233
codec=codec,
1233-
compression_level=4
1234-
if codec
1235-
in {
1236-
"blosc",
1237-
}
1238-
else 100,
1234+
compression_level=(
1235+
4
1236+
if codec
1237+
in {
1238+
"blosc",
1239+
}
1240+
else 100
1241+
),
12391242
)
12401243
writer.copy_from_reader(
12411244
reader,

wsic/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Console script for wsic."""
2+
23
import sys
34
from contextlib import suppress
45
from pathlib import Path

wsic/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Enumerated types used by wsic."""
2+
23
from enum import Enum
34
from numbers import Number
45
from typing import Any, Dict, Optional, Tuple

wsic/magic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Detect file type by searching for signatures (magic numbers)."""
2+
23
import mmap
34
import re
45
from dataclasses import dataclass

wsic/metadata/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Metadata parsing and generation."""
2+
23
from . import ngff
34

45
__all__ = ["ngff"]

wsic/metadata/ngff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Based on version 0.4 of the specification:
44
https://ngff.openmicroscopy.org/0.4/
55
"""
6+
67
import sys
78
from dataclasses import dataclass, field
89
from numbers import Number

wsic/typedefs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Type definitions for wsic."""
2+
23
import re
34
from pathlib import Path
45
from typing import Union

wsic/validation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functions used for data validation."""
2+
23
import warnings
34

45
from wsic.utils import mpp2ppu

wsic/writers.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,18 +1395,20 @@ def _write_ome_metadata(self, mpp: Tuple[float, ...]) -> None:
13951395
datasets=[
13961396
ngff.Dataset(
13971397
path=str(level),
1398-
coordinateTransformations=[
1399-
ngff.CoordinateTransformation(
1400-
"scale",
1401-
[
1402-
mpp[0] * downsample,
1403-
mpp[1] * downsample,
1404-
1,
1405-
],
1406-
)
1407-
]
1408-
if mpp is not None
1409-
else [ngff.CoordinateTransformation("identity")],
1398+
coordinateTransformations=(
1399+
[
1400+
ngff.CoordinateTransformation(
1401+
"scale",
1402+
[
1403+
mpp[0] * downsample,
1404+
mpp[1] * downsample,
1405+
1,
1406+
],
1407+
)
1408+
]
1409+
if mpp is not None
1410+
else [ngff.CoordinateTransformation("identity")]
1411+
),
14101412
)
14111413
for level, downsample in enumerate(
14121414
[1] + self.pyramid_downsamples

0 commit comments

Comments
 (0)