-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
standardize post-call treatment of get_dst_info, delay sorting calls #21960
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
Codecov Report
@@ Coverage Diff @@
## master #21960 +/- ##
=======================================
Coverage 91.96% 91.96%
=======================================
Files 166 166
Lines 50329 50329
=======================================
Hits 46287 46287
Misses 4042 4042
Continue to review full report at Codecov.
|
pandas/_libs/tslibs/timezones.pyx
Outdated
# functions would then hit an IndexError because they assume | ||
# `deltas` is non-empty. | ||
# (under the just-deleted code that returned empty arrays) | ||
raise ValueError(tz) |
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 an AssertionError for paths that are not hit (or can just use an assert)
looks fine. is there any perf diff? |
It should be a very small improvement (I'll run asv after the current batch is done, but we know it'll be swamped by noise). The main difference is that calls to |
Noise, but at least good noise I guess.
|
thanks @jbrockmendel happy to have cleanups |
on build getting
if you have chance |
I'm pretty sure this has to do with the return type being |
@jreback we discussed how there are a bunch of functions that do really similar things with
get_dst_info
but have their slight idiosyncrasies. This standardizes them, and is really verbose so as to delay certain calls until absolutely necessary.After this we can see about de-duplicating the 6ish occurrences of really similar code by passing a function pointer or something.