Skip to content

Commit 35f34a5

Browse files
Use a set comprehension (#10509)
1 parent 1a734b7 commit 35f34a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/indexes/nd_point_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def from_variables(
250250
*,
251251
options: Mapping[str, Any],
252252
) -> Self:
253-
if len(set([var.dims for var in variables.values()])) > 1:
253+
if len({var.dims for var in variables.values()}) > 1:
254254
var_names = ",".join(vn for vn in variables)
255255
raise ValueError(
256256
f"variables {var_names} must all have the same dimensions and the same shape"

0 commit comments

Comments
 (0)