@@ -1132,8 +1132,7 @@ def to_netcdf(
11321132 * ,
11331133 multifile : Literal [True ],
11341134 invalid_netcdf : bool = False ,
1135- ) -> tuple [ArrayWriter , AbstractDataStore ]:
1136- ...
1135+ ) -> tuple [ArrayWriter , AbstractDataStore ]: ...
11371136
11381137
11391138# path=None writes to bytes
@@ -1150,8 +1149,7 @@ def to_netcdf(
11501149 compute : bool = True ,
11511150 multifile : Literal [False ] = False ,
11521151 invalid_netcdf : bool = False ,
1153- ) -> bytes :
1154- ...
1152+ ) -> bytes : ...
11551153
11561154
11571155# compute=False returns dask.Delayed
@@ -1169,8 +1167,7 @@ def to_netcdf(
11691167 compute : Literal [False ],
11701168 multifile : Literal [False ] = False ,
11711169 invalid_netcdf : bool = False ,
1172- ) -> Delayed :
1173- ...
1170+ ) -> Delayed : ...
11741171
11751172
11761173# default return None
@@ -1187,8 +1184,7 @@ def to_netcdf(
11871184 compute : Literal [True ] = True ,
11881185 multifile : Literal [False ] = False ,
11891186 invalid_netcdf : bool = False ,
1190- ) -> None :
1191- ...
1187+ ) -> None : ...
11921188
11931189
11941190# if compute cannot be evaluated at type check time
@@ -1206,8 +1202,7 @@ def to_netcdf(
12061202 compute : bool = False ,
12071203 multifile : Literal [False ] = False ,
12081204 invalid_netcdf : bool = False ,
1209- ) -> Delayed | None :
1210- ...
1205+ ) -> Delayed | None : ...
12111206
12121207
12131208# if multifile cannot be evaluated at type check time
@@ -1225,8 +1220,7 @@ def to_netcdf(
12251220 compute : bool = False ,
12261221 multifile : bool = False ,
12271222 invalid_netcdf : bool = False ,
1228- ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None :
1229- ...
1223+ ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None : ...
12301224
12311225
12321226# Any
@@ -1243,8 +1237,7 @@ def to_netcdf(
12431237 compute : bool = False ,
12441238 multifile : bool = False ,
12451239 invalid_netcdf : bool = False ,
1246- ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None :
1247- ...
1240+ ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None : ...
12481241
12491242
12501243def to_netcdf (
@@ -1499,22 +1492,20 @@ def save_mfdataset(
14991492 "save_mfdataset"
15001493 )
15011494
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+ ])
15181509
15191510 try :
15201511 writes = [w .sync (compute = compute ) for w in writers ]
@@ -1526,9 +1517,9 @@ def save_mfdataset(
15261517 if not compute :
15271518 import dask
15281519
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+ ] )
15321523
15331524
15341525def _auto_detect_region (ds_new , ds_orig , dim ):
@@ -1678,8 +1669,7 @@ def to_zarr(
16781669 zarr_version : int | None = None ,
16791670 write_empty_chunks : bool | None = None ,
16801671 chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1681- ) -> backends .ZarrStore :
1682- ...
1672+ ) -> backends .ZarrStore : ...
16831673
16841674
16851675# compute=False returns dask.Delayed
@@ -1702,8 +1692,7 @@ def to_zarr(
17021692 zarr_version : int | None = None ,
17031693 write_empty_chunks : bool | None = None ,
17041694 chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1705- ) -> Delayed :
1706- ...
1695+ ) -> Delayed : ...
17071696
17081697
17091698def to_zarr (
0 commit comments