Skip to content

Commit d8bdb2e

Browse files
committed
cleanups
1 parent 6f633c7 commit d8bdb2e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/core/arrays/categorical.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1750,11 +1750,12 @@ def __contains__(self, key) -> bool:
17501750
# if key is a NaN, check if any NaN is in self.
17511751
if is_valid_nat_for_dtype(key, self.categories.dtype):
17521752
if key is not self.dtype.na_value and not isinstance(key, self.dtype.type):
1753-
warn(f"Membership check with {key} will return False in the future. "
1754-
f"Consider using {self.dtype.na_value} instead",
1755-
FutureWarning,
1756-
stacklevel=2,
1757-
)
1753+
warn(
1754+
f"Membership check with {key} will return False in the future. "
1755+
f"Consider using {self.dtype.na_value} instead",
1756+
FutureWarning,
1757+
stacklevel=2,
1758+
)
17581759
return self.isna().any()
17591760

17601761
return contains(self, key, container=self._codes)

0 commit comments

Comments
 (0)