-
-
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
fix DateOffset eq to depend on normalize attr #21404
Conversation
# GH#???? changed __eq__ to return False when `normalize` doesnt match | ||
offset = self._offset() | ||
offset2 = self._offset(normalize=True) | ||
assert offset != offset2 |
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.
After substituting in self._offset
for BDay
, this test is identical to 5 others in this file. I'm putting together a separate PR to try to de-duplicate and parametrize a bunch of things like this.
Codecov Report
@@ Coverage Diff @@
## master #21404 +/- ##
=======================================
Coverage 91.9% 91.9%
=======================================
Files 153 153
Lines 49606 49606
=======================================
Hits 45589 45589
Misses 4017 4017
Continue to review full report at Codecov.
|
@jbrockmendel : How about this one here: #17689? It might be a little familiar to you. 😉 |
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 good to me!
cc @jreback
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. minor comment. ping on green.
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -91,7 +91,7 @@ Categorical | |||
Datetimelike | |||
^^^^^^^^^^^^ | |||
|
|||
- | |||
- Fixed Bug where two :class:`DateOffset` objects with different `normalize` attributes could evaluate as equal (:issue:`21404`) |
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.
double backticks on normalize
@jreback : Everything is green here. |
I merged something which now causes a conflict here. @jbrockmendel can you rebase. @gfyoung can merge on green. |
Thanks @jbrockmendel ! |
This has a bullet point in #18854 but doesn't appear to have its own issue.
Current:
git diff upstream/master -u -- "*.py" | flake8 --diff