From 9798fddf9edd037808ab8485f9fb182136558a20 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 2 Jan 2024 14:15:31 +0000 Subject: [PATCH] polish --- dask/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dask/base.py b/dask/base.py index f5f31ebfd03..547bb4063a1 100644 --- a/dask/base.py +++ b/dask/base.py @@ -225,8 +225,10 @@ def is_dask_collection(x) -> bool: # Read: https://github.com/dask/dask/pull/10676 return True + # xarray, pint, and possibly other wrappers always define a __dask_graph__ method, + # but it may return None if they wrap around a non-dask object. # In all known dask collections other than dask-expr, - # calling __dask_graph__ is cheap + # calling __dask_graph__ is cheap. return x.__dask_graph__() is not None