Skip to content

Commit 35f933f

Browse files
remove typing ignores
1 parent 12adf4e commit 35f933f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pandas/core/array_algos/take.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -534,13 +534,8 @@ def _take_preprocess_indexer_and_fill_value(
534534
if dtype != arr.dtype and (out is None or out.dtype != dtype):
535535
# check if promotion is actually required based on indexer
536536
mask = indexer == -1
537-
# error: Item "bool" of "Union[Any, bool]" has no attribute "any"
538-
# [union-attr]
539-
needs_masking = mask.any() # type: ignore[union-attr]
540-
# error: Incompatible types in assignment (expression has type
541-
# "Tuple[Union[Any, bool], Any]", variable has type
542-
# "Optional[Tuple[None, bool]]")
543-
mask_info = mask, needs_masking # type: ignore[assignment]
537+
needs_masking = mask.any()
538+
mask_info = mask, needs_masking
544539
if needs_masking:
545540
if out is not None and out.dtype != dtype:
546541
raise TypeError("Incompatible type for fill_value")

0 commit comments

Comments
 (0)