B017 - Suppress warning when msg param is passed to assertRaises
slw07g opened this issue · comments
Shanief commented
describe the request
Consider suppressing B017 where msg=
is passed to assertRaises, as it also validates the actual message in the raised exception matches msg
.
Example:
assertRaises(Exception, msg="Some exception message")
It is equivalent to assertRaisesRegex(Exception, "^<regex_pattern>$")
which does not trigger B017.
Ian Stapleton Cordasco commented
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