black/tests/data/cases/remove_redundant_parens_in_case_guard.py
2025-01-24 18:00:35 -08:00

115 lines
1.5 KiB
Python

# flags: --minimum-version=3.10 --line-length=79
match 1:
case _ if (True):
pass
match 1:
case _ if (
True
):
pass
match 1:
case _ if (
# this is a comment
True
):
pass
match 1:
case _ if (
True
# this is a comment
):
pass
match 1:
case _ if (
True # this is a comment
):
pass
match 1:
case _ if ( # this is a comment
True
):
pass
match 1:
case _ if (
True
): # this is a comment
pass
match 1:
case _ if (True): # comment over the line limit unless parens are removed x
pass
match 1:
case _ if (True): # comment over the line limit and parens should go to next line
pass
# output
match 1:
case _ if True:
pass
match 1:
case _ if True:
pass
match 1:
case _ if (
# this is a comment
True
):
pass
match 1:
case _ if (
True
# this is a comment
):
pass
match 1:
case _ if True: # this is a comment
pass
match 1:
case _ if True: # this is a comment
pass
match 1:
case _ if True: # this is a comment
pass
match 1:
case _ if True: # comment over the line limit unless parens are removed x
pass
match 1:
case (
_
) if True: # comment over the line limit and parens should go to next line
pass