8000 TYP: CallableDynamicDoc by twoertwein · Pull Request #46786 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TYP: CallableDynamicDoc #46786

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 6 commits into from
May 26, 2022
Merged
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

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
using cast
  • Loading branch information
twoertwein committed May 8, 2022
commit c750c10368ba4c9985735ecf835b3a4fbe9a8d62
7 changes: 3 additions & 4 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
TYPE_CHECKING,
Hashable,
Sequence,
cast,
final,
)
import warnings
Expand Down Expand Up @@ -940,9 +941,7 @@ def _getitem_lowerdim(self, tup: tuple):
with suppress(IndexingError):
# error "_LocationIndexer" has no attribute
# "_handle_lowerdim_multi_index_axis0"
return self._handle_lowerdim_multi_index_axis0( # type: ignore[attr-defined]
tup
)
return cast(_LocIndexer, self)._handle_lowerdim_multi_index_axis0(tup)

tup = self._validate_key_length(tup)

Expand Down Expand Up @@ -1000,7 +999,7 @@ def _getitem_nested_tuple(self, tup: tuple):
with suppress(IndexingError):
# error "_LocationIndexer" has no attribute
# "_handle_lowerdim_multi_index_axis0"
return self._handle_lowerdim_multi_index_axis0( # type: ignore[attr-defined]
return cast(_LocIndexer, self)._handle_lowerdim_multi_index_axis0(
tup
)
elif isinstance(self.obj, ABCSeries) and any(
Expand Down
0