-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #10426 ## Summary Fix rule B030 giving a false positive with Tuple operations like `+`. [Playground](https://play.ruff.rs/17b086bc-cc43-40a7-b5bf-76d7d5fce78a) ```python try: ... except (ValueError,TypeError) + (EOFError,ArithmeticError): ... ``` ## Reviewer notes This is a little more convoluted than I was expecting -- because we can have valid nested Tuples with operations done on them, the flattening logic has become a bit more complex. Shall I guard this behind --preview? ## Test Plan Unit tested.
- Loading branch information
1 parent
526abeb
commit 6123a5b
Showing
3 changed files
with
147 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters