Skip to content

Make flake8-bugbear happy#35

Open
kpinc wants to merge 2 commits into
Pylons:mainfrom
kpinc:flake8-bugbear
Open

Make flake8-bugbear happy#35
kpinc wants to merge 2 commits into
Pylons:mainfrom
kpinc:flake8-bugbear

Conversation

@kpinc
Copy link
Copy Markdown

@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.

1 participant