We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a453d6 commit 4cfa6b8Copy full SHA for 4cfa6b8
icechunk-python/python/icechunk/xarray.py
@@ -1,6 +1,6 @@
1
-import importlib
2
from collections.abc import Hashable, Mapping, MutableMapping
3
from dataclasses import dataclass, field
+from importlib.util import find_spec
4
from typing import Any, Literal, overload
5
6
import numpy as np
@@ -22,7 +22,7 @@
22
23
24
try:
25
- has_dask = importlib.util.find_spec("dask") is not None
+ has_dask = find_spec("dask") is not None
26
except ImportError:
27
has_dask = False
28
@@ -45,9 +45,9 @@
45
46
def is_dask_collection(x: Any) -> bool:
47
if has_dask:
48
- import dask
+ from dask.base import is_dask_collection
49
50
- return dask.base.is_dask_collection(x)
+ return is_dask_collection(x)
51
else:
52
return False
53
0 commit comments