Skip to content

Commit

Permalink
Change isort multi_line_output to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Jul 22, 2019
1 parent 8582f7e commit 537b0fc
Show file tree
Hide file tree
Showing 42 changed files with 271 additions and 85 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skip =
.scratch,
_vendor,
data
multi_line_output = 5
multi_line_output = 3
known_third_party =
pip._vendor
known_first_party =
Expand Down
16 changes: 12 additions & 4 deletions src/pip/_internal/cli/base_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@
from pip._internal.cli import cmdoptions
from pip._internal.cli.cmdoptions import make_search_scope
from pip._internal.cli.parser import (
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
ConfigOptionParser,
UpdatingDefaultsHelpFormatter,
)
from pip._internal.cli.status_codes import (
ERROR, PREVIOUS_BUILD_DIR_ERROR, SUCCESS, UNKNOWN_ERROR,
ERROR,
PREVIOUS_BUILD_DIR_ERROR,
SUCCESS,
UNKNOWN_ERROR,
VIRTUALENV_NOT_FOUND,
)
from pip._internal.download import PipSession
from pip._internal.exceptions import (
BadCommand, CommandError, InstallationError, PreviousBuildDirError,
BadCommand,
CommandError,
InstallationError,
PreviousBuildDirError,
UninstallationError,
)
from pip._internal.index import PackageFinder
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.req.constructors import (
install_req_from_editable, install_req_from_line,
install_req_from_editable,
install_req_from_line,
)
from pip._internal.req.req_file import parse_requirements
from pip._internal.utils.deprecation import deprecated
Expand Down
7 changes: 5 additions & 2 deletions src/pip/_internal/cli/main_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@

from pip._internal.cli import cmdoptions
from pip._internal.cli.parser import (
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
ConfigOptionParser,
UpdatingDefaultsHelpFormatter,
)
from pip._internal.commands import (
commands_dict, get_similar_commands, get_summaries,
commands_dict,
get_similar_commands,
get_summaries,
)
from pip._internal.exceptions import CommandError
from pip._internal.utils.misc import get_pip_version, get_prog
Expand Down
3 changes: 2 additions & 1 deletion src/pip/_internal/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from pip._internal.cli.base_command import Command
from pip._internal.operations.check import (
check_package_set, create_package_set_from_installed,
check_package_set,
create_package_set_from_installed,
)

logger = logging.getLogger(__name__)
Expand Down
4 changes: 3 additions & 1 deletion src/pip/_internal/commands/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.configuration import (
Configuration, get_configuration_files, kinds,
Configuration,
get_configuration_files,
kinds,
)
from pip._internal.exceptions import PipError
from pip._internal.utils.deprecation import deprecated
Expand Down
7 changes: 5 additions & 2 deletions src/pip/_internal/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.cli.status_codes import ERROR
from pip._internal.exceptions import (
CommandError, InstallationError, PreviousBuildDirError,
CommandError,
InstallationError,
PreviousBuildDirError,
)
from pip._internal.legacy_resolve import Resolver
from pip._internal.locations import distutils_scheme
Expand All @@ -25,7 +27,8 @@
from pip._internal.req.req_tracker import RequirementTracker
from pip._internal.utils.filesystem import check_path_owner
from pip._internal.utils.misc import (
ensure_dir, get_installed_version,
ensure_dir,
get_installed_version,
protect_pip_from_modification_on_windows,
)
from pip._internal.utils.temp_dir import TempDirectory
Expand Down
3 changes: 2 additions & 1 deletion src/pip/_internal/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from pip._internal.index import PackageFinder
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.utils.misc import (
dist_is_editable, get_installed_distributions,
dist_is_editable,
get_installed_distributions,
)
from pip._internal.utils.packaging import get_installer

Expand Down
3 changes: 2 additions & 1 deletion src/pip/_internal/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from pip._vendor.six.moves import configparser

