(x: object)
| 66 | |
| 67 | |
| 68 | def is_dask_collection(x: object) -> TypeGuard[DaskCollection]: |
| 69 | if module_available("dask"): |
| 70 | from dask.base import is_dask_collection |
| 71 | |
| 72 | # use is_dask_collection function instead of dask.typing.DaskCollection |
| 73 | # see https://github.com/pydata/xarray/pull/8241#discussion_r1476276023 |
| 74 | return is_dask_collection(x) |
| 75 | return False |
| 76 | |
| 77 | |
| 78 | def is_duck_array(value: Any) -> TypeGuard[duckarray[Any, Any]]: |
searching dependent graphs…