Skip to content

Commit 49e8fa7

Browse files
committed
Remove redundant loop
1 parent 8df36d3 commit 49e8fa7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

xarray/tests/test_units.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,8 @@ def extract_units(obj):
226226
vars_units = {None: array_extract_units(obj.data)}
227227
units = {**vars_units}
228228
else:
229-
units = {}
230-
for unit_lib in unit_libs:
231-
if isinstance(obj, unit_lib.quantity_type):
232-
vars_units = {None: array_extract_units(obj)}
233-
units = {**vars_units}
234-
break
229+
vars_units = {None: array_extract_units(obj)}
230+
units = {**vars_units}
235231

236232
return units
237233

0 commit comments

Comments
 (0)