from pip._internal.exceptions import (
ConfigurationError, ConfigurationFileCouldNotBeLoaded,
ConfigurationError,
ConfigurationFileCouldNotBeLoaded,
)
from pip._internal.utils import appdirs
from pip._internal.utils.compat import WINDOWS, expanduser
Expand Down
20 changes: 16 additions & 4 deletions src/pip/_internal/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,22 @@
from pip._internal.utils.glibc import libc_ver
from pip._internal.utils.marker_files import write_delete_marker_file
from pip._internal.utils.misc import (
ARCHIVE_EXTENSIONS, ask, ask_input, ask_password, ask_path_exists,
backup_dir, consume, display_path, format_size, get_installed_version,
path_to_url, remove_auth_from_url, rmtree, split_auth_netloc_from_url,
splitext, unpack_file,
ARCHIVE_EXTENSIONS,
ask,
ask_input,
ask_password,
ask_path_exists,
backup_dir,
consume,
display_path,
format_size,
get_installed_version,
path_to_url,
remove_auth_from_url,
rmtree,
split_auth_netloc_from_url,
splitext,
unpack_file,
)
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
9 changes: 7 additions & 2 deletions src/pip/_internal/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

from pip._internal.download import is_url, url_to_path
from pip._internal.exceptions import (
BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename,
BestVersionAlreadyInstalled,
DistributionNotFound,
InvalidWheelFilename,
UnsupportedWheel,
)
from pip._internal.models.candidate import InstallationCandidate
Expand All @@ -30,7 +32,10 @@
from pip._internal.utils.compat import ipaddress
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS, WHEEL_EXTENSION, path_to_url,
ARCHIVE_EXTENSIONS,
SUPPORTED_EXTENSIONS,
WHEEL_EXTENSION,
path_to_url,
redact_password_from_url,
)
from pip._internal.utils.packaging import check_requires_python
Expand Down
12 changes: 9 additions & 3 deletions src/pip/_internal/legacy_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@
from pip._vendor.packaging import specifiers

