From 3a67b0f16555032b0504174f3f8d2de56bf654ab Mon Sep 17 00:00:00 2001 From: as Date: Fri, 14 Dec 2018 11:10:52 +0100 Subject: [PATCH] fixed formatting --- poetry/utils/env.py | 13 +++++++++++-- tests/utils/test_env.py | 21 ++++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/poetry/utils/env.py b/poetry/utils/env.py index b2de09d0890..c25a5ff300a 100644 --- a/poetry/utils/env.py +++ b/poetry/utils/env.py @@ -291,8 +291,17 @@ def build_venv(cls, path): from setuptools import __version__ as setuptools_version the_venv = VirtualEnv(Path(path)) - the_venv.run("python", "-m", "pip", "install", "--upgrade", "pip=={}".format(pip_version)) - the_venv.run("python", "-m", "pip", "install", "--upgrade", "setuptools=={}".format(setuptools_version)) + the_venv.run( + "python", "-m", "pip", "install", "--upgrade", "pip=={}".format(pip_version) + ) + the_venv.run( + "python", + "-m", + "pip", + "install", + "--upgrade", + "setuptools=={}".format(setuptools_version), + ) @classmethod def get_base_prefix(cls): # type: () -> Path diff --git a/tests/utils/test_env.py b/tests/utils/test_env.py index 03ab02e1870..eed9e778e96 100644 --- a/tests/utils/test_env.py +++ b/tests/utils/test_env.py @@ -48,15 +48,22 @@ def test_virtualenvs_pip_and_setuptools_versions(tmp_dir): from pip import __version__ as pip_version venv_pip_version = venv.run( - "python", "-c", '"from __future__ import print_function;from pip import __version__; print(__version__)"', - shell=True + "python", + "-c", + '"from __future__ import print_function;from pip import __version__; print(__version__)"', + shell=True, ) - venv_pip_version = sub(r'\s', '', venv_pip_version) + venv_pip_version = sub(r"\s", "", venv_pip_version) venv_setuptools_version = venv.run( - "python", "-c", '"from __future__ import print_function;from setuptools import __version__; print(__version__)"', - shell=True + "python", + "-c", + '"from __future__ import print_function;from setuptools import __version__; print(__version__)"', + shell=True, ) - venv_setuptools_version = sub(r'\s', '', venv_setuptools_version) + venv_setuptools_version = sub(r"\s", "", venv_setuptools_version) - assert venv_pip_version == pip_version and venv_setuptools_version == setuptools_version \ No newline at end of file + assert ( + venv_pip_version == pip_version + and venv_setuptools_version == setuptools_version + )