Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Aug 15, 2024
1 parent b39d20f commit 6f759a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hdmf/backends/hdf5/h5tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ def __resolve_dtype__(cls, dtype, data):
# binary
# number

# Use text dtype for Zarr datasets of strings. Zarr stores variable lenght strings
# as objects so we need to detect this special case here
# Use text dtype for Zarr datasets of strings. Zarr stores variable length strings
# as objects, so we need to detect this special case here
if hasattr(data, 'attrs') and 'zarr_dtype' in data.attrs and data.attrs['zarr_dtype'] == 'str':
return cls.__dtypes['text']

Check warning on line 930 in src/hdmf/backends/hdf5/h5tools.py

View check run for this annotation

Codecov / codecov/patch

src/hdmf/backends/hdf5/h5tools.py#L930

Added line #L930 was not covered by tests

Expand Down
4 changes: 2 additions & 2 deletions src/hdmf/build/objectmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@ def convert_dtype(cls, spec, value, spec_dtype=None): # noqa: C901
(hasattr(value, 'astype') and hasattr(value, 'dtype'))):
if spec_dtype_type is _unicode:
if hasattr(value, 'attrs') and 'zarr_dtype' in value.attrs:
# Zarr stores strings as objects so we cannot convert to unicode dtype
# Zarr stores strings as objects, so we cannot convert to unicode dtype
ret = value

Check warning on line 214 in src/hdmf/build/objectmapper.py

View check run for this annotation

Codecov / codecov/patch

src/hdmf/build/objectmapper.py#L214

Added line #L214 was not covered by tests
else:
ret = value.astype('U')
ret_dtype = "utf8"
elif spec_dtype_type is _ascii:
if hasattr(value, 'attrs') and 'zarr_dtype' in value.attrs:
# Zarr stores strings as objects so we cannot convert to unicode dtype
# Zarr stores strings as objects, so we cannot convert to unicode dtype
ret = value

Check warning on line 221 in src/hdmf/build/objectmapper.py

View check run for this annotation

Codecov / codecov/patch

src/hdmf/build/objectmapper.py#L221

Added line #L221 was not covered by tests
else:
ret = value.astype('S')
Expand Down

0 comments on commit 6f759a6

Please sign in to comment.