Skip to content

Commit 97a4a71

Browse files
authored
fix typing (#10006)
1 parent f91306a commit 97a4a71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

xarray/core/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9141,7 +9141,7 @@ def polyfit(
91419141
lhs = np.vander(x, order)
91429142

91439143
if rcond is None:
9144-
rcond = x.shape[0] * np.finfo(x.dtype).eps # type: ignore[assignment]
9144+
rcond = x.shape[0] * np.finfo(x.dtype).eps
91459145

91469146
# Weights:
91479147
if w is not None:

xarray/core/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def maybe_promote(dtype: np.dtype) -> tuple[np.dtype, Any]:
6262
# N.B. these casting rules should match pandas
6363
dtype_: np.typing.DTypeLike
6464
fill_value: Any
65-
if HAS_STRING_DTYPE and np.issubdtype(dtype, np.dtypes.StringDType()): # type: ignore[attr-defined]
65+
if HAS_STRING_DTYPE and np.issubdtype(dtype, np.dtypes.StringDType()):
6666
# for now, we always promote string dtypes to object for consistency with existing behavior
6767
# TODO: refactor this once we have a better way to handle numpy vlen-string dtypes
6868
dtype_ = object

0 commit comments

Comments
 (0)