8000 `USELESS_TRY_EXCEPT` false negative? · Issue #76 · guilatrova/tryceratops · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

USELESS_TRY_EXCEPT false negative? #76

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

Open
harupy opened this issue Mar 7, 2025 · 0 comments
Open

USELESS_TRY_EXCEPT false negative? #76

harupy opened this issue Mar 7, 2025 · 0 comments

Comments

@harupy
Copy link
harupy commented Mar 7, 2025

USELESS_TRY_EXCEPT does not flag the last except handler in the following code. Is this a false negative, or am I missing something?

try:  
    foo()  
except ValueError:  
    print("Do not throw")  
except TypeError:  
    raise

Is a trailing immediate-raise except handler always useless?

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

No branches or pull requests

1 participant
0