-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
STYLE: Added explicit exceptions #22907
Conversation
Added explicit exceptions to '_print_versions.py'
Hello @NeuralFlux! Thanks for updating the PR.
Comment last updated on September 30, 2018 at 08:56 Hours UTC |
pandas/util/_print_versions.py
Outdated
@@ -108,7 +108,7 @@ def show_versions(as_json=False): | |||
mod = importlib.import_module(modname) | |||
ver = ver_f(mod) | |||
deps_blob.append((modname, ver)) | |||
except: | |||
except ModuleNotFoundError: |
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.
Great PR. ModuleNotFoundError
is Python 3 only, and unfortunately we need to support Python 2 few more months. Can you find a Python 2 compatible way for this please?
Changed ModuleNotFoundError to ImportError
Codecov Report
@@ Coverage Diff @@
## master #22907 +/- ##
=======================================
Coverage 92.18% 92.18%
=======================================
Files 169 169
Lines 50830 50830
=======================================
Hits 46860 46860
Misses 3970 3970
Continue to review full report at Codecov.
|
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.
Thanks for the PR @NeuralFlux, looks great. I think it's ready to be merged when the checks are green. @jreback
Thank you so much @datapythonista ! Looking forward for those green checks! |
thanks @NeuralFlux |
My pleasure to help! Thank you for the good-first-issue! @jreback and @datapythonista |
git diff upstream/master -u -- "*.py" | flake8 --diff
Fixed the following bare excepts: