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

Add exception from clause to exception handlers and enable B904 rule #3308

Open
martinhoyer opened this issue Oct 21, 2024 · 1 comment
Open
Labels
code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. code | style Code style changes not affecting functionality

Comments

@martinhoyer
Copy link
Collaborator

Briefly discussed in #3239 (comment), the raise-without-from-inside-except (B904) could be removed from the lint ignore list and existing exceptions violating this rule could be 'fixed'.

@martinhoyer martinhoyer added code | style Code style changes not affecting functionality code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. labels Oct 21, 2024
@LecrisUT
Copy link
Contributor

LecrisUT commented Nov 4, 2024

Does anyone know how to use raise ... from to catch either exception type? Or if there are other methods to do so? Otherwise is there a design for how the exceptions should be handled with tmt exception, built-in python and third-party, like where to put catch-alls, where to transform the exceptions, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. code | style Code style changes not affecting functionality
Projects
None yet
Development

No branches or pull requests

2 participants