From 4c267ba507c60599908f9de3e16af87f2c958f90 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Fri, 22 Nov 2024 21:09:42 -0600 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Oliver Ruebel --- src/hdmf/container.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hdmf/container.py b/src/hdmf/container.py index 50b7426e9..ce4e8b821 100644 --- a/src/hdmf/container.py +++ b/src/hdmf/container.py @@ -741,7 +741,8 @@ def _generate_array_html(self, array, level): """Generates HTML for array data (e.g., NumPy arrays, HDF5 datasets, Zarr datasets and DataIO objects).""" is_numpy_array = isinstance(array, np.ndarray) - it_was_read_with_io = self.get_read_io() is not None + read_io = self.get_read_io() + it_was_read_with_io = read_io is not None is_data_io = isinstance(array, DataIO) if is_numpy_array: @@ -755,7 +756,6 @@ def _generate_array_html(self, array, level): # 1. Array-type attributes (e.g., start_frame in ImageSeries) remain NumPy arrays # even when their parent container has an IO # 2. Data may have been modified after being read from storage - read_io = self.get_read_io() repr_html = read_io.generate_dataset_html(array) else: # Not sure which object could get here object_class = array.__class__.__name__