Skip to content
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

Ensure bare exception statements are raised #1292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pixeeai
Copy link

@pixeeai pixeeai commented Mar 14, 2024

This codemod fixes cases where an exception is referenced by itself in a statement without being raised. This most likely indicates a bug: you probably meant to actually raise the exception.

Our changes look something like this:

try:
-   ValueError
+   raise ValueError
except:
    pass
More reading

Powered by: pixeebot (codemod ID: pixee:python/exception-without-raise)

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
@pixeeai
Copy link
Author

pixeeai commented Mar 29, 2024

FYI - This change was autogenerated from a new trending GitHub app - called Pixeebot. A code-quality GitHub App; like Dependabot, but for source code. (Free for Open Source Projects 👍)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant