From 9cb49c87d65336e2c40ddd01039e5a05df892a15 Mon Sep 17 00:00:00 2001 From: Nitesh Sharma Date: Wed, 24 Jul 2019 17:22:10 +0530 Subject: [PATCH] sort imports and rebase with upstream --- src/pip/_internal/build_env.py | 2 +- src/pip/_internal/cli/cmdoptions.py | 2 +- src/pip/_internal/cli/spinners.py | 1 + src/pip/_internal/download.py | 2 +- src/pip/_internal/wheel.py | 2 +- tests/unit/test_utils.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pip/_internal/build_env.py b/src/pip/_internal/build_env.py index a4fcf4e630a..a1e9946b895 100644 --- a/src/pip/_internal/build_env.py +++ b/src/pip/_internal/build_env.py @@ -12,10 +12,10 @@ from pip._vendor.pkg_resources import Requirement, VersionConflict, WorkingSet from pip import __file__ as pip_location +from pip._internal.cli.spinners import open_spinner from pip._internal.utils.misc import call_subprocess from pip._internal.utils.temp_dir import TempDirectory from pip._internal.utils.typing import MYPY_CHECK_RUNNING -from pip._internal.cli.spinners import open_spinner if MYPY_CHECK_RUNNING: from typing import Tuple, Set, Iterable, Optional, List diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py index d212d82bb82..24571ceee92 100644 --- a/src/pip/_internal/cli/cmdoptions.py +++ b/src/pip/_internal/cli/cmdoptions.py @@ -17,6 +17,7 @@ from optparse import SUPPRESS_HELP, Option, OptionGroup from textwrap import dedent +from pip._internal.cli.progress_bars import BAR_TYPES from pip._internal.exceptions import CommandError from pip._internal.locations import USER_CACHE_DIR, get_src_prefix from pip._internal.models.format_control import FormatControl @@ -26,7 +27,6 @@ from pip._internal.utils.hashes import STRONG_HASHES from pip._internal.utils.misc import redact_password_from_url from pip._internal.utils.typing import MYPY_CHECK_RUNNING -from pip._internal.cli.progress_bars import BAR_TYPES if MYPY_CHECK_RUNNING: from typing import Any, Callable, Dict, Optional, Tuple diff --git a/src/pip/_internal/cli/spinners.py b/src/pip/_internal/cli/spinners.py index e6df68b5fcd..66dc4f035fa 100644 --- a/src/pip/_internal/cli/spinners.py +++ b/src/pip/_internal/cli/spinners.py @@ -11,6 +11,7 @@ from pip._internal.utils.compat import WINDOWS from pip._internal.utils.logging import get_indentation from pip._internal.utils.typing import MYPY_CHECK_RUNNING + if MYPY_CHECK_RUNNING: from typing import Iterator, IO diff --git a/src/pip/_internal/download.py b/src/pip/_internal/download.py index d092c89e290..8689a74718a 100644 --- a/src/pip/_internal/download.py +++ b/src/pip/_internal/download.py @@ -27,6 +27,7 @@ from pip._vendor.six.moves.urllib import request as urllib_request import pip +from pip._internal.cli.progress_bars import DownloadProgressProvider from pip._internal.exceptions import HashMismatch, InstallationError from pip._internal.models.index import PyPI # Import ssl from compat so the initial import occurs in only one place. @@ -43,7 +44,6 @@ ) from pip._internal.utils.temp_dir import TempDirectory from pip._internal.utils.typing import MYPY_CHECK_RUNNING -from pip._internal.cli.progress_bars import DownloadProgressProvider from pip._internal.vcs import vcs if MYPY_CHECK_RUNNING: diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py index ba38b458961..104dec068e9 100644 --- a/src/pip/_internal/wheel.py +++ b/src/pip/_internal/wheel.py @@ -23,6 +23,7 @@ from pip._vendor.six import StringIO from pip._internal import pep425tags +from pip._internal.cli.spinners import open_spinner from pip._internal.download import unpack_url from pip._internal.exceptions import ( InstallationError, InvalidWheelFilename, UnsupportedWheel, @@ -38,7 +39,6 @@ from pip._internal.utils.setuptools_build import make_setuptools_shim_args from pip._internal.utils.temp_dir import TempDirectory from pip._internal.utils.typing import MYPY_CHECK_RUNNING -from pip._internal.cli.spinners import open_spinner if MYPY_CHECK_RUNNING: from typing import ( diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index e8a211d4d8b..ff6fd4299d5 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -22,6 +22,7 @@ from mock import Mock, patch from pip._vendor.six.moves.urllib import request as urllib_request +from pip._internal.cli.spinners import SpinnerInterface from pip._internal.exceptions import ( HashMismatch, HashMissing, InstallationError, ) @@ -41,7 +42,6 @@ ) from pip._internal.utils.setuptools_build import make_setuptools_shim_args from pip._internal.utils.temp_dir import AdjacentTempDirectory, TempDirectory -from pip._internal.cli.spinners import SpinnerInterface class Tests_EgglinkPath: