diff --git a/tests/enums/test_color_space.py b/tests/enums/test_color_space.py index aa2507e..1a4644b 100644 --- a/tests/enums/test_color_space.py +++ b/tests/enums/test_color_space.py @@ -1,4 +1,5 @@ """Tests for the color space enum.""" + import pytest import wsic diff --git a/tests/test_wsic.py b/tests/test_wsic.py index 2dc61d0..d892598 100644 --- a/tests/test_wsic.py +++ b/tests/test_wsic.py @@ -1,4 +1,5 @@ """Tests for `wsic` package.""" + import sys import warnings from pathlib import Path @@ -1230,12 +1231,14 @@ def test_convert( out_path, shape=reader.shape, codec=codec, - compression_level=4 - if codec - in { - "blosc", - } - else 100, + compression_level=( + 4 + if codec + in { + "blosc", + } + else 100 + ), ) writer.copy_from_reader( reader, diff --git a/wsic/cli.py b/wsic/cli.py index cd231c4..b1fbde9 100644 --- a/wsic/cli.py +++ b/wsic/cli.py @@ -1,4 +1,5 @@ """Console script for wsic.""" + import sys from contextlib import suppress from pathlib import Path diff --git a/wsic/enums.py b/wsic/enums.py index cbdda72..46e663d 100644 --- a/wsic/enums.py +++ b/wsic/enums.py @@ -1,4 +1,5 @@ """Enumerated types used by wsic.""" + from enum import Enum from numbers import Number from typing import Any, Dict, Optional, Tuple diff --git a/wsic/magic.py b/wsic/magic.py index f6cf031..d92a361 100644 --- a/wsic/magic.py +++ b/wsic/magic.py @@ -1,4 +1,5 @@ """Detect file type by searching for signatures (magic numbers).""" + import mmap import re from dataclasses import dataclass diff --git a/wsic/metadata/__init__.py b/wsic/metadata/__init__.py index 77581ef..ad83a88 100644 --- a/wsic/metadata/__init__.py +++ b/wsic/metadata/__init__.py @@ -1,4 +1,5 @@ """Metadata parsing and generation.""" + from . import ngff __all__ = ["ngff"] diff --git a/wsic/metadata/ngff.py b/wsic/metadata/ngff.py index ad25183..5affa59 100644 --- a/wsic/metadata/ngff.py +++ b/wsic/metadata/ngff.py @@ -3,6 +3,7 @@ Based on version 0.4 of the specification: https://ngff.openmicroscopy.org/0.4/ """ + import sys from dataclasses import dataclass, field from numbers import Number diff --git a/wsic/typedefs.py b/wsic/typedefs.py index 178811e..bc6fec7 100644 --- a/wsic/typedefs.py +++ b/wsic/typedefs.py @@ -1,4 +1,5 @@ """Type definitions for wsic.""" + import re from pathlib import Path from typing import Union diff --git a/wsic/validation.py b/wsic/validation.py index ec4f6c3..0bb5753 100644 --- a/wsic/validation.py +++ b/wsic/validation.py @@ -1,4 +1,5 @@ """Functions used for data validation.""" + import warnings from wsic.utils import mpp2ppu diff --git a/wsic/writers.py b/wsic/writers.py index 43122d3..33ec7fa 100644 --- a/wsic/writers.py +++ b/wsic/writers.py @@ -1395,18 +1395,20 @@ def _write_ome_metadata(self, mpp: Tuple[float, ...]) -> None: datasets=[ ngff.Dataset( path=str(level), - coordinateTransformations=[ - ngff.CoordinateTransformation( - "scale", - [ - mpp[0] * downsample, - mpp[1] * downsample, - 1, - ], - ) - ] - if mpp is not None - else [ngff.CoordinateTransformation("identity")], + coordinateTransformations=( + [ + ngff.CoordinateTransformation( + "scale", + [ + mpp[0] * downsample, + mpp[1] * downsample, + 1, + ], + ) + ] + if mpp is not None + else [ngff.CoordinateTransformation("identity")] + ), ) for level, downsample in enumerate( [1] + self.pyramid_downsamples