Skip to content

Extend broad-exception-raised and broad-exception-caught to except* #8827

@jacobtylerwalls

Description

@jacobtylerwalls

Originally posted by @clavedeluna in #7703 (comment)


Expect these examples to raise the same message:

try:
    1 / 0
except Exception:
    pass

************* Module a
a.py:3:7: W0718: Catching too general exception Exception (broad-exception-caught)

try:
    1 / 0
except* Exception:
    pass

************* Module a
a.py:2:4: W0104: Statement seems to have no effect (pointless-statement)

Metadata

Metadata

Assignees

Labels

False Negative 🦋No message is emitted but something is wrong with the codeGood first issueFriendly and approachable by new contributorspython 3.11

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions