-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce ruff/tryceratops rule TRY300 #4450
Conversation
d1a07d0
to
c7ad20b
Compare
TRY300 Consider moving this statement to an `else` block
@DimitriPapadopoulos Have you tried running updated ruff on the codebase with this? I get 69
|
Ouch! That might be new to ruff 0.5.0 that has been released very recently. I'll check that. |
except (OSError, NotImplementedError): | ||
pytest.skip("symlink not supported in OS") | ||
return dst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch. This is probably wrong! In the absence of a return statement, this used to return None
in case of OSError
/NotImplementedError
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those were manual fixes as far as I can remember, not the result of --fix
. I should have been clear about it.
Restore the previous functionality, where the function did not return explicitly in case of exceptions, and hence returned `None`.
Summary of changes
Pull Request Checklist
newsfragments/
.(See documentation for details)