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

Make flake8-bugbear happy #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Make flake8-bugbear happy #35

wants to merge 2 commits into from

Conversation

kpinc
Copy link

@kpinc kpinc commented Apr 14, 2024

flake8-bugbear declares:

B017 'assertRaises(Exception)' and 'pytest.raises(Exception)' should be considered evil.

This eliminates the complaint.


Again, it is unclear what the best match re is, or the more specific exception trap is.

The last hunk (match="BadLoader") produces the exception:

<ExceptionInfo AttributeError("'BadLoader' object has no attribute 'setup_logging'") tblen=3>

The earlier 3 hunks produce exceptions that rep like (differing only in the scheme reported):

<ExceptionInfo LoaderNotFound('Could not find a matching loader for the scheme "file+bad".') tblen=4>

I believe that match re-s given are a good representation of the expected error,s but I did the obvious thing and didn't think too deeply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant