Debian Codegraph @

tests/data/cases/remove_redundant_parens_in_case_guard.py

raw
1 # flags: --minimum-version=3.10 --line-length=79
2
3 match 1:
4 case _ if (True):
5 pass
6
7
8 match 1:
9 case _ if (
10 True
11 ):
12 pass
13
14
15 match 1:
16 case _ if (
17 # this is a comment
18 True
19 ):
20 pass
21
22
23 match 1:
24 case _ if (
25 True
26 # this is a comment
27 ):
28 pass
29
30
31 match 1:
32 case _ if (
33 True # this is a comment
34 ):
35 pass
36
37
38 match 1:
39 case _ if ( # this is a comment
40 True
41 ):
42 pass
43
44
45 match 1:
46 case _ if (
47 True
48 ): # this is a comment
49 pass
50
51
52 match 1:
53 case _ if (True): # comment over the line limit unless parens are removed x
54 pass
55
56
57 match 1:
58 case _ if (True): # comment over the line limit and parens should go to next line
59 pass
60
61
62 # output
63
64 match 1:
65 case _ if True:
66 pass
67
68
69 match 1:
70 case _ if True:
71 pass
72
73
74 match 1:
75 case _ if (
76 # this is a comment
77 True
78 ):
79 pass
80
81
82 match 1:
83 case _ if (
84 True
85 # this is a comment
86 ):
87 pass
88
89
90 match 1:
91 case _ if True: # this is a comment
92 pass
93
94
95 match 1:
96 case _ if True: # this is a comment
97 pass
98
99
100 match 1:
101 case _ if True: # this is a comment
102 pass
103
104
105 match 1:
106 case _ if True: # comment over the line limit unless parens are removed x
107 pass
108
109
110 match 1:
111 case (
112 _
113 ) if True: # comment over the line limit and parens should go to next line
114 pass