Skip to content

Commit

Permalink
Fix the test case
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed Jan 10, 2022
1 parent 9ab97b7 commit 8a24d85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Expand Up @@ -26,8 +26,8 @@
be formatted. (#2526)
- Speed-up the new backtracking parser about 4X in general (enabled when
`--target-version` is set to 3.10 and higher). (#2728)
- Fix handling of standalone `match()` or `case()` when used there is a trailing newline
or a comment inside of the parentheses. (#2760)
- Fix handling of standalone `match()` or `case()` when there is a trailing newline or a
comment inside of the parentheses. (#2760)

### Packaging

Expand Down
31 changes: 3 additions & 28 deletions tests/data/pattern_matching_style.py
Expand Up @@ -6,7 +6,7 @@
): print(1)
case c(
very_complex=True,
perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
): print(2)
case a: pass

Expand Down Expand Up @@ -35,18 +35,6 @@
)


match something:
case b(): print(1+1)
case c(
very_complex=True,
perhaps_even_loooooooooooooooooooooooooooooooooooooong=- 1
): print(1)
case c(
very_complex=True,
perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
): print(2)
case a: pass

re.match(
something # fast
)
Expand Down Expand Up @@ -74,7 +62,8 @@
):
print(1)
case c(
very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
very_complex=True,
perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
):
print(2)
case a:
Expand All @@ -93,20 +82,6 @@
case()


match something:
case b():
print(1 + 1)
case c(
very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
):
print(1)
case c(
very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
):
print(2)
case a:
pass

re.match(something) # fast
re.match()
match match():
Expand Down

0 comments on commit 8a24d85

Please sign in to comment.