]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/black/tests/data/cases/pep_646.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:

Merge commit '882d8795c6ff65c02f2657e596391748d1b6b7f5'
[etc/vim.git] / .vim / bundle / black / tests / data / cases / pep_646.py
1 # flags: --minimum-version=3.11
2 A[*b]
3 A[*b] = 1
4 A
5 del A[*b]
6 A
7 A[*b, *b]
8 A[*b, *b] = 1
9 A
10 del A[*b, *b]
11 A
12 A[b, *b]
13 A[b, *b] = 1
14 A
15 del A[b, *b]
16 A
17 A[*b, b]
18 A[*b, b] = 1
19 A
20 del A[*b, b]
21 A
22 A[b, b, *b]
23 A[b, b, *b] = 1
24 A
25 del A[b, b, *b]
26 A
27 A[*b, b, b]
28 A[*b, b, b] = 1
29 A
30 del A[*b, b, b]
31 A
32 A[b, *b, b]
33 A[b, *b, b] = 1
34 A
35 del A[b, *b, b]
36 A
37 A[b, b, *b, b]
38 A[b, b, *b, b] = 1
39 A
40 del A[b, b, *b, b]
41 A
42 A[b, *b, b, b]
43 A[b, *b, b, b] = 1
44 A
45 del A[b, *b, b, b]
46 A
47 A[A[b, *b, b]]
48 A[A[b, *b, b]] = 1
49 A
50 del A[A[b, *b, b]]
51 A
52 A[*A[b, *b, b]]
53 A[*A[b, *b, b]] = 1
54 A
55 del A[*A[b, *b, b]]
56 A
57 A[b, ...]
58 A[b, ...] = 1
59 A
60 del A[b, ...]
61 A
62 A[*A[b, ...]]
63 A[*A[b, ...]] = 1
64 A
65 del A[*A[b, ...]]
66 A
67 l = [1, 2, 3]
68 A[*l]
69 A[*l] = 1
70 A
71 del A[*l]
72 A
73 A[*l, 4]
74 A[*l, 4] = 1
75 A
76 del A[*l, 4]
77 A
78 A[0, *l]
79 A[0, *l] = 1
80 A
81 del A[0, *l]
82 A
83 A[1:2, *l]
84 A[1:2, *l] = 1
85 A
86 del A[1:2, *l]
87 A
88 repr(A[1:2, *l]) == repr(A[1:2, 1, 2, 3])
89 t = (1, 2, 3)
90 A[*t]
91 A[*t] = 1
92 A
93 del A[*t]
94 A
95 A[*t, 4]
96 A[*t, 4] = 1
97 A
98 del A[*t, 4]
99 A
100 A[0, *t]
101 A[0, *t] = 1
102 A
103 del A[0, *t]
104 A
105 A[1:2, *t]
106 A[1:2, *t] = 1
107 A
108 del A[1:2, *t]
109 A
110 repr(A[1:2, *t]) == repr(A[1:2, 1, 2, 3])
111
112
113 def returns_list():
114     return [1, 2, 3]
115
116
117 A[returns_list()]
118 A[returns_list()] = 1
119 A
120 del A[returns_list()]
121 A
122 A[returns_list(), 4]
123 A[returns_list(), 4] = 1
124 A
125 del A[returns_list(), 4]
126 A
127 A[*returns_list()]
128 A[*returns_list()] = 1
129 A
130 del A[*returns_list()]
131 A
132 A[*returns_list(), 4]
133 A[*returns_list(), 4] = 1
134 A
135 del A[*returns_list(), 4]
136 A
137 A[0, *returns_list()]
138 A[0, *returns_list()] = 1
139 A
140 del A[0, *returns_list()]
141 A
142 A[*returns_list(), *returns_list()]
143 A[*returns_list(), *returns_list()] = 1
144 A
145 del A[*returns_list(), *returns_list()]
146 A
147 A[1:2, *b]
148 A[*b, 1:2]
149 A[1:2, *b, 1:2]
150 A[*b, 1:2, *b]
151 A[1:, *b]
152 A[*b, 1:]
153 A[1:, *b, 1:]
154 A[*b, 1:, *b]
155 A[:1, *b]
156 A[*b, :1]
157 A[:1, *b, :1]
158 A[*b, :1, *b]
159 A[:, *b]
160 A[*b, :]
161 A[:, *b, :]
162 A[*b, :, *b]
163 A[a * b()]
164 A[a * b(), *c, *d(), e * f(g * h)]
165 A[a * b(), :]
166 A[a * b(), *c, *d(), e * f(g * h) :]
167 A[[b] * len(c), :]
168
169
170 def f1(*args: *b):
171     pass
172
173
174 f1.__annotations__
175
176
177 def f2(*args: *b, arg1):
178     pass
179
180
181 f2.__annotations__
182
183
184 def f3(*args: *b, arg1: int):
185     pass
186
187
188 f3.__annotations__
189
190
191 def f4(*args: *b, arg1: int = 2):
192     pass
193
194
195 f4.__annotations__