Skip to content

TRY003 should not apply to NotImplementedError #6528

@benjamin-kirkbride

Description

@benjamin-kirkbride

My understanding of the rationale according to https://beta.ruff.rs/docs/rules/raise-vanilla-args/ it's to prevent overloading exceptions to be used broadly, with the specifics of the exceptions being defined by the string passed to them.

In general, I agree with this, but for NotImplementedError, do we really want to encourage people subclassing it for every feature that they haven't built yet? I treat NotImplementedError as a slightly nicer sys.exit("This is not supported yet")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions