Skip to content

Commit e0ae6f2

Browse files
CLN: a couple of minor cleanups (#40567)
1 parent 33680ab commit e0ae6f2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pandas/core/arrays/categorical.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
from pandas.core.dtypes.common import (
5050
ensure_int64,
5151
ensure_object,
52+
ensure_platform_int,
5253
is_categorical_dtype,
5354
is_datetime64_dtype,
5455
is_dict_like,
@@ -533,7 +534,7 @@ def astype(self, dtype: Dtype, copy: bool = True) -> ArrayLike:
533534
# error: Incompatible types in assignment (expression has type "ndarray",
534535
# variable has type "Categorical")
535536
result = take_nd( # type: ignore[assignment]
536-
new_cats, libalgos.ensure_platform_int(self._codes)
537+
new_cats, ensure_platform_int(self._codes)
537538
)
538539

539540
return result

pandas/tests/apply/test_frame_transform.py

-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ def test_transform_method_name(method):
162162
frame_kernels_raise = [x for x in frame_transform_kernels if x not in wont_fail]
163163

164164

165-
# mypy doesn't allow adding lists of different types
166-
# https://github.com/python/mypy/issues/5492
167165
@pytest.mark.parametrize("op", [*frame_kernels_raise, lambda x: x + 1])
168166
def test_transform_bad_dtype(op, frame_or_series):
169167
# GH 35964

0 commit comments

Comments
 (0)