diff --git a/btrack/napari/reader.py b/btrack/napari/reader.py index 12963615..b90aee7e 100644 --- a/btrack/napari/reader.py +++ b/btrack/napari/reader.py @@ -43,9 +43,7 @@ def get_reader(path: PathOrPaths) -> Optional[ReaderFunction]: ".hdf5", ] return ( - reader_function - if pathlib.Path(path).suffix in supported_extensions - else None + reader_function if pathlib.Path(path).suffix in supported_extensions else None ) diff --git a/btrack/utils.py b/btrack/utils.py index b29facc1..ab622272 100644 --- a/btrack/utils.py +++ b/btrack/utils.py @@ -274,9 +274,7 @@ def napari_to_tracks( "x": x, "y": y, "z": z, - "dummy": properties.get( - "dummy", np.full_like(track_id, fill_value=False) - ), + "dummy": properties.get("dummy", np.full_like(track_id, fill_value=False)), "label": properties.get("state", np.full_like(track_id, fill_value=5)), } track_objects = objects_from_dict(objects_dict) @@ -288,9 +286,7 @@ def napari_to_tracks( track_indices = np.argwhere(track_id == track).ravel() track_data = [track_objects[i] for i in track_indices] parent = graph.get(track, [track]) - children = [ - child for (child, parents) in graph.items() if track in parents - ] + children = [child for (child, parents) in graph.items() if track in parents] tracklet = Tracklet( ID=track, data=track_data,