-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #3960 - phansch:fix_except, r=flip1995
Remove `except` in suspicious_else_formatting 96c34e8 contains the fix: This was causing two different ICEs in #3741. The first was fixed in #3925. The second one is fixed with this commit: We just don't `expect` anymore. If the snippet doesn't contain an `else`, we stop emitting the lint because it's not a suspiciously formatted else anyway. Unfortunately I wasn't able to provide a minimal test case, but I think it's fine since it's just ignoring the `None` case now. And ad27e3f cleans up the lint code to use `if_chain`. Fixes #3741 once more.
- Loading branch information
Showing
1 changed file
with
30 additions
and
34 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