Skip to content

Check for raise Exception or BaseException #7494

Closed
@avylove

Description

@avylove

Current problem

Linting a codebase with a lot of raise Exception() statements. This is a bad practice as it makes it impossible to write narrow exception clauses.

Desired solution

Forgive me if I missed it, but as far as I can tell, a check doesn't currently exist. The check should fail when an instance of Exception or BaseException is raised directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement ✨Improvement to a componentGood first issueFriendly and approachable by new contributorsHelp wanted 🙏Outside help would be appreciated, good for new contributorsNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions