-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
disallow normalize=True with Tick classes #21427
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
Changes from 2 commits
a9cc9f0
b4cbaa9
6a28813
053aa14
44a2cde
d15d137
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,7 @@ Timezones | |
Offsets | ||
^^^^^^^ | ||
|
||
- | ||
- :class:`Tick` subclasses can no longer be created with the argument `normalize=True` (:issue:`21427`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. double backticks here. I would be a little more informative (say for example Minute, Second). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. |
||
- | ||
- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2219,6 +2219,9 @@ class Tick(SingleConstructorOffset): | |
def __init__(self, n=1, normalize=False): | ||
# TODO: do Tick classes with normalize=True make sense? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like this was a broader API design question. Depending on how things go, creating an issue to "close" with this PR might be appropriate. cc @jreback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jbrockmendel : Could you remove this comment? Looks like your fix is here to say. 😄 |
||
self.n = self._validate_n(n) | ||
if normalize: | ||
raise ValueError("Tick offset with `normalize=True` are not " | ||
"allowed.") # GH#21427 | ||
self.normalize = normalize | ||
|
||
__gt__ = _tick_comp(operator.gt) | ||
|
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.
if you have a subsection, you don't need a note, the subsection IS the note.