Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant parentheses in
case
statement if
guards:
A follow up to psf#4024 but for `if` guards in `case` statements. I noticed this when psf#4024 was made stable, and noticed I had some code that had extra parens around the `if` guard. There might be some edge cases I am not thinking of, but all tests are passing. I put these new changes under the `remove_redundant_guard_parens` preview name.
- Loading branch information
Showing
5 changed files
with
30 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# flags: --minimum-version=3.10 --preview | ||
|
||
match 1: | ||
case _ if (True): | ||
pass | ||
|
||
|
||
match 1: | ||
case _ if ( | ||
True | ||
): | ||
pass | ||
|
||
|
||
# output | ||
|
||
match 1: | ||
case _ if True: | ||
pass | ||
|
||
|
||
match 1: | ||
case _ if True: | ||
pass |