We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a43a82d commit 45f8e94Copy full SHA for 45f8e94
1 file changed
mp_api/client/core/utils.py
@@ -27,6 +27,7 @@
27
from mp_api.client.core.settings import MAPI_CLIENT_SETTINGS
28
29
if TYPE_CHECKING:
30
+ from collections.abc import Iterable
31
from typing import Any, Literal
32
33
from pydantic._internal._model_construction import ModelMetaclass
@@ -246,8 +247,8 @@ def __getattr__(self, v: str) -> Any:
246
247
f"has no attribute {v}"
248
)
249
- def __dir__(self) -> list[str]:
250
- return self._obj.__dir__()
+ def __dir__(self) -> Iterable[str]:
251
+ return self._obj.__dir__() if hasattr(self._obj, "__dir__") else []
252
253
254
class MPDataset:
0 commit comments