]> git.madduck.net Git - etc/vim.git/blob - tests/data/simple_cases/remove_parens.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Use debug f-strings for feature detection (#3215)
[etc/vim.git] / tests / data / simple_cases / remove_parens.py
1 x = (1)
2 x = (1.2)
3
4 data = (
5     "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
6 ).encode()
7
8 async def show_status():
9     while True:
10         try:
11             if report_host:
12                 data = (
13                    f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
14                ).encode()
15         except Exception as e:
16             pass
17
18 def example():
19     return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
20
21
22 def example1():
23     return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))
24
25
26 def example1point5():
27     return ((((((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))))))
28
29
30 def example2():
31     return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
32
33
34 def example3():
35     return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111))
36
37
38 def example4():
39     return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((True))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
40
41
42 def example5():
43     return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
44
45
46 def example6():
47     return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]})))))))))
48
49
50 def example7():
51     return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20000000000000000000]})))))))))
52
53
54 def example8():
55     return (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((None)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
56
57 # output
58 x = 1
59 x = 1.2
60
61 data = (
62     "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
63 ).encode()
64
65
66 async def show_status():
67     while True:
68         try:
69             if report_host:
70                 data = (
71                     f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
72                 ).encode()
73         except Exception as e:
74             pass
75
76
77 def example():
78     return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
79
80
81 def example1():
82     return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
83
84
85 def example1point5():
86     return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
87
88
89 def example2():
90     return (
91         "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
92     )
93
94
95 def example3():
96     return (
97         1111111111111111111111111111111111111111111111111111111111111111111111111111111
98     )
99
100
101 def example4():
102     return True
103
104
105 def example5():
106     return ()
107
108
109 def example6():
110     return {a: a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]}
111
112
113 def example7():
114     return {
115         a: a
116         for a in [
117             1,
118             2,
119             3,
120             4,
121             5,
122             6,
123             7,
124             8,
125             9,
126             10,
127             11,
128             12,
129             13,
130             14,
131             15,
132             16,
133             17,
134             18,
135             19,
136             20000000000000000000,
137         ]
138     }
139
140
141 def example8():
142     return None