@@ -1103,8 +1103,7 @@ def to_netcdf(
11031103 * ,
11041104 multifile : Literal [True ],
11051105 invalid_netcdf : bool = False ,
1106- ) -> tuple [ArrayWriter , AbstractDataStore ]:
1107- ...
1106+ ) -> tuple [ArrayWriter , AbstractDataStore ]: ...
11081107
11091108
11101109# path=None writes to bytes
@@ -1121,8 +1120,7 @@ def to_netcdf(
11211120 compute : bool = True ,
11221121 multifile : Literal [False ] = False ,
11231122 invalid_netcdf : bool = False ,
1124- ) -> bytes :
1125- ...
1123+ ) -> bytes : ...
11261124
11271125
11281126# compute=False returns dask.Delayed
@@ -1140,8 +1138,7 @@ def to_netcdf(
11401138 compute : Literal [False ],
11411139 multifile : Literal [False ] = False ,
11421140 invalid_netcdf : bool = False ,
1143- ) -> Delayed :
1144- ...
1141+ ) -> Delayed : ...
11451142
11461143
11471144# default return None
@@ -1158,8 +1155,7 @@ def to_netcdf(
11581155 compute : Literal [True ] = True ,
11591156 multifile : Literal [False ] = False ,
11601157 invalid_netcdf : bool = False ,
1161- ) -> None :
1162- ...
1158+ ) -> None : ...
11631159
11641160
11651161# if compute cannot be evaluated at type check time
@@ -1177,8 +1173,7 @@ def to_netcdf(
11771173 compute : bool = False ,
11781174 multifile : Literal [False ] = False ,
11791175 invalid_netcdf : bool = False ,
1180- ) -> Delayed | None :
1181- ...
1176+ ) -> Delayed | None : ...
11821177
11831178
11841179# if multifile cannot be evaluated at type check time
@@ -1196,8 +1191,7 @@ def to_netcdf(
11961191 compute : bool = False ,
11971192 multifile : bool = False ,
11981193 invalid_netcdf : bool = False ,
1199- ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None :
1200- ...
1194+ ) -> tuple [ArrayWriter , AbstractDataStore ] | Delayed | None : ...
12011195
12021196
12031197# Any
@@ -1214,8 +1208,7 @@ def to_netcdf(
12141208 compute : bool = False ,
12151209 multifile : bool = False ,
12161210 invalid_netcdf : bool = False ,
1217- ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None :
1218- ...
1211+ ) -> tuple [ArrayWriter , AbstractDataStore ] | bytes | Delayed | None : ...
12191212
12201213
12211214def to_netcdf (
@@ -1470,22 +1463,20 @@ def save_mfdataset(
14701463 "save_mfdataset"
14711464 )
14721465
1473- writers , stores = zip (
1474- * [
1475- to_netcdf (
1476- ds ,
1477- path ,
1478- mode ,
1479- format ,
1480- group ,
1481- engine ,
1482- compute = compute ,
1483- multifile = True ,
1484- ** kwargs ,
1485- )
1486- for ds , path , group in zip (datasets , paths , groups )
1487- ]
1488- )
1466+ writers , stores = zip (* [
1467+ to_netcdf (
1468+ ds ,
1469+ path ,
1470+ mode ,
1471+ format ,
1472+ group ,
1473+ engine ,
1474+ compute = compute ,
1475+ multifile = True ,
1476+ ** kwargs ,
1477+ )
1478+ for ds , path , group in zip (datasets , paths , groups )
1479+ ])
14891480
14901481 try :
14911482 writes = [w .sync (compute = compute ) for w in writers ]
@@ -1497,9 +1488,9 @@ def save_mfdataset(
14971488 if not compute :
14981489 import dask
14991490
1500- return dask .delayed (
1501- [ dask .delayed (_finalize_store )(w , s ) for w , s in zip (writes , stores )]
1502- )
1491+ return dask .delayed ([
1492+ dask .delayed (_finalize_store )(w , s ) for w , s in zip (writes , stores )
1493+ ] )
15031494
15041495
15051496def _auto_detect_region (ds_new , ds_orig , dim ):
@@ -1649,8 +1640,7 @@ def to_zarr(
16491640 zarr_version : int | None = None ,
16501641 write_empty_chunks : bool | None = None ,
16511642 chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1652- ) -> backends .ZarrStore :
1653- ...
1643+ ) -> backends .ZarrStore : ...
16541644
16551645
16561646# compute=False returns dask.Delayed
@@ -1673,8 +1663,7 @@ def to_zarr(
16731663 zarr_version : int | None = None ,
16741664 write_empty_chunks : bool | None = None ,
16751665 chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
1676- ) -> Delayed :
1677- ...
1666+ ) -> Delayed : ...
16781667
16791668
16801669def to_zarr (
0 commit comments