8000 Update type hints to python3 style (non-array files) by gwrome · Pull Request #25802 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Update type hints to python3 style (non-array files) #25802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Mar 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Replace forward references with ABCs
  • Loading branch information
gwrome committed Mar 25, 2019
commit 75ba127b60f4edf3703d22dd06c188843b8184c4
7 changes: 4 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
is_iterator,
is_sequence,
is_named_tuple)
from pandas.core.dtypes.generic import ABCSeries, ABCIndexClass, ABCMultiIndex
from pandas.core.dtypes.generic import (
ABCSeries, ABCDataFrame, ABCIndexClass, ABCMultiIndex)
from pandas.core.dtypes.missing import isna, notna

from pandas.core import algorithms
Expand Down Expand Up @@ -6246,8 +6247,8 @@ def diff(self, periods=1, axis=0):
def _gotitem(self,
key: Union[str, List[str]],
ndim: int,
subset: Optional[Union[Series, 'DataFrame']] = None,
) -> Union[Series, 'DataFrame']:
subset: Optional[Union[Series, ABCDataFrame]] = None,
) -> Union[Series, ABCDataFrame]:
"""
Sub-classes to define. Return a sliced object.

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3632,7 +3632,7 @@ def values(self):
return self._data.view(np.ndarray)

@property
def _values(self) -> Union[ExtensionArray, 'Index', np.ndarray]:
def _values(self) -> Union[ExtensionArray, ABCIndexClass, np.ndarray]:
# TODO(EA): remove index types as they become extension arrays
"""
The best array representation.
Expand Down
0