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

B306 should ignore cases where BaseException subclass defines message property #131

Open
li-wjohnson opened this issue Jul 16, 2020 · 1 comment

Comments

@li-wjohnson
Copy link

Currently, every caught exception with a .message is flagged, even if the class defines self.message explicitly.

@Julian
Copy link

Julian commented Aug 18, 2021

I am using bugbear for the first time like 3 seconds ago, so feel free to ignore me :) but it seems like maybe it's worth removing this check entirely given Py3-land now.

It seems historically more relevant of a prep warning for Py2 users, but by now, if someone's using .message, it's a better static assumption that it's been explicitly defined than that the code will blow up at runtime, no?

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

No branches or pull requests

2 participants