Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
76 additions
and
2 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
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,56 @@ | ||
# flags: --preview --minimum-version=3.10 | ||
match "test": | ||
case "test" if "first long condition" != "some loooooooooooooooooooooooooooooooooooooog condition": | ||
print("Test") | ||
|
||
match match: | ||
case "test" if case != "not very loooooooooooooog condition": | ||
print("No format change") | ||
|
||
match "test": | ||
case "test" if "any long condition" != "another long condition" and "this is a long condition": | ||
print("Test") | ||
|
||
match "test": | ||
case "test" if "any long condition" != "another long condition" and "this is a looooong condition": | ||
print("Test") | ||
|
||
# case black_test_patma_052 (originally in the pattern_matching_complex test case) | ||
match x: | ||
case [1, 0] if x := x[:0]: | ||
y = 1 | ||
case [1, 0] if (x := x[:0]): | ||
y = 1 | ||
|
||
# output | ||
|
||
match "test": | ||
case "test" if ( | ||
"first long condition" | ||
!= "some loooooooooooooooooooooooooooooooooooooog condition" | ||
): | ||
print("Test") | ||
|
||
match match: | ||
case "test" if case != "not very loooooooooooooog condition": | ||
print("No format change") | ||
|
||
match "test": | ||
case "test" if ( | ||
"any long condition" != "another long condition" and "this is a long condition" | ||
): | ||
print("Test") | ||
|
||
match "test": | ||
case "test" if ( | ||
"any long condition" != "another long condition" | ||
and "this is a looooong condition" | ||
): | ||
print("Test") | ||
|
||
# case black_test_patma_052 (originally in the pattern_matching_complex test case) | ||
match x: | ||
case [1, 0] if x := x[:0]: | ||
y = 1 | ||
case [1, 0] if x := x[:0]: | ||
y = 1 |