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

Remove or annotate any uses of bare except: from the codebase #953

Closed
alexwlchan opened this issue Oct 24, 2017 · 1 comment · Fixed by #959
Closed

Remove or annotate any uses of bare except: from the codebase #953

alexwlchan opened this issue Oct 24, 2017 · 1 comment · Fixed by #959
Labels
enhancement it's not broken, but we want it to be better tests/build/CI about testing or deployment *of* Hypothesis

Comments

@alexwlchan
Copy link
Contributor

As spotted in #952.

The new version of flake8 whinges about bare except:, as well it should. For now I’ve added it to the ignores list (so we can get that PR closed) – but we should go through, work out where we can do except BaseException: instead, and where we really want a bare except: (if anywhere), we explicitly annotate it with # noqa.

@Zac-HD
Copy link
Member

Zac-HD commented Oct 24, 2017

I'd just ban bare excepts outright - if we don't know what exception class we're trying to catch, we should reconsider the code. Otherwise sounds great to me 😄

@Zac-HD Zac-HD added tests/build/CI about testing or deployment *of* Hypothesis enhancement it's not broken, but we want it to be better labels Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants