Skip to content

Commit 3f5a8ae

Browse files
committed
flake8 bootstrap_env
1 parent 98df922 commit 3f5a8ae

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

bootstrap_env.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/usr/bin/env python
22

3-
from __future__ import (absolute_import, division, print_function,
4-
unicode_literals, with_statement)
3+
from __future__ import absolute_import, print_function, unicode_literals
54

65
import os
7-
import platform
86
import subprocess
97
import sys
108

@@ -17,13 +15,6 @@ def fail(message):
1715
sys.exit("Error: {message}".format(message=message))
1816

1917

20-
PY2 = sys.version_info[0] == 2
21-
if PY2:
22-
from urllib import urlretrieve
23-
else:
24-
from urllib.request import urlretrieve
25-
26-
2718
def has_module(module_name):
2819
try:
2920
import imp
@@ -79,12 +70,14 @@ def which(exe=None, throw=True):
7970
python_bin = os.path.join(env_dir, 'bin', 'python')
8071
virtualenv_bin = which('virtualenv', throw=False)
8172
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')
83-
test_requirements_filepath = os.path.join(project_dir, 'requirements', 'test.txt')
73+
sphinx_requirements_filepath = os.path.join(
74+
project_dir, 'requirements', 'doc.txt')
75+
test_requirements_filepath = os.path.join(
76+
project_dir, 'requirements', 'test.txt')
8477

8578

8679
try:
87-
import virtualenv
80+
import virtualenv # NOQA
8881
except ImportError:
8982
message = (
9083
'Virtualenv is required for this bootstrap to run.\n'
@@ -95,7 +88,7 @@ def which(exe=None, throw=True):
9588

9689

9790
try:
98-
import pip
91+
import pip # NOQA
9992
except ImportError:
10093
message = (
10194
'pip is required for this bootstrap to run.\n'

0 commit comments

Comments
 (0)