mirror of https://github.com/pypa/pip
isort: Include trailing commas
This commit is contained in:
parent
9ff3c18bf2
commit
353a13ddff
|
@ -9,6 +9,7 @@ known_first_party =
|
|||
pip
|
||||
tests
|
||||
default_section = THIRDPARTY
|
||||
include_trailing_comma = true
|
||||
|
||||
[flake8]
|
||||
# Ignoring unused imports since mypy would warn of that.
|
||||
|
|
|
@ -10,13 +10,13 @@ import warnings
|
|||
|
||||
from pip._internal import cmdoptions
|
||||
from pip._internal.baseparser import (
|
||||
ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
|
||||
)
|
||||
from pip._internal.compat import WINDOWS
|
||||
from pip._internal.download import PipSession
|
||||
from pip._internal.exceptions import (
|
||||
BadCommand, CommandError, InstallationError, PreviousBuildDirError,
|
||||
UninstallationError
|
||||
UninstallationError,
|
||||
)
|
||||
from pip._internal.index import PackageFinder
|
||||
from pip._internal.locations import running_under_virtualenv
|
||||
|
@ -24,7 +24,7 @@ from pip._internal.req.req_file import parse_requirements
|
|||
from pip._internal.req.req_install import InstallRequirement
|
||||
from pip._internal.status_codes import (
|
||||
ERROR, PREVIOUS_BUILD_DIR_ERROR, SUCCESS, UNKNOWN_ERROR,
|
||||
VIRTUALENV_NOT_FOUND
|
||||
VIRTUALENV_NOT_FOUND,
|
||||
)
|
||||
from pip._internal.utils import deprecation
|
||||
from pip._internal.utils.logging import IndentingFormatter
|
||||
|
|
|
@ -14,7 +14,7 @@ from functools import partial
|
|||
from optparse import SUPPRESS_HELP, Option, OptionGroup
|
||||
|
||||
from pip._internal.index import (
|
||||
FormatControl, fmt_ctl_handle_mutual_exclude, fmt_ctl_no_binary
|
||||
FormatControl, fmt_ctl_handle_mutual_exclude, fmt_ctl_no_binary,
|
||||
)
|
||||
from pip._internal.locations import USER_CACHE_DIR, src_prefix
|
||||
from pip._internal.models import PyPI
|
||||
|
|
|
@ -10,7 +10,7 @@ from pip._internal import cmdoptions
|
|||
from pip._internal.basecommand import RequirementCommand
|
||||
from pip._internal.cache import WheelCache
|
||||
from pip._internal.exceptions import (
|
||||
CommandError, InstallationError, PreviousBuildDirError
|
||||
CommandError, InstallationError, PreviousBuildDirError,
|
||||
)
|
||||
from pip._internal.locations import distutils_scheme, virtualenv_no_global
|
||||
from pip._internal.operations.prepare import RequirementPreparer
|
||||
|
|
|
@ -13,7 +13,7 @@ from pip._internal.exceptions import CommandError
|
|||
from pip._internal.index import PackageFinder
|
||||
from pip._internal.utils.deprecation import RemovedInPip11Warning
|
||||
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
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from pip._vendor.six.moves import configparser
|
|||
from pip._internal.exceptions import ConfigurationError
|
||||
from pip._internal.locations import (
|
||||
legacy_config_file, new_config_file, running_under_virtualenv,
|
||||
site_config_files, venv_config_file
|
||||
site_config_files, venv_config_file,
|
||||
)
|
||||
from pip._internal.utils.misc import ensure_dir, enum
|
||||
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
|
||||
|
|
|
@ -39,7 +39,7 @@ from pip._internal.utils.logging import indent_log
|
|||
from pip._internal.utils.misc import (
|
||||
ARCHIVE_EXTENSIONS, ask_path_exists, backup_dir, call_subprocess, consume,
|
||||
display_path, format_size, get_installed_version, rmtree, splitext,
|
||||
unpack_file
|
||||
unpack_file,
|
||||
)
|
||||
from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
|
|
@ -25,7 +25,7 @@ from pip._internal.compat import ipaddress
|
|||
from pip._internal.download import HAS_TLS, is_url, path_to_url, url_to_path
|
||||
from pip._internal.exceptions import (
|
||||
BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename,
|
||||
UnsupportedWheel
|
||||
UnsupportedWheel,
|
||||
)
|
||||
from pip._internal.models import PyPI
|
||||
from pip._internal.pep425tags import get_supported
|
||||
|
@ -33,7 +33,7 @@ from pip._internal.utils.deprecation import RemovedInPip11Warning
|
|||
from pip._internal.utils.logging import indent_log
|
||||
from pip._internal.utils.misc import (
|
||||
ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS, cached_property, normalize_path,
|
||||
splitext
|
||||
splitext,
|
||||
)
|
||||
from pip._internal.utils.packaging import check_requires_python
|
||||
from pip._internal.wheel import Wheel, wheel_ext
|
||||
|
|
|
@ -15,7 +15,7 @@ from pip._internal.req import InstallRequirement
|
|||
from pip._internal.req.req_file import COMMENT_RE
|
||||
from pip._internal.utils.deprecation import RemovedInPip11Warning
|
||||
from pip._internal.utils.misc import (
|
||||
dist_is_editable, get_installed_distributions
|
||||
dist_is_editable, get_installed_distributions,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -8,11 +8,11 @@ from pip._vendor import pkg_resources, requests
|
|||
|
||||
from pip._internal.compat import expanduser
|
||||
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
|
||||
PreviousBuildDirError, VcsHashUnsupported,
|
||||
)
|
||||
from pip._internal.utils.hashes import MissingHashes
|
||||
from pip._internal.utils.logging import indent_log
|
||||
|
|
|
@ -24,11 +24,11 @@ from pip._vendor.pkg_resources import RequirementParseError, parse_requirements
|
|||
from pip._internal import wheel
|
||||
from pip._internal.compat import native_str
|
||||
from pip._internal.download import (
|
||||
is_archive_file, is_url, path_to_url, url_to_path
|
||||
is_archive_file, is_url, path_to_url, url_to_path,
|
||||
)
|
||||
from pip._internal.exceptions import InstallationError, UninstallationError
|
||||
from pip._internal.locations import (
|
||||
PIP_DELETE_MARKER_FILENAME, running_under_virtualenv
|
||||
PIP_DELETE_MARKER_FILENAME, running_under_virtualenv,
|
||||
)
|
||||
from pip._internal.req.req_uninstall import UninstallPathSet
|
||||
from pip._internal.utils.deprecation import RemovedInPip11Warning
|
||||
|
@ -37,7 +37,7 @@ from pip._internal.utils.logging import indent_log
|
|||
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, is_installable_dir, read_text_file, rmtree
|
||||
get_installed_version, is_installable_dir, read_text_file, rmtree,
|
||||
)
|
||||
from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
|
|
@ -15,7 +15,7 @@ from pip._internal.locations import bin_py, bin_user
|
|||
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
|
||||
normalize_path, renames,
|
||||
)
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ from itertools import chain
|
|||
|
||||
from pip._internal.exceptions import (
|
||||
BestVersionAlreadyInstalled, DistributionNotFound, HashError, HashErrors,
|
||||
UnsupportedPythonVersion
|
||||
UnsupportedPythonVersion,
|
||||
)
|
||||
from pip._internal.req.req_install import InstallRequirement
|
||||
from pip._internal.utils.logging import indent_log
|
||||
|
|
|
@ -5,7 +5,7 @@ import hashlib
|
|||
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
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ from pip._internal.compat import console_to_str, expanduser, stdlib_pkgs
|
|||
from pip._internal.exceptions import InstallationError
|
||||
from pip._internal.locations import (
|
||||
running_under_virtualenv, site_packages, user_site, virtualenv_no_global,
|
||||
write_delete_marker_file
|
||||
write_delete_marker_file,
|
||||
)
|
||||
|
||||
if PY2:
|
||||
|
|
|
@ -10,7 +10,7 @@ from signal import SIGINT, default_int_handler, signal
|
|||
from pip._vendor import six
|
||||
from pip._vendor.progress.bar import (
|
||||
Bar, ChargingBar, FillingCirclesBar, FillingSquaresBar, IncrementalBar,
|
||||
ShadyBar
|
||||
ShadyBar,
|
||||
)
|
||||
from pip._vendor.progress.helpers import HIDE_CURSOR, SHOW_CURSOR, WritelnMixin
|
||||
from pip._vendor.progress.spinner import Spinner
|
||||
|
|
|
@ -27,14 +27,14 @@ from pip._vendor.six import StringIO
|
|||
from pip._internal import pep425tags
|
||||
from pip._internal.download import path_to_url, unpack_url
|
||||
from pip._internal.exceptions import (
|
||||
InstallationError, InvalidWheelFilename, UnsupportedWheel
|
||||
InstallationError, InvalidWheelFilename, UnsupportedWheel,
|
||||
)
|
||||
from pip._internal.locations import (
|
||||
PIP_DELETE_MARKER_FILENAME, distutils_scheme
|
||||
PIP_DELETE_MARKER_FILENAME, distutils_scheme,
|
||||
)
|
||||
from pip._internal.utils.logging import indent_log
|
||||
from pip._internal.utils.misc import (
|
||||
call_subprocess, captured_stdout, ensure_dir, read_chunks
|
||||
call_subprocess, captured_stdout, ensure_dir, read_chunks,
|
||||
)
|
||||
from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
|
|
@ -8,7 +8,7 @@ import pytest
|
|||
|
||||
from tests.lib import (
|
||||
_create_test_package, _create_test_package_with_srcdir, need_bzr,
|
||||
need_mercurial
|
||||
need_mercurial,
|
||||
)
|
||||
|
||||
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
|
||||
|
|
|
@ -13,7 +13,7 @@ from pip._internal.utils.misc import rmtree
|
|||
from tests.lib import (
|
||||
_create_svn_repo, _create_test_package, create_test_package_with_setup,
|
||||
need_bzr, need_mercurial, path_to_url, pyversion, pyversion_tuple,
|
||||
requirements_file
|
||||
requirements_file,
|
||||
)
|
||||
from tests.lib.local_repos import local_checkout
|
||||
from tests.lib.path import Path
|
||||
|
|
|
@ -5,7 +5,7 @@ import pytest
|
|||
|
||||
from tests.lib import (
|
||||
_create_test_package_with_subdirectory, path_to_url, pyversion,
|
||||
requirements_file
|
||||
requirements_file,
|
||||
)
|
||||
from tests.lib.local_repos import local_checkout
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from tests.lib import (
|
||||
_change_test_package_version, _create_test_package, pyversion
|
||||
_change_test_package_version, _create_test_package, pyversion,
|
||||
)
|
||||
from tests.lib.local_repos import local_checkout
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ from pip._internal.vcs.git import Git
|
|||
from tests.lib import _create_test_package
|
||||
from tests.lib.git_submodule_helpers import (
|
||||
_change_test_package_submodule, _create_test_package_with_submodule,
|
||||
_pull_in_submodule_changes_to_module
|
||||
_pull_in_submodule_changes_to_module,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from pip._internal.commands.search import (
|
||||
SearchCommand, highest_version, print_results, transform_hits
|
||||
SearchCommand, highest_version, print_results, transform_hits,
|
||||
)
|
||||
from pip._internal.status_codes import NO_MATCHES_FOUND, SUCCESS
|
||||
from tests.lib import pyversion
|
||||
|
|
|
@ -5,7 +5,7 @@ import pytest
|
|||
|
||||
import pip._internal.compat
|
||||
from pip._internal.compat import (
|
||||
console_to_str, expanduser, get_path_uid, native_str
|
||||
console_to_str, expanduser, get_path_uid, native_str,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from mock import MagicMock
|
|||
|
||||
from pip._internal.exceptions import ConfigurationError
|
||||
from pip._internal.locations import (
|
||||
new_config_file, site_config_files, venv_config_file
|
||||
new_config_file, site_config_files, venv_config_file,
|
||||
)
|
||||
from tests.lib.configuration_helpers import ConfigurationMixin, kinds
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from pip._vendor.six.moves.urllib import request as urllib_request
|
|||
import pip
|
||||
from pip._internal.download import (
|
||||
MultiDomainBasicAuth, PipSession, SafeFileCache, path_to_url,
|
||||
unpack_file_url, unpack_http_url, url_to_path
|
||||
unpack_file_url, unpack_http_url, url_to_path,
|
||||
)
|
||||
from pip._internal.exceptions import HashMismatch
|
||||
from pip._internal.index import Link
|
||||
|
|
|
@ -8,10 +8,10 @@ import pip._internal.pep425tags
|
|||
import pip._internal.wheel
|
||||
from pip._internal.download import PipSession
|
||||
from pip._internal.exceptions import (
|
||||
BestVersionAlreadyInstalled, DistributionNotFound
|
||||
BestVersionAlreadyInstalled, DistributionNotFound,
|
||||
)
|
||||
from pip._internal.index import (
|
||||
FormatControl, InstallationCandidate, Link, PackageFinder, fmt_ctl_formats
|
||||
FormatControl, InstallationCandidate, Link, PackageFinder, fmt_ctl_formats,
|
||||
)
|
||||
from pip._internal.req import InstallRequirement
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ from pip._vendor.packaging.requirements import Requirement
|
|||
from pip._internal.commands.install import InstallCommand
|
||||
from pip._internal.download import PipSession, path_to_url
|
||||
from pip._internal.exceptions import (
|
||||
HashErrors, InstallationError, InvalidWheelFilename, PreviousBuildDirError
|
||||
HashErrors, InstallationError, InvalidWheelFilename, PreviousBuildDirError,
|
||||
)
|
||||
from pip._internal.index import PackageFinder
|
||||
from pip._internal.operations.prepare import RequirementPreparer
|
||||
|
|
|
@ -9,12 +9,12 @@ from pretend import stub
|
|||
import pip._internal.index
|
||||
from pip._internal.download import PipSession
|
||||
from pip._internal.exceptions import (
|
||||
InstallationError, RequirementsFileParseError
|
||||
InstallationError, RequirementsFileParseError,
|
||||
)
|
||||
from pip._internal.index import PackageFinder
|
||||
from pip._internal.req.req_file import (
|
||||
break_args_options, ignore_comments, join_lines, parse_requirements,
|
||||
preprocess, process_line, skip_regex
|
||||
preprocess, process_line, skip_regex,
|
||||
)
|
||||
from pip._internal.req.req_install import InstallRequirement
|
||||
from tests.lib import requirements_file
|
||||
|
|
|
@ -6,7 +6,7 @@ from mock import Mock
|
|||
import pip._internal.req.req_uninstall
|
||||
from pip._internal.req.req_uninstall import (
|
||||
UninstallPathSet, compact, compress_for_output_listing,
|
||||
uninstallation_paths
|
||||
uninstallation_paths,
|
||||
)
|
||||
from tests.lib import create_file
|
||||
|
||||
|
|
|
@ -17,14 +17,14 @@ from mock import Mock, patch
|
|||
from pip._vendor.six import BytesIO
|
||||
|
||||
from pip._internal.exceptions import (
|
||||
HashMismatch, HashMissing, InstallationError, UnsupportedPythonVersion
|
||||
HashMismatch, HashMissing, InstallationError, UnsupportedPythonVersion,
|
||||
)
|
||||
from pip._internal.utils.encoding import auto_decode
|
||||
from pip._internal.utils.glibc import check_glibc_version
|
||||
from pip._internal.utils.hashes import Hashes, MissingHashes
|
||||
from pip._internal.utils.misc import (
|
||||
egg_link_path, ensure_dir, get_installed_distributions, get_prog,
|
||||
normalize_path, rmtree, untar_file, unzip_file
|
||||
normalize_path, rmtree, untar_file, unzip_file,
|
||||
)
|
||||
from pip._internal.utils.packaging import check_dist_requires_python
|
||||
from pip._internal.utils.temp_dir import TempDirectory
|
||||
|
|
Loading…
Reference in New Issue