We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TRY002
BaseException
Spotted in home-assistant/core#123021
It seems that pylint doesn't like Exception nor BaseException https://pylint.pycqa.org/en/latest/user_guide/messages/warning/broad-exception-raised.html
But ruff is quite happy to let BaseException pass
I think both should trigger a warning, same as regular Exception
It should be an easy fix in
ruff/crates/ruff_linter/src/rules/tryceratops/rules/raise_vanilla_class.rs
Line 71 in a3e67ab
The text was updated successfully, but these errors were encountered:
I think Ruff is correctly reproducing the rule from tryceratops, which is implemented here.
The pylint rule --overgeneral-exceptions used to coincide with this rule but has since changed in two ways:
So I think this needs a decision from the maintainers. Should we:
Exception
Sorry, something went wrong.
tryceratops
Successfully merging a pull request may close this issue.
Spotted in home-assistant/core#123021
It seems that pylint doesn't like Exception nor BaseException
https://pylint.pycqa.org/en/latest/user_guide/messages/warning/broad-exception-raised.html
But ruff is quite happy to let BaseException pass
I think both should trigger a warning, same as regular Exception
It should be an easy fix in
ruff/crates/ruff_linter/src/rules/tryceratops/rules/raise_vanilla_class.rs
Line 71 in a3e67ab
The text was updated successfully, but these errors were encountered: