-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jelle Zijlstra <[email protected]>
- Loading branch information
1 parent
8332a75
commit f78b157
Showing
7 changed files
with
91 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,72 @@ | ||
# flags: --preview --minimum-version=3.10 | ||
match match: | ||
case "test" if case != "not very loooooooooooooog condition": # comment | ||
pass | ||
|
||
match smth: | ||
case "test" if "any long condition" != "another long condition" and "this is a long condition": | ||
pass | ||
case test if "any long condition" != "another long condition" and "this is a looooong condition": | ||
pass | ||
case test if "any long condition" != "another long condition" and "this is a looooong condition": # some additional comments | ||
pass | ||
case test if (True): # some comment | ||
pass | ||
case test if (False | ||
): # some comment | ||
pass | ||
case test if (True # some comment | ||
): | ||
pass # some comment | ||
case cases if (True # some comment | ||
): # some other comment | ||
pass # some comment | ||
case match if (True # some comment | ||
): | ||
pass # some comment | ||
|
||
# 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 match: | ||
case "test" if case != "not very loooooooooooooog condition": # comment | ||
pass | ||
|
||
match smth: | ||
case "test" if ( | ||
"any long condition" != "another long condition" and "this is a long condition" | ||
): | ||
pass | ||
case test if ( | ||
"any long condition" != "another long condition" | ||
and "this is a looooong condition" | ||
): | ||
pass | ||
case test if ( | ||
"any long condition" != "another long condition" | ||
and "this is a looooong condition" | ||
): # some additional comments | ||
pass | ||
case test if True: # some comment | ||
pass | ||
case test if False: # some comment | ||
pass | ||
case test if True: # some comment | ||
pass # some comment | ||
case cases if True: # some comment # some other comment | ||
pass # some comment | ||
case match if True: # some comment | ||
pass # some comment | ||
|
||
# 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 |