From 18493eac05703ced3965239e4a1db734bfcb07e0 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 14 May 2018 20:33:21 -0500 Subject: [PATCH 1/2] CI: Fixed linting on download_wheels --- scripts/download_wheels.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/download_wheels.py b/scripts/download_wheels.py index a4705d0e4e63c..a8486caee970c 100644 --- a/scripts/download_wheels.py +++ b/scripts/download_wheels.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python """Fetch wheels from wheels.scipy.org for a pandas version.""" import argparse import pathlib @@ -23,7 +24,7 @@ def fetch(version): dest.mkdir(exist_ok=True) files = [x for x in root.xpath("//a/text()") - if x.startswith(f'pandas-{version}') + if x.startswith('pandas-{}'.format(version)) and not dest.joinpath(x).exists()] N = len(files) From 54eabd7689d1016e12fac4da0cd41565322bfdf1 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 14 May 2018 21:14:08 -0500 Subject: [PATCH 2/2] More --- scripts/download_wheels.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/download_wheels.py b/scripts/download_wheels.py index a8486caee970c..f5cdbbe36d90d 100644 --- a/scripts/download_wheels.py +++ b/scripts/download_wheels.py @@ -33,7 +33,9 @@ def fetch(version): out = str(dest.joinpath(filename)) link = urllib.request.urljoin(base, filename) urllib.request.urlretrieve(link, out) - print(f"Downloaded {link} to {out} [{i}/{N}]") + print("Downloaded {link} to {out} [{i}/{N}]".format( + link=link, out=out, i=i, N=N + )) def main(args=None):