Skip to content

REF/TYP: stricter typing for Series._slice #52190

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 1 commit into from
Mar 27, 2023

Conversation

jbrockmendel
Copy link
Member

Motivation is that Series._slice surprisingly accepts non-slice inputs. Changing that required copying the slice-handling code from DataFrame.__getitem__, at which point it made sense to share that by implementing NDFrame._getitem_slice

@topper-123 topper-123 closed this Mar 26, 2023
@topper-123 topper-123 reopened this Mar 26, 2023
@topper-123 topper-123 added Refactor Internal refactoring of code Typing type annotations, mypy/pyright type checking labels Mar 26, 2023
@topper-123 topper-123 added this to the 2.1 milestone Mar 26, 2023
@topper-123 topper-123 merged commit 34ee4fa into pandas-dev:main Mar 27, 2023
@topper-123
Copy link
Contributor

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the typ-slice branch March 27, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants