diff --git a/src/roiextractors/extractors/tiffimagingextractors/brukertiffimagingextractor.py b/src/roiextractors/extractors/tiffimagingextractors/brukertiffimagingextractor.py index 0961333c..0f30f0ff 100644 --- a/src/roiextractors/extractors/tiffimagingextractors/brukertiffimagingextractor.py +++ b/src/roiextractors/extractors/tiffimagingextractors/brukertiffimagingextractor.py @@ -97,9 +97,9 @@ def get_streams(cls, folder_path: PathType) -> dict: return streams def __init__( - self, - folder_path: PathType, - stream_name: Optional[str] = None, + self, + folder_path: PathType, + stream_name: Optional[str] = None, ): """ The imaging extractor for the Bruker TIF image format. @@ -118,8 +118,10 @@ def __init__( tif_file_paths = list(folder_path.glob("*.ome.tif")) assert tif_file_paths, f"The TIF image files are missing from '{folder_path}'." - assert _determine_imaging_is_volumetric(folder_path=folder_path), f"{self.extractor_name}Extractor is for volumetric imaging. " \ - "For single imaging plane data use BrukerTiffSinglePlaneImagingExtractor." + assert _determine_imaging_is_volumetric(folder_path=folder_path), ( + f"{self.extractor_name}Extractor is for volumetric imaging. " + "For single imaging plane data use BrukerTiffSinglePlaneImagingExtractor." + ) streams = self.get_streams(folder_path=folder_path) if stream_name is None: diff --git a/tests/test_brukertiffimagingextactor.py b/tests/test_brukertiffimagingextactor.py index 401c2c14..a1e5361b 100644 --- a/tests/test_brukertiffimagingextactor.py +++ b/tests/test_brukertiffimagingextactor.py @@ -50,7 +50,9 @@ def tearDownClass(cls): shutil.rmtree(cls.test_dir) def test_stream_names(self): - self.assertEqual(BrukerTiffSinglePlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams) + self.assertEqual( + BrukerTiffSinglePlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams + ) def test_incorrect_stream_name_raises(self): exc_msg = f"The selected stream 'Ch1' is not in the available channel_streams '['Ch2']'!" @@ -131,7 +133,9 @@ def setUpClass(cls): cls.test_video[..., 1] = second_plane_video def test_stream_names(self): - self.assertEqual(BrukerTiffMultiPlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams) + self.assertEqual( + BrukerTiffMultiPlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams + ) def test_brukertiffextractor_image_size(self): self.assertEqual(self.extractor.get_image_size(), (512, 512, 2)) @@ -191,7 +195,9 @@ def test_not_selecting_stream_raises(self): BrukerTiffSinglePlaneImagingExtractor(folder_path=self.folder_path) def test_stream_names(self): - assert_array_equal(BrukerTiffSinglePlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams) + assert_array_equal( + BrukerTiffSinglePlaneImagingExtractor.get_streams(folder_path=self.folder_path), self.available_streams + ) def test_brukertiffextractor_image_size(self): self.assertEqual(self.extractor.get_image_size(), (512, 512))