Open slw07g opened 1 week ago
Consider suppressing B017 where msg= is passed to assertRaises, as it also validates the actual message in the raised exception matches msg.
msg=
msg
Example: assertRaises(Exception, msg="Some exception message")
assertRaises(Exception, msg="Some exception message")
It is equivalent to assertRaisesRegex(Exception, "^<regex_pattern>$") which does not trigger B017.
assertRaisesRegex(Exception, "^<regex_pattern>$")
Opened an issue in the flake8 repo. https://github.com/PyCQA/flake8/issues/1940
Reopening because maybe this is the right repo for the issue.
Consider suppressing B017 where
msg=
is passed to assertRaises, as it also validates the actual message in the raised exception matchesmsg
.Example:
assertRaises(Exception, msg="Some exception message")
It is equivalent to
assertRaisesRegex(Exception, "^<regex_pattern>$")
which does not trigger B017.