Skip to content
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

fix flake8-bugbear B001 (bare excepts) (YTEP0037 6/6 part 5) #2671

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

neutrinoceros
Copy link
Member

PR Summary

This partly addresses #2666, namely B001 "bare excepts".
This is also a follow up to #2474, and it shows that these kind of code degradation will continue to pop up until we have a linting tool to catch them (flake8-bugbear does the job here !)

@neutrinoceros neutrinoceros added enhancement Making something better code style Related to linting tools labels Jun 23, 2020
@neutrinoceros neutrinoceros added the yt-4.0 feature targeted for the yt-4.0 release label Jun 25, 2020
@@ -56,9 +56,8 @@ def _is_valid(self, *args, **kwargs):
)
)
fh.close()
except:
except Exception:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, I'm glad we're adding Exception but we should probably improve this. (I know you made this easier to improve in your load refactor work.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's also one of the goals on this PR: #2760 !

@matthewturk matthewturk merged commit 08065c0 into yt-project:master Jul 22, 2020
@neutrinoceros neutrinoceros deleted the bugfix_b001_errors branch July 22, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code style Related to linting tools enhancement Making something better yt-4.0 feature targeted for the yt-4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants