-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Fix exception causes in datetimelike.py #32164
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
b471854
to
668f774
Compare
668f774
to
ca30a8d
Compare
except ValueError as e: | ||
raise TypeError( | ||
"searchsorted requires compatible dtype or scalar" | ||
) from e |
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.
nitpick: can you make this "err" instead of "e"; i really dont like 1-letter names
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.
Eh...I would leave it alone for this PR. I understand having an aesthetic preference, but e
(as an exception variable name) is strewn all over the place in this file, and I don't see why we should nitpick this one instance and hold this PR up because of that.
If we have a generally accepted (for this repository) a stylistic preference for variable names for exceptions, then fine, but I'm not aware of that at this point.
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.
yah, not a deal-breaker. i think of this as a "if you have to push another commit anyway, this would be nice"
Thanks for reviewing guys. I'm ambivalent towards the |
Thanks @cool-RR, and welcome to pandas! 🎉
|
@cool-RR is there something here we should be testing? |
If you mean testing that the |
sounds good, LGTM |
Cool. Any next steps needed before merging? |
I would be on board with doing this more generally if there's a way to identify easily |
Thanks @cool-RR |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff