-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
I spent an hour today debugging a test with pytest because I didn't realize that I had used return TypeError('blah') when I should have used raise TypeError('blah').
I'm not sure (but willing to be corrected) if there is a case where one would want to return the Exception instead of raise -ing the exception. If there is, then would be good to throw a warning.
If not, then would be better to autofix so that return becomes raise instead.
Closest existing issue I found was #21571 .
Looks like I'm using ruff 0.14.10. Happy to provide more info if helpful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule