-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Replace bare excepts by explicit excepts in pandas/tests/ #22872
Labels
Milestone
Comments
This was referenced Sep 28, 2018
On it! |
4 tasks
This issue seems not fixed after some time. It has been a month and I'm not sure if Harald will be finishing this as he didn't respond if he will be fixing the requested changes on his pull request. Could I take over and try to work on this? @datapythonista @jreback |
we would accept multiple PRs for this |
This is the updated list. I will start working on this as soon as possible.
|
alexander-ponomaroff
added a commit
to alexander-ponomaroff/pandas
that referenced
this issue
Oct 27, 2018
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(superseeds #18419, same task for different files: #22873, #22874, #22875, #22877)
In several parts of the code, we have bare excepts in the form of:
This is a bad practice, and we want to avoid having this in the code. What we want instead is:
Of course in every case, the exception can be different (not always
KeyError
), and some research is needed to see which is the right exception (or exceptions, it can be a tuple) that needs to be captured. In some cases, every exception needs to be captured and we'll useexcept Exception:
, but this should be avoided unless we really need to capture all exceptions.This issue is to fix all the bare excepts in testing files
pandas/tests/
. At the moment they are (note that the list can change as code evolves):An updated list can be obtained by running:
flake8 --select=E722 --config=none pandas/tests/
The text was updated successfully, but these errors were encountered: