From 3f897fbf2b45decd959b7ebf881a9fc7ad6fa96c Mon Sep 17 00:00:00 2001 From: Lior Shachaf Date: Thu, 7 Nov 2024 23:47:07 -0500 Subject: [PATCH] fix: python 3.12 flake8 linting error --- examples/data_formatting_examples/format_baristaseq.py | 6 +++--- examples/data_formatting_examples/format_starmap.py | 2 +- starfish/core/spacetx_format/cli.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/data_formatting_examples/format_baristaseq.py b/examples/data_formatting_examples/format_baristaseq.py index 263fbf0f2..0e7d23e5b 100644 --- a/examples/data_formatting_examples/format_baristaseq.py +++ b/examples/data_formatting_examples/format_baristaseq.py @@ -97,9 +97,9 @@ def get_tile(self, fov_id: int, hyb: int, ch_label: int, zplane_label: int) -> F subdir = "primary" round_dir = f"r{hyb}" if hyb == 0: - filename = f"T{fov_id+1:05}C{ch_label+1:02}Z{zplane_label+1:03}.tif" + filename = f"T{fov_id + 1:05}C{ch_label + 1:02}Z{zplane_label + 1:03}.tif" else: - filename = f"alignedT{fov_id+1:05}C{ch_label+1:02}Z{zplane_label+1:03}.tif" + filename = f"alignedT{fov_id + 1:05}C{ch_label + 1:02}Z{zplane_label + 1:03}.tif" file_path = os.path.join(self.input_dir, subdir, round_dir, filename) return BaristaSeqTile(file_path) @@ -110,7 +110,7 @@ def __init__(self, input_dir, aux_type) -> None: def get_tile(self, fov_id: int, hyb: int, ch_label: int, zplane_label: int) -> FetchedTile: subdir = "nissl" - filename = f"T00001C05Z{zplane_label+1:03}.tif" + filename = f"T00001C05Z{zplane_label + 1:03}.tif" file_path = os.path.join(self.input_dir, subdir, filename) return BaristaSeqTile(file_path) diff --git a/examples/data_formatting_examples/format_starmap.py b/examples/data_formatting_examples/format_starmap.py index 84f508b96..72b860561 100644 --- a/examples/data_formatting_examples/format_starmap.py +++ b/examples/data_formatting_examples/format_starmap.py @@ -169,7 +169,7 @@ def __init__(self, input_dir: str) -> None: def get_tile( self, fov_id: int, round_label: int, ch_label: int, zplane_label: int) -> FetchedTile: - basename = f"reg_round0{round_label+ 1}_ch0{ch_label + 1}.tif" # translate to 3d + basename = f"reg_round0{round_label + 1}_ch0{ch_label + 1}.tif" # translate to 3d file_path = os.path.join(self.input_dir, "reg3d", basename) return StarMapTile(file_path, zplane_label) diff --git a/starfish/core/spacetx_format/cli.py b/starfish/core/spacetx_format/cli.py index 87609139e..0ffb5351d 100644 --- a/starfish/core/spacetx_format/cli.py +++ b/starfish/core/spacetx_format/cli.py @@ -110,7 +110,7 @@ def xarray(ctx, path): print(d) stop = time() print("=" * 60) - print(f"Opened {path} in {stop-start}s.") + print(f"Opened {path} in {stop - start}s.") names = set(d.coords._names) spots = "z y x radius z_min z_max y_min y_max x_min x_max " spots += "intensity spot_id features c r xc yc zc"