Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ ignore_errors=True
[mypy-pandas.core.api]
ignore_errors=True

[mypy-pandas.core.base]
ignore_errors=True

[mypy-pandas.core.computation.expr]
ignore_errors=True

Expand Down
10 changes: 8 additions & 2 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,10 @@ def array(self) -> ExtensionArray:
[a, b, a]
Categories (2, object): [a, b]
"""
result = self._values
# As a mixin, we depend on the mixing class having _values.
# Special mixin syntax may be developed in the future:
# https://github.com/python/typing/issues/246
result = self._values # type: ignore

if is_datetime64_ns_dtype(result.dtype):
from pandas.arrays import DatetimeArray
Expand Down Expand Up @@ -960,7 +963,10 @@ def _ndarray_values(self) -> np.ndarray:
"""
if is_extension_array_dtype(self):
return self.array._ndarray_values
return self.values
# As a mixin, we depend on the mixing class having values.
# Special mixin syntax may be developed in the future:
# https://github.com/python/typing/issues/246
return self.values # type: ignore

@property
def empty(self):
Expand Down