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 #4

Merged

Conversation

pixeebot[bot]
Copy link

@pixeebot pixeebot bot commented Mar 12, 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

I have additional improvements ready for this repo! If you want to see them, leave the comment:

@pixeebot next

... and I will open a new PR right away!

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

@pixeeai pixeeai merged commit d7fee1b into master Mar 14, 2024
1 check passed
@pixeebot pixeebot bot deleted the pixeebot/drip-2024-03-12-pixee-python/exception-without-raise branch March 14, 2024 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant