Skip to content

Commit 650ce22

Browse files
committed
Update utils.py
1 parent b995c4a commit 650ce22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xarray/core/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ def maybe_coerce_to_str(index, original_coords):
109109
raise e
110110
else:
111111

112-
def _is_MutableMapping(
113-
obj: Mapping[Any, Any]
114-
) -> TypeGuard[MutableMapping[Any, Any]]:
112+
def _is_MutableMapping(obj: Mapping[Any, Any]) -> bool:
115113
"""Check if the object is a mutable mapping."""
116114
return hasattr(obj, "__setitem__")
117115

118116

119117
else:
120118

121-
def _is_MutableMapping(obj: Mapping[Any, Any]) -> bool:
119+
def _is_MutableMapping(
120+
obj: Mapping[Any, Any]
121+
) -> TypeGuard[MutableMapping[Any, Any]]:
122122
"""Check if the object is a mutable mapping."""
123123
return hasattr(obj, "__setitem__")
124124

0 commit comments

Comments
 (0)