@@ -1132,8 +1132,7 @@ def to_netcdf(
1132
1132
* ,
1133
1133
multifile : Literal [True ],
1134
1134
invalid_netcdf : bool = False ,
1135
- ) -> tuple [ArrayWriter , AbstractDataStore ]:
1136
- ...
1135
+ ) -> tuple [ArrayWriter , AbstractDataStore ]: ...
1137
1136
1138
1137
1139
1138
# path=None writes to bytes
@@ -1150,8 +1149,7 @@ def to_netcdf(
1150
1149
compute : bool = True ,
1151
1150
multifile : Literal [False ] = False ,
1152
1151
invalid_netcdf : bool = False ,
1153
- ) -> bytes :
1154
- ...
1152
+ ) -> bytes : ...
1155
1153
1156
1154
1157
1155
# compute=False returns dask.Delayed
@@ -1169,8 +1167,7 @@ def to_netcdf(
1169
1167
compute : Literal [False ],
1170
1168
multifile : Literal [False ] = False ,
1171
1169
invalid_netcdf : bool = False ,
1172
- ) -> Delayed :
1173
- ...
1170
+ ) -> Delayed : ...
1174
1171
1175
1172
1176
1173
# default return None
@@ -1187,8 +1184,7 @@ def to_netcdf(
1187
1184
compute : Literal [True ] = True ,
1188
1185
multifile : Literal [False ] = False ,
1189
1186
invalid_netcdf : bool = False ,
1190
- ) -> None :
1191
- ...
1187
+ ) -> None : ...
1192
1188
1193
1189
1194
1190
# if compute cannot be evaluated at type check time
@@ -1206,8 +1202,7 @@ def to_netcdf(
1206
1202
compute : bool = False ,
1207
1203
multifile : Literal [False ] = False ,
1208
1204
invalid_netcdf : bool = False ,
1209
- ) -> Delayed | None :
1210
- ...
1205
+ ) -> Delayed | None : ...
1211
1206
1212
1207
1213
1208
# if multifile cannot be evaluated at type check time
@@ -1225,8 +1220,7 @@ def to_netcdf(
1225
1220
compute : bool = False ,
1226
1221
multifile : bool = False ,
1227
1222
invalid_netcdf : bool = False ,
1228
- ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None :
1229
- ...
1223
+ ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None : ...
1230
1224
1231
1225
1232
1226
# Any
@@ -1243,8 +1237,7 @@ def to_netcdf(
1243
1237
compute : bool = False ,
1244
1238
multifile : bool = False ,
1245
1239
invalid_netcdf : bool = False ,
1246
- ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None :
1247
- ...
1240
+ ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None : ...
1248
1241
1249
1242
1250
1243
def to_netcdf (
@@ -1499,22 +1492,20 @@ def save_mfdataset(
1499
1492
"save_mfdataset"
1500
1493
)
1501
1494
1502
- writers , stores = zip (
1503
- * [
1504
- to_netcdf (
1505
- ds ,
1506
- path ,
1507
- mode ,
1508
- format ,
1509
- group ,
1510
- engine ,
1511
- compute = compute ,
1512
- multifile = True ,
1513
- ** kwargs ,
1514
- )
1515
- for ds , path , group in zip (datasets , paths , groups )
1516
- ]
1517
- )
1495
+ writers , stores = zip (* [
1496
+ to_netcdf (
1497
+ ds ,
1498
+ path ,
1499
+ mode ,
1500
+ format ,
1501
+ group ,
1502
+ engine ,
1503
+ compute = compute ,
1504
+ multifile = True ,
1505
+ ** kwargs ,
1506
+ )
1507
+ for ds , path , group in zip (datasets , paths , groups )
1508
+ ])
1518
1509
1519
1510
try :
1520
1511
writes = [w .sync (compute = compute ) for w in writers ]
@@ -1526,9 +1517,9 @@ def save_mfdataset(
1526
1517
if not compute :
1527
1518
import dask
1528
1519
1529
- return dask .delayed (
1530
- [ dask .delayed (_finalize_store )(w , s ) for w , s in zip (writes , stores )]
1531
- )
1520
+ return dask .delayed ([
1521
+ dask .delayed (_finalize_store )(w , s ) for w , s in zip (writes , stores )
1522
+ ] )
1532
1523
1533
1524
1534
1525
def _auto_detect_region (ds_new , ds_orig , dim ):
@@ -1678,8 +1669,7 @@ def to_zarr(
1678
1669
zarr_version : int | None = None ,
1679
1670
write_empty_chunks : bool | None = None ,
1680
1671
chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1681
- ) -> backends .ZarrStore :
1682
- ...
1672
+ ) -> backends .ZarrStore : ...
1683
1673
1684
1674
1685
1675
# compute=False returns dask.Delayed
@@ -1702,8 +1692,7 @@ def to_zarr(
1702
1692
zarr_version : int | None = None ,
1703
1693
write_empty_chunks : bool | None = None ,
1704
1694
chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1705
- ) -> Delayed :
1706
- ...
1695
+ ) -> Delayed : ...
1707
1696
1708
1697
1709
1698
def to_zarr (
0 commit comments