@@ -64,20 +64,22 @@ def add_options(self) -> None:
64
64
)
65
65
66
66
self .cmd_opts .add_option (
67
- ' --print-download-urls' ,
68
- dest = ' print_download_urls' ,
69
- metavar = ' output-file' ,
67
+ " --print-download-urls" ,
68
+ dest = " print_download_urls" ,
69
+ metavar = " output-file" ,
70
70
default = None ,
71
71
help = ("Print URLs of any downloaded distributions to this file." ),
72
72
)
73
73
74
74
self .cmd_opts .add_option (
75
- ' --avoid-wheel-downloads' ,
76
- dest = ' avoid_wheel_downloads' ,
75
+ " --avoid-wheel-downloads" ,
76
+ dest = " avoid_wheel_downloads" ,
77
77
default = False ,
78
- action = 'store_true' ,
79
- help = ("Where possible, avoid downloading wheels. This is "
80
- "currently only useful if --print-download-urls is set." ),
78
+ action = "store_true" ,
79
+ help = (
80
+ "Where possible, avoid downloading wheels. This is "
81
+ "currently only useful if --print-download-urls is set."
82
+ ),
81
83
)
82
84
83
85
cmdoptions .add_target_python_options (self .cmd_opts )
@@ -152,17 +154,19 @@ def run(self, options: Values, args: List[str]) -> int:
152
154
if req .satisfied_by is None :
153
155
assert req .name is not None
154
156
assert req .link is not None
155
- download_infos .append ({
156
- 'name' : req .name ,
157
- 'url' : req .link .url ,
158
- })
157
+ download_infos .append (
158
+ {
159
+ "name" : req .name ,
160
+ "url" : req .link .url ,
161
+ }
162
+ )
159
163
preparer .save_linked_requirement (req )
160
164
downloaded .append (req .name )
161
165
162
166
if downloaded :
163
167
write_output ("Successfully downloaded %s" , " " .join (downloaded ))
164
168
if options .print_download_urls :
165
- with open (options .print_download_urls , 'w' ) as f :
169
+ with open (options .print_download_urls , "w" ) as f :
166
170
json .dump (download_infos , f , indent = 4 )
167
171
168
172
return SUCCESS
0 commit comments