diff --git a/xarray/core/computation.py b/xarray/core/computation.py index 971f036b394..bae779af652 100644 --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -893,7 +893,7 @@ def apply_ufunc( dataset_fill_value: object = _NO_FILL_VALUE, keep_attrs: bool | str | None = None, kwargs: Mapping | None = None, - dask: str = "forbidden", + dask: Literal["forbidden", "allowed", "parallelized"] = "forbidden", output_dtypes: Sequence | None = None, output_sizes: Mapping[Any, int] | None = None, meta: Any = None, diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index b75e80db2da..87f8328e441 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -1190,7 +1190,7 @@ def test_apply_dask() -> None: # unknown setting for dask array handling with pytest.raises(ValueError): - apply_ufunc(identity, array, dask="unknown") + apply_ufunc(identity, array, dask="unknown") # type: ignore def dask_safe_identity(x): return apply_ufunc(identity, x, dask="allowed")