Skip to content

Commit

Permalink
TYP: remove mypy ignore from pandas/core/construction.py (pandas-dev#…
Browse files Browse the repository at this point in the history
…53112)

* remove ignore[assignment] from pandas/core/construction.py

* rename data

* Revert "rename data"

This reverts commit 533d841.
  • Loading branch information
natmokval authored and im-vinicius committed Jul 8, 2023
1 parent ab68550 commit 7969326
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pandas/core/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ def sanitize_masked_array(data: ma.MaskedArray) -> np.ndarray:
if mask.any():
dtype, fill_value = maybe_promote(data.dtype, np.nan)
dtype = cast(np.dtype, dtype)
# Incompatible types in assignment (expression has type "ndarray[Any,
# dtype[Any]]", variable has type "MaskedArray[Any, Any]")
data = data.astype(dtype, copy=True) # type: ignore[assignment]
data = ma.asarray(data.astype(dtype, copy=True))
data.soften_mask() # set hardmask False if it was True
data[mask] = fill_value
else:
Expand Down

0 comments on commit 7969326

Please sign in to comment.