diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index 21675ca0cdc7c..e20670893f71c 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -468,12 +468,8 @@ def _hash_categories(self) -> int: # error: Incompatible types in assignment (expression has type # "List[ndarray]", variable has type "ndarray") cat_array = [cat_array] # type: ignore[assignment] - # error: Incompatible types in assignment (expression has type "ndarray", - # variable has type "int") - hashed = combine_hash_arrays( # type: ignore[assignment] - iter(cat_array), num_items=len(cat_array) - ) - return np.bitwise_xor.reduce(hashed) + combined_hashed = combine_hash_arrays(iter(cat_array), num_items=len(cat_array)) + return np.bitwise_xor.reduce(combined_hashed) @classmethod def construct_array_type(cls) -> type_t[Categorical]: