From 04088dcb0f1c7d91b57026b7768128e89cf2e52e Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 11 Nov 2024 20:18:30 +0000
Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
src/hdmf/container.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/hdmf/container.py b/src/hdmf/container.py
index 2b2168e0f..2e65c70bf 100644
--- a/src/hdmf/container.py
+++ b/src/hdmf/container.py
@@ -723,12 +723,12 @@ def _generate_field_html(self, key, value, level, access_code):
return f'
{key}: {value}
'
- # Detects array-like objects that conform to the Array Interface specification
+ # Detects array-like objects that conform to the Array Interface specification
# (e.g., NumPy arrays, HDF5 datasets, DataIO objects). Objects must have both
# 'shape' and 'dtype' attributes. Iterators are excluded as they lack 'shape'.
# This approach keeps the implementation generic without coupling to specific backends methods
is_array_data = hasattr(value, "shape") and hasattr(value, "dtype")
-
+
if is_array_data:
html_content = self._generate_array_html(value, level + 1)
elif hasattr(value, "generate_html_repr"):
@@ -766,12 +766,12 @@ def _generate_array_html(self, array, level):
elif is_data_io:
array_info_dict = get_basic_array_info(array.data)
repr_html = generate_array_html_repr(array_info_dict, array.data, "DataIO")
- elif it_was_read_with_io:
+ elif it_was_read_with_io:
# The backend handles the representation here. Two special cases worth noting:
- # 1. Array-type attributes (e.g., start_frame in ImageSeries) remain NumPy arrays
+ # 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()
+ 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__