-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
CLN: remove unneeded inheritance from base object #26128
CLN: remove unneeded inheritance from base object #26128
Conversation
fb20412
to
0c56f26
Compare
Codecov Report
@@ Coverage Diff @@
## master #26128 +/- ##
==========================================
- Coverage 91.99% 91.98% -0.02%
==========================================
Files 175 175
Lines 52387 52384 -3
==========================================
- Hits 48192 48184 -8
- Misses 4195 4200 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26128 +/- ##
==========================================
- Coverage 91.99% 91.98% -0.01%
==========================================
Files 175 175
Lines 52385 52382 -3
==========================================
- Hits 48190 48184 -6
- Misses 4195 4198 +3
Continue to review full report at Codecov.
|
0c56f26
to
0ec6fc2
Compare
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.
Nice!
@@ -140,10 +140,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then | |||
invgrep -R --include="*.py" --include="*.pyx" -E "(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)" pandas | |||
RET=$(($RET + $?)) ; echo $MSG "DONE" | |||
|
|||
MSG='Check for old-style classes' ; echo $MSG |
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.
why are you removing this?
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.
In python2 ´´class MyClass:´´ created an different class type (old style) than ´´class MyClass(object):`` (new style). Pandas required that all classes be new style for py2/py3 compatability. This distinction can be lifted now we only use python3, so the check isn`t needed any more.
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.
maybe so but we still don’t want them
i would revert the check
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.
I’ve added a check for the reverted case.
0ec6fc2
to
0c8bd24
Compare
|
0c8bd24
to
3dc58d6
Compare
thanks @topper-123 |
Bit of a tedious whopper to review (sorry), but this PR removes all instances of inheriting from the base
object
from the code base, as dropping Python2 support means that this particular idiom is no longer needed.Additionally, as part of the above, I've removed the check in code_checks.sh that classes must inherit, as that is no longer a requirement after dropping Python2. I don't think a different check is possible to do now, but I can change instead of delete the check if anyone thinks that would make sense.