Conversation
There was a problem hiding this comment.
Another of these "meh" rules. As the example here shows, it's often necessary to catch all "normal" exceptions, and it's – in my experience – a mistake only fresh or particularly uninterested developers make, and easily caught in code reviews (and a teaching opportunity). But I don't particularly care.
|
I'm neutral on this as well. In personal projects I'd enable it just to force myself to comment why I'm blindly catching all exceptions. Similar reasons to try-except-in-loop (PERF203): it's good to be aware, but maybe shouldn't be enforced by tooling. |
|
Yeah... I'd lean towards not enabling this one, since in some situations it will suggest something that's outright incorrect. But no strong opinion either. |
Ref #13295
flake8-blind-except (BLE)
Contains a single rule: blind-except (BLE001)
I think it's worth making sure we explain when blindly catching any exception in a script/test.
The one time we currently do it seems to be acceptable as per the rule's description.