Skip to content

Commit f85165d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 82267ed commit f85165d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/hdmf/build/objectmapper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,17 +322,17 @@ def __check_edgecases(cls, spec, value, spec_dtype): # noqa: C901
322322
return value, cls.convert_dtype(spec, value.data, spec_dtype)[1]
323323
if spec_dtype is None or spec_dtype == "numeric" or type(value) in cls.__no_convert:
324324
# infer type from value
325-
if hasattr(value, 'dtype'): # covers numpy types, Zarr Array, AbstractDataChunkIterator
326-
if spec_dtype == 'numeric':
325+
if hasattr(value, "dtype"): # covers numpy types, Zarr Array, AbstractDataChunkIterator
326+
if spec_dtype == "numeric":
327327
cls.__check_convert_numeric(value.dtype.type)
328328
if np.issubdtype(value.dtype, np.str_):
329329
ret_dtype = "utf8"
330330
elif np.issubdtype(value.dtype, np.string_):
331-
ret_dtype = 'ascii'
332-
elif np.issubdtype(value.dtype, np.dtype('O')):
331+
ret_dtype = "ascii"
332+
elif np.issubdtype(value.dtype, np.dtype("O")):
333333
# Only variable-length strings should ever appear as generic objects.
334334
# Everything else should have a well-defined type
335-
ret_dtype = 'utf8'
335+
ret_dtype = "utf8"
336336
else:
337337
ret_dtype = value.dtype.type
338338
return value, ret_dtype

0 commit comments

Comments
 (0)