from pip._internal.exceptions import (
BestVersionAlreadyInstalled, DistributionNotFound, HashError, HashErrors,
BestVersionAlreadyInstalled,
DistributionNotFound,
HashError,
HashErrors,
UnsupportedPythonVersion,
)
from pip._internal.req.constructors import install_req_from_req_string
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
dist_in_usersite, ensure_dir, normalize_version_info,
dist_in_usersite,
ensure_dir,
normalize_version_info,
)
from pip._internal.utils.packaging import (
check_requires_python, get_requires_python,
check_requires_python,
get_requires_python,
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

Expand Down
7 changes: 5 additions & 2 deletions src/pip/_internal/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
from pip._vendor.six.moves.urllib import parse as urllib_parse

from pip._internal.utils.misc import (
WHEEL_EXTENSION, path_to_url, redact_password_from_url,
split_auth_from_netloc, splitext,
WHEEL_EXTENSION,
path_to_url,
redact_password_from_url,
split_auth_from_netloc,
splitext,
)
from pip._internal.utils.models import KeyBasedCompareMixin
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
6 changes: 4 additions & 2 deletions src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@

from pip._internal.exceptions import BadCommand, InstallationError
from pip._internal.req.constructors import (
install_req_from_editable, install_req_from_line,
install_req_from_editable,
install_req_from_line,
)
from pip._internal.req.req_file import COMMENT_RE
from pip._internal.utils.misc import (
dist_is_editable, get_installed_distributions,
dist_is_editable,
get_installed_distributions,
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

Expand Down
13 changes: 10 additions & 3 deletions src/pip/_internal/operations/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@
)
from pip._internal.distributions.installed import InstalledDistribution
from pip._internal.download import (
is_dir_url, is_file_url, is_vcs_url, unpack_url, url_to_path,
is_dir_url,
is_file_url,
is_vcs_url,
unpack_url,
url_to_path,
)
from pip._internal.exceptions import (
DirectoryUrlHashUnsupported, HashUnpinned, InstallationError,
PreviousBuildDirError, VcsHashUnsupported,
DirectoryUrlHashUnsupported,
HashUnpinned,
InstallationError,
PreviousBuildDirError,
VcsHashUnsupported,
)
from pip._internal.utils.compat import expanduser
from pip._internal.utils.hashes import MissingHashes
Expand Down
3 changes: 2 additions & 1 deletion src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from pip._internal.exceptions import RequirementsFileParseError
from pip._internal.models.search_scope import SearchScope
from pip._internal.req.constructors import (
install_req_from_editable, install_req_from_line,
install_req_from_editable,
install_req_from_line,
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

Expand Down
14 changes: 11 additions & 3 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@
from pip._internal.utils.logging import indent_log
from pip._internal.utils.marker_files import PIP_DELETE_MARKER_FILENAME
from pip._internal.utils.misc import (
_make_build_dir, ask_path_exists, backup_dir, call_subprocess,
display_path, dist_in_site_packages, dist_in_usersite, ensure_dir,
get_installed_version, redact_password_from_url, rmtree,
_make_build_dir,
ask_path_exists,
backup_dir,
call_subprocess,
display_path,
dist_in_site_packages,
dist_in_usersite,
ensure_dir,
get_installed_version,
redact_password_from_url,
rmtree,
)
from pip._internal.utils.packaging import get_metadata
from pip._internal.utils.setuptools_build import make_setuptools_shim_args
Expand Down
11 changes: 9 additions & 2 deletions src/pip/_internal/req/req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@
from pip._internal.utils.compat import WINDOWS, cache_from_source, uses_pycache
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
FakeFile, ask, dist_in_usersite, dist_is_local, egg_link_path, is_local,
normalize_path, renames, rmtree,
FakeFile,
ask,
dist_in_usersite,
dist_is_local,
egg_link_path,
is_local,
normalize_path,
renames,
rmtree,
)
from pip._internal.utils.temp_dir import AdjacentTempDirectory, TempDirectory
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
4 changes: 3 additions & 1 deletion src/pip/_internal/utils/hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from pip._vendor.six import iteritems, iterkeys, itervalues

from pip._internal.exceptions import (
HashMismatch, HashMissing, InstallationError,
HashMismatch,
HashMissing,
InstallationError,
)
from pip._internal.utils.misc import read_chunks
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
9 changes: 7 additions & 2 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@
from pip._internal.exceptions import CommandError, InstallationError
from pip._internal.locations import site_packages, user_site
from pip._internal.utils.compat import (
WINDOWS, console_to_str, expanduser, stdlib_pkgs, str_to_display,
WINDOWS,
console_to_str,
expanduser,
stdlib_pkgs,
str_to_display,
)
from pip._internal.utils.marker_files import write_delete_marker_file
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.utils.virtualenv import (
running_under_virtualenv, virtualenv_no_global,
running_under_virtualenv,
virtualenv_no_global,
)

if PY2:
Expand Down
4 changes: 3 additions & 1 deletion src/pip/_internal/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
from pip._internal.utils.misc import display_path, redact_password_from_url
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.vcs.versioncontrol import (
RemoteNotFoundError, VersionControl, vcs,
RemoteNotFoundError,
VersionControl,
vcs,
)

urlsplit = urllib_parse.urlsplit
Expand Down
4 changes: 3 additions & 1 deletion src/pip/_internal/vcs/subversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
display_path, rmtree, split_auth_from_netloc,
display_path,
rmtree,
split_auth_from_netloc,
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.vcs.versioncontrol import VersionControl, vcs
Expand Down
6 changes: 5 additions & 1 deletion src/pip/_internal/vcs/versioncontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

from pip._internal.exceptions import BadCommand
from pip._internal.utils.misc import (
ask_path_exists, backup_dir, call_subprocess, display_path, rmtree,
ask_path_exists,
backup_dir,
call_subprocess,
display_path,
rmtree,
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

Expand Down
13 changes: 10 additions & 3 deletions src/pip/_internal/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@
from pip._internal import pep425tags
from pip._internal.download import unpack_url
from pip._internal.exceptions import (
InstallationError, InvalidWheelFilename, UnsupportedWheel,
InstallationError,
InvalidWheelFilename,
UnsupportedWheel,
)
from pip._internal.locations import distutils_scheme
from pip._internal.models.link import Link
from pip._internal.utils.logging import indent_log
from pip._internal.utils.marker_files import PIP_DELETE_MARKER_FILENAME
from pip._internal.utils.misc import (
LOG_DIVIDER, call_subprocess, captured_stdout, ensure_dir,
format_command_args, path_to_url, read_chunks,
LOG_DIVIDER,
call_subprocess,
captured_stdout,
ensure_dir,
format_command_args,
path_to_url,
read_chunks,
)
from pip._internal.utils.setuptools_build import make_setuptools_shim_args
from pip._internal.utils.temp_dir import TempDirectory
Expand Down
Loading

0 comments on commit 537b0fc

Please sign in to comment.