Skip to content

Commit 37ab324

Browse files
committed
pep8 bootstrap_env
1 parent 25f30eb commit 37ab324

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

bootstrap_env.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
unicode_literals, with_statement)
55

66
import os
7-
import platform
87
import subprocess
98
import sys
109

@@ -18,10 +17,6 @@ def fail(message):
1817

1918

2019
PY2 = sys.version_info[0] == 2
21-
if PY2:
22-
from urllib import urlretrieve
23-
else:
24-
from urllib.request import urlretrieve
2520

2621

2722
def has_module(module_name):
@@ -79,11 +74,13 @@ def which(exe=None, throw=True):
7974
python_bin = os.path.join(env_dir, 'bin', 'python')
8075
virtualenv_bin = which('virtualenv', throw=False)
8176
virtualenv_exists = os.path.exists(env_dir) and os.path.isfile(python_bin)
82-
sphinx_requirements_filepath = os.path.join(project_dir, 'requirements', 'doc.txt')
77+
sphinx_requirements_filepath = os.path.join(
78+
project_dir, 'requirements', 'doc.txt'
79+
)
8380

8481

8582
try:
86-
import virtualenv
83+
import virtualenv # noqa
8784
except ImportError:
8885
message = (
8986
'Virtualenv is required for this bootstrap to run.\n'
@@ -94,12 +91,12 @@ def which(exe=None, throw=True):
9491

9592

9693
try:
97-
import pip
94+
import pip # noqa
9895
except ImportError:
9996
message = (
10097
'pip is required for this bootstrap to run.\n'
10198
'Find instructions on how to install at: %s' %
102-
'http://pip.readthedocs.org/en/latest/installing.html'
99+
'http://pip.readthedocs.io/en/latest/installing.html'
103100
)
104101
fail(message)
105102

0 commit comments

Comments
 (0)