@@ -126,7 +126,7 @@ def test_build_sdist(monkeypatch, tmpdir):
126
126
with tarfile .open (str (sdist )) as tar :
127
127
start = tar .getnames ()[0 ] + "/"
128
128
version = start [9 :- 1 ]
129
- simpler = set ( n .split ("/" , 1 )[- 1 ] for n in tar .getnames ()[1 :])
129
+ simpler = { n .split ("/" , 1 )[- 1 ] for n in tar .getnames ()[1 :]}
130
130
131
131
with contextlib .closing (
132
132
tar .extractfile (tar .getmember (start + "setup.py" ))
@@ -138,9 +138,9 @@ def test_build_sdist(monkeypatch, tmpdir):
138
138
) as f :
139
139
pyproject_toml = f .read ()
140
140
141
- files = set ( "pybind11/{}" .format (n ) for n in all_files )
141
+ files = { "pybind11/{}" .format (n ) for n in all_files }
142
142
files |= sdist_files
143
- files |= set ( "pybind11{}" .format (n ) for n in local_sdist_files )
143
+ files |= { "pybind11{}" .format (n ) for n in local_sdist_files }
144
144
files .add ("pybind11.egg-info/entry_points.txt" )
145
145
files .add ("pybind11.egg-info/requires.txt" )
146
146
assert simpler == files
@@ -181,7 +181,7 @@ def test_build_global_dist(monkeypatch, tmpdir):
181
181
with tarfile .open (str (sdist )) as tar :
182
182
start = tar .getnames ()[0 ] + "/"
183
183
version = start [16 :- 1 ]
184
- simpler = set ( n .split ("/" , 1 )[- 1 ] for n in tar .getnames ()[1 :])
184
+ simpler = { n .split ("/" , 1 )[- 1 ] for n in tar .getnames ()[1 :]}
185
185
186
186
with contextlib .closing (
187
187
tar .extractfile (tar .getmember (start + "setup.py" ))
@@ -193,9 +193,9 @@ def test_build_global_dist(monkeypatch, tmpdir):
193
193
) as f :
194
194
pyproject_toml = f .read ()
195
195
196
- files = set ( "pybind11/{}" .format (n ) for n in all_files )
196
+ files = { "pybind11/{}" .format (n ) for n in all_files }
197
197
files |= sdist_files
198
- files |= set ( "pybind11_global{}" .format (n ) for n in local_sdist_files )
198
+ files |= { "pybind11_global{}" .format (n ) for n in local_sdist_files }
199
199
assert simpler == files
200
200
201
201
with open (os .path .join (MAIN_DIR , "tools" , "setup_global.py.in" ), "rb" ) as f :
@@ -220,7 +220,7 @@ def tests_build_wheel(monkeypatch, tmpdir):
220
220
221
221
(wheel ,) = tmpdir .visit ("*.whl" )
222
222
223
- files = set ( "pybind11/{}" .format (n ) for n in all_files )
223
+ files = { "pybind11/{}" .format (n ) for n in all_files }
224
224
files |= {
225
225
"dist-info/LICENSE" ,
226
226
"dist-info/METADATA" ,
@@ -233,10 +233,10 @@ def tests_build_wheel(monkeypatch, tmpdir):
233
233
with zipfile .ZipFile (str (wheel )) as z :
234
234
names = z .namelist ()
235
235
236
- trimmed = set ( n for n in names if "dist-info" not in n )
237
- trimmed |= set (
236
+ trimmed = { n for n in names if "dist-info" not in n }
237
+ trimmed |= {
238
238
"dist-info/{}" .format (n .split ("/" , 1 )[- 1 ]) for n in names if "dist-info" in n
239
- )
239
+ }
240
240
assert files == trimmed
241
241
242
242
@@ -250,8 +250,8 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
250
250
251
251
(wheel ,) = tmpdir .visit ("*.whl" )
252
252
253
- files = set ( "data/data/{}" .format (n ) for n in src_files )
254
- files |= set ( "data/headers/{}" .format (n [8 :]) for n in headers )
253
+ files = { "data/data/{}" .format (n ) for n in src_files }
254
+ files |= { "data/headers/{}" .format (n [8 :]) for n in headers }
255
255
files |= {
256
256
"dist-info/LICENSE" ,
257
257
"dist-info/METADATA" ,
@@ -264,6 +264,6 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
264
264
names = z .namelist ()
265
265
266
266
beginning = names [0 ].split ("/" , 1 )[0 ].rsplit ("." , 1 )[0 ]
267
- trimmed = set ( n [len (beginning ) + 1 :] for n in names )
267
+ trimmed = { n [len (beginning ) + 1 :] for n in names }
268
268
269
269
assert files == trimmed
0 commit comments