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

[tryceratops] Add BaseException to raise-vanilla-class rule (TRY002) #12620

Merged
merged 7 commits into from
Aug 5, 2024

Conversation

epenet
Copy link
Contributor

@epenet epenet commented Aug 2, 2024

Fixes #12612

Copy link
Contributor

github-actions bot commented Aug 2, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@epenet epenet marked this pull request as ready for review August 2, 2024 08:33
@MichaReiser MichaReiser added the needs-decision Awaiting a decision from a maintainer label Aug 5, 2024
@MichaReiser
Copy link
Member

Code looks good to me. We only have to decide on #12612 (comment)

@AlexWaygood
Copy link
Member

This makes sense to me. It's unfortunate to deviate from tryceratops here, but I think it definitely makes sense to include BaseException as well as Exception.

Should we also include ExceptionGroup and BaseExceptionGroup, though? (That's a genuine question that I'm not sure the answer to -- I haven't had much opportunity to use these fancy new features yet! It might be that they belong in this rule, or it might be that they deserve their own rule... not sure.)

epenet and others added 2 commits August 5, 2024 09:59
Co-authored-by: Alex Waygood <[email protected]>
@AlexWaygood
Copy link
Member

Let's land this for now, we can tackle the ExceptionGroup and BaseExceptionGroup issues as a followup. I think this is a strict improvement.

Thanks @epenet!

@AlexWaygood AlexWaygood removed the needs-decision Awaiting a decision from a maintainer label Aug 5, 2024
@AlexWaygood AlexWaygood merged commit 0a345dc into astral-sh:main Aug 5, 2024
20 checks passed
@epenet epenet deleted the patch-1 branch August 5, 2024 08:46
@AlexWaygood AlexWaygood mentioned this pull request Aug 5, 2024
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.

TRY002 does not take into account BaseException
3 participants