-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Use ABC classes where possible #29020
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
Conversation
Looks like the linter doesn't like the import order. can you run |
This will need to be profiled carefully given @jorisvandenbossche's comments in #27353 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good generally. w.r.t. performance none of these look like they are in tight loop constructs so I think OK
pandas/core/indexes/base.py
Outdated
@@ -353,7 +353,7 @@ def __new__( | |||
return Index(data, dtype=object, copy=copy, name=name, **kwargs) | |||
|
|||
# index-like | |||
elif isinstance(data, (np.ndarray, Index, ABCSeries)): | |||
elif isinstance(data, (np.ndarray, ABCIndexClass, ABCSeries)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you limit scope of change in this module to just ABCExtensionArray
? I think that's the only one that can be exclusively replaced with the ABC... import
The rest let's leave separate
lgtm can you merge master and try again? I think should resolve CI |
Rebased, we'll see how this goes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks ok, can you run the asv suite (take a while) and see if this has any perf impact, you might want to start with a small subset (maybe the reshaping asvs)
@Kazz47 do you have bash output available you can post instead? Would be easier to review |
@Kazz47 can you merge master and fix conflict? Also for asv run output just post the output from your terminal |
Nice PR but needs rebase and I think has gone stale. Ping if you'd like to pick this back up |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff