Comment 1 for bug 1628263

Revision history for this message
asmeurer (asmeurer) wrote :

Sadly there are a lot of false positives here, and pyflakes tries to avoid all false positives. While one class of false positives can be ignored easily (if there is a 'raise' call in the except block), not all have that form. It's a bit of a style issue. For those cases where you really do want to catch all exceptions, it "really" better to write "except:" instead of "except BaseException:"? And do you "really" want to be catching BaseException instead of Exception? Usually you don't, but not always.

"except Exception:", the less bad variant, is very common in acceptable forms (i.e., false positives for a rule that disallows them).