-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: Replace bare exceptions with more descriptive ones #3924
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
here's the hard part you can easily do this by temporarily not raising (comment it out) if it doesn't break then we r not testing it tests are almost certainly for bare Exception |
@jreback okay, will do :) |
Replace with more descriptive exceptions
Replace with more descriptive exceptions CLN: SparsePanel: replace bare exceptions CLN: SparseFrame: change bare exceptions CLN: SparseSeries: change bare exceptions CLN: SparseArray: change bare exceptions
Replaces bare exceptions with more descriptive ones. CLN: tseries/frequencies: replace bare exceptions CLN: tseries/index: replace bare exceptions (mostly tz-aware + tz-naive TypeError stuff) CLN: tseries/offsets: replace bare exceptions CLN: tseries/tools: replace bare exceptions
@jreback I've been writing out test cases for all of this, but it's involving some minor changes all around too. Would it be okay if I split this up into multiple PRs? (for example, right now I have test cases edited for stats, tools, tseries and sparse, could I submit those as PR and then continue working?) |
I'm just concerned that it's going to get more and more difficult to merge the more files that are changed. |
yes smaller PRs prob easier in this case |
This takes care of the low-hanging fruit (really obvious Exception changes), there are still a bunch more to change, but I thought I would split it up into parts and deal with external exceptions before messing with anything that might potentially be raised internally. [I rebased this slightly to remove a few comments - but it did pass previously so it should be fine]