-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
clean: simplify lite-rule-alias and dont-uppercase #59240
Conversation
bf818b2
to
5a0ea7a
Compare
_dont_uppercase = {"h", "bh", "cbh", "MS", "ms", "s"} | ||
_dont_uppercase = {"min", "h", "bh", "cbh", "s", "ms", "us", "ns"} |
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.
It never made much sense to me that 'MS'
was in this list. It's been there since forever, but it looks odd - 'MS'
is already uppercase 😄
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.
agree, it was always confusing for me.
a5e0c13
to
359888e
Compare
359888e
to
317c3ae
Compare
@pytest.mark.parametrize("freq_depr", ["2MIN", "2mS", "2Us"]) | ||
@pytest.mark.parametrize("freq_depr", ["2MIN", "2nS", "2Us"]) |
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.
With this PR, "2mS"
would just raise a hard error. I think that's OK tbh, anyone using 'ms' case-insentively was already playing with fire
("b", BDay()), | ||
("bme", BMonthEnd()), | ||
("Bme", BMonthEnd()), | ||
("BME", BMonthEnd()), |
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.
'b'
raises a deprecation warning (and it's already tested, e.g. test_construction_bday
and test_construction_bday
'bme'
would raise a hard error, but I think that's fine too, as 'me'
already went through a deprecation cycle
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.
yes, seems reasonable to me
@MarcoGorelli, these changes look good to me. |
Thanks @MarcoGorelli |
work in progress, trying to clean this confusing code
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.