Summary
Hi,
cat tst.py
def func ():
return ValueError
running
ruff check --select=ALL tst.py
will warn only doctrings and type annotation, but the exception is returned, not raised, should be easy to detect standard exceptions, but for custom exceptions it's already more complicated, so, might ok to have it just for standard ones.
Of course, exception can be returned intentionally, but IMO it's much more rare case and it can be solved by noqa.
Summary
Hi,
running
will warn only doctrings and type annotation, but the exception is returned, not raised, should be easy to detect standard exceptions, but for custom exceptions it's already more complicated, so, might ok to have it just for standard ones.
Of course, exception can be returned intentionally, but IMO it's much more rare case and it can be solved by
noqa.