Closed slw07g closed 2 months 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>$")
Flake8 does not define any checks or implement them which is clearly described in the issue template and documentation. Please find the correct place to file this instead
describe the request
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.