Skip to content

Commit 479ea5e

Browse files
committed
pyupgrade --py37-plus
1 parent e628079 commit 479ea5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cf_xarray/accessor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ def drop_bounds(names):
628628
# with a scalar key. Hopefully these will soon get decoded to IntervalIndex
629629
# and we can move on...
630630
if scalar_key:
631-
bounds = set([obj[k].attrs.get("bounds", None) for k in names])
631+
bounds = {obj[k].attrs.get("bounds", None) for k in names}
632632
names = set(names) - bounds
633633
return names
634634

@@ -1133,12 +1133,12 @@ def _rewrite_values(
11331133
# e.g. .isel(X=5) → .isel(xi_rho=5, xi_u=5, xi_v=5, xi_psi=5)
11341134
# where xi_* have attrs["axis"] = "X"
11351135
updates[key] = ChainMap(
1136-
*[
1136+
*(
11371137
dict.fromkeys(
11381138
apply_mapper(mappers, self._obj, k, False, [k]), v
11391139
)
11401140
for k, v in value.items()
1141-
]
1141+
)
11421142
)
11431143

11441144
elif value is Ellipsis:

0 commit comments

Comments
 (0)