mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Resort imports except for patched and vendor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .cli import cli
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
||||
|
||||
+7
-2
@@ -9,11 +9,16 @@ import functools
|
||||
import importlib
|
||||
import io
|
||||
import os
|
||||
import six
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import six
|
||||
import vistir
|
||||
from .vendor.vistir.compat import NamedTemporaryFile, Path, ResourceWarning, TemporaryDirectory
|
||||
|
||||
from .vendor.vistir.compat import (
|
||||
NamedTemporaryFile, Path, ResourceWarning, TemporaryDirectory
|
||||
)
|
||||
|
||||
|
||||
# Backport required for earlier versions of Python.
|
||||
if sys.version_info < (3, 3):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .command import cli
|
||||
|
||||
@@ -4,23 +4,23 @@ from __future__ import absolute_import
|
||||
import os
|
||||
import sys
|
||||
|
||||
import crayons
|
||||
import delegator
|
||||
|
||||
from click import (
|
||||
argument, echo, edit, group, option, pass_context, secho, version_option
|
||||
)
|
||||
|
||||
import click_completion
|
||||
import crayons
|
||||
import delegator
|
||||
|
||||
from click_didyoumean import DYMCommandCollection
|
||||
|
||||
from ..__version__ import __version__
|
||||
from .options import (
|
||||
CONTEXT_SETTINGS, PipenvGroup, code_option, common_options, deploy_option,
|
||||
general_options, install_options, lock_options, pass_state, skip_lock_option,
|
||||
pypi_mirror_option, python_option, requirementstxt_option, sync_options,
|
||||
system_option, three_option, verbose_option, uninstall_options
|
||||
general_options, install_options, lock_options, pass_state,
|
||||
pypi_mirror_option, python_option, requirementstxt_option,
|
||||
skip_lock_option, sync_options, system_option, three_option,
|
||||
uninstall_options, verbose_option
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import absolute_import
|
||||
import os
|
||||
|
||||
import click.types
|
||||
|
||||
from click import (
|
||||
BadParameter, Group, Option, argument, echo, make_pass_decorator, option
|
||||
)
|
||||
|
||||
+23
-43
@@ -1,62 +1,42 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
|
||||
import json as simplejson
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
import json as simplejson
|
||||
import warnings
|
||||
|
||||
import click
|
||||
import six
|
||||
import urllib3.util as urllib3_util
|
||||
import vistir
|
||||
|
||||
import click_completion
|
||||
import crayons
|
||||
import dotenv
|
||||
import delegator
|
||||
import dotenv
|
||||
import pipfile
|
||||
import vistir
|
||||
import warnings
|
||||
import six
|
||||
|
||||
import urllib3.util as urllib3_util
|
||||
|
||||
from . import environments, exceptions, pep508checker, progress
|
||||
from ._compat import fix_utf8
|
||||
from .cmdparse import Script
|
||||
from .environments import (
|
||||
PIPENV_CACHE_DIR, PIPENV_COLORBLIND, PIPENV_DEFAULT_PYTHON_VERSION,
|
||||
PIPENV_DONT_USE_PYENV, PIPENV_HIDE_EMOJIS, PIPENV_MAX_SUBPROCESS,
|
||||
PIPENV_PYUP_API_KEY, PIPENV_SHELL_FANCY, PIPENV_SKIP_VALIDATION,
|
||||
PIPENV_YES, SESSION_IS_INTERACTIVE
|
||||
)
|
||||
from .project import Project, SourceNotFound
|
||||
from .utils import (
|
||||
convert_deps_to_pip,
|
||||
is_required_version,
|
||||
proper_case,
|
||||
pep423_name,
|
||||
venv_resolve_deps,
|
||||
escape_grouped_arguments,
|
||||
python_version,
|
||||
find_windows_executable,
|
||||
prepare_pip_source_args,
|
||||
is_valid_url,
|
||||
is_pypi_url,
|
||||
create_mirror_source,
|
||||
download_file,
|
||||
is_pinned,
|
||||
is_star,
|
||||
parse_indexes,
|
||||
escape_cmd,
|
||||
create_spinner,
|
||||
get_canonical_names
|
||||
convert_deps_to_pip, create_mirror_source, create_spinner, download_file,
|
||||
escape_cmd, escape_grouped_arguments, find_windows_executable,
|
||||
get_canonical_names, is_pinned, is_pypi_url, is_required_version, is_star,
|
||||
is_valid_url, parse_indexes, pep423_name, prepare_pip_source_args,
|
||||
proper_case, python_version, venv_resolve_deps
|
||||
)
|
||||
from . import environments, pep508checker, progress
|
||||
from .environments import (
|
||||
PIPENV_COLORBLIND,
|
||||
PIPENV_SHELL_FANCY,
|
||||
PIPENV_SKIP_VALIDATION,
|
||||
PIPENV_HIDE_EMOJIS,
|
||||
PIPENV_YES,
|
||||
PIPENV_DEFAULT_PYTHON_VERSION,
|
||||
PIPENV_MAX_SUBPROCESS,
|
||||
PIPENV_DONT_USE_PYENV,
|
||||
SESSION_IS_INTERACTIVE,
|
||||
PIPENV_CACHE_DIR,
|
||||
PIPENV_PYUP_API_KEY,
|
||||
)
|
||||
from ._compat import fix_utf8
|
||||
from . import exceptions
|
||||
|
||||
|
||||
# Packages that should be ignored later.
|
||||
BAD_PACKAGES = (
|
||||
|
||||
@@ -3,23 +3,25 @@
|
||||
import contextlib
|
||||
import importlib
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import operator
|
||||
import pkg_resources
|
||||
import os
|
||||
import site
|
||||
import six
|
||||
import sys
|
||||
|
||||
from distutils.sysconfig import get_python_lib
|
||||
from sysconfig import get_paths
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
import pkg_resources
|
||||
import six
|
||||
import vistir
|
||||
|
||||
import pipenv
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
from .utils import normalize_path
|
||||
|
||||
|
||||
BASE_WORKING_SET = pkg_resources.WorkingSet(sys.path)
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from appdirs import user_cache_dir
|
||||
from .vendor.vistir.misc import fs_str
|
||||
|
||||
from ._compat import fix_utf8
|
||||
from .vendor.vistir.misc import fs_str
|
||||
|
||||
|
||||
# HACK: avoid resolver.py uses the wrong byte code files.
|
||||
|
||||
+5
-11
@@ -3,27 +3,21 @@
|
||||
import itertools
|
||||
import sys
|
||||
|
||||
from traceback import format_exception
|
||||
from pprint import pformat
|
||||
from traceback import format_exception
|
||||
|
||||
import six
|
||||
|
||||
from . import environments
|
||||
from ._compat import fix_utf8
|
||||
from .patched import crayons
|
||||
from . import environments
|
||||
from .vendor.click.utils import echo as click_echo
|
||||
from .vendor.click._compat import get_text_stderr
|
||||
from .vendor.click.exceptions import (
|
||||
Abort,
|
||||
BadOptionUsage,
|
||||
BadParameter,
|
||||
ClickException,
|
||||
Exit,
|
||||
FileError,
|
||||
MissingParameter,
|
||||
UsageError,
|
||||
Abort, BadOptionUsage, BadParameter, ClickException, Exit, FileError,
|
||||
MissingParameter, UsageError
|
||||
)
|
||||
from .vendor.click.types import Path
|
||||
from .vendor.click.utils import echo as click_echo
|
||||
|
||||
|
||||
def handle_exception(exc_type, exception, traceback, hook=sys.excepthook):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import json
|
||||
import sys
|
||||
|
||||
|
||||
def format_full_version(info):
|
||||
|
||||
@@ -12,9 +12,12 @@ from __future__ import absolute_import
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
import crayons
|
||||
|
||||
from .environments import PIPENV_COLORBLIND, PIPENV_HIDE_EMOJIS
|
||||
|
||||
|
||||
STREAM = sys.stderr
|
||||
MILL_TEMPLATE = "%s %s %i/%i\r"
|
||||
DOTS_CHAR = "."
|
||||
|
||||
+24
-37
@@ -1,54 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import base64
|
||||
import fnmatch
|
||||
import glob
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import operator
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import glob
|
||||
import base64
|
||||
import fnmatch
|
||||
import hashlib
|
||||
from first import first
|
||||
from cached_property import cached_property
|
||||
import operator
|
||||
import pipfile
|
||||
import pipfile.api
|
||||
|
||||
import six
|
||||
import vistir
|
||||
import toml
|
||||
import tomlkit
|
||||
import vistir
|
||||
|
||||
from first import first
|
||||
|
||||
import pipfile
|
||||
import pipfile.api
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
from .environment import Environment
|
||||
from .cmdparse import Script
|
||||
from .utils import (
|
||||
pep423_name,
|
||||
proper_case,
|
||||
find_requirements,
|
||||
is_editable,
|
||||
cleanup_toml,
|
||||
convert_toml_outline_tables,
|
||||
is_installable_file,
|
||||
is_valid_url,
|
||||
get_url_name,
|
||||
normalize_drive,
|
||||
python_version,
|
||||
safe_expandvars,
|
||||
is_star,
|
||||
get_workon_home,
|
||||
is_virtual_environment,
|
||||
looks_like_dir,
|
||||
get_canonical_names
|
||||
)
|
||||
from .environment import Environment
|
||||
from .environments import (
|
||||
PIPENV_MAX_DEPTH,
|
||||
PIPENV_PIPFILE,
|
||||
PIPENV_VENV_IN_PROJECT,
|
||||
PIPENV_TEST_INDEX,
|
||||
PIPENV_PYTHON,
|
||||
PIPENV_DEFAULT_PYTHON_VERSION,
|
||||
PIPENV_IGNORE_VIRTUALENVS,
|
||||
PIPENV_DEFAULT_PYTHON_VERSION, PIPENV_IGNORE_VIRTUALENVS, PIPENV_MAX_DEPTH,
|
||||
PIPENV_PIPFILE, PIPENV_PYTHON, PIPENV_TEST_INDEX, PIPENV_VENV_IN_PROJECT,
|
||||
is_in_virtualenv
|
||||
)
|
||||
from .utils import (
|
||||
cleanup_toml, convert_toml_outline_tables, find_requirements,
|
||||
get_canonical_names, get_url_name, get_workon_home, is_editable,
|
||||
is_installable_file, is_star, is_valid_url, is_virtual_environment,
|
||||
looks_like_dir, normalize_drive, pep423_name, proper_case, python_version,
|
||||
safe_expandvars
|
||||
)
|
||||
|
||||
|
||||
def _normalized(p):
|
||||
|
||||
+1
-2
@@ -1,9 +1,8 @@
|
||||
import operator
|
||||
import re
|
||||
|
||||
from .vendor import attr, delegator
|
||||
|
||||
from .environments import PIPENV_INSTALL_TIMEOUT
|
||||
from .vendor import attr, delegator
|
||||
|
||||
|
||||
@attr.s
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
os.environ["PIP_PYTHON_PATH"] = str(sys.executable)
|
||||
|
||||
|
||||
+3
-3
@@ -5,10 +5,10 @@ import signal
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from .environments import PIPENV_SHELL_EXPLICIT, PIPENV_SHELL, PIPENV_EMULATOR
|
||||
from .vendor.vistir.compat import get_terminal_size, Path
|
||||
from .vendor.vistir.contextmanagers import temp_environ
|
||||
from .environments import PIPENV_EMULATOR, PIPENV_SHELL, PIPENV_SHELL_EXPLICIT
|
||||
from .vendor import shellingham
|
||||
from .vendor.vistir.compat import Path, get_terminal_size
|
||||
from .vendor.vistir.contextmanagers import temp_environ
|
||||
|
||||
|
||||
ShellDetectionFailure = shellingham.ShellDetectionFailure
|
||||
|
||||
+16
-12
@@ -7,35 +7,39 @@ import re
|
||||
import shutil
|
||||
import stat
|
||||
import sys
|
||||
import toml
|
||||
import tomlkit
|
||||
import warnings
|
||||
|
||||
import crayons
|
||||
import parse
|
||||
from contextlib import contextmanager
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
import six
|
||||
import toml
|
||||
import tomlkit
|
||||
|
||||
from click import echo as click_echo
|
||||
from first import first
|
||||
from six.moves import Mapping, Sequence, Set
|
||||
from six.moves.urllib.parse import urlparse
|
||||
from urllib3 import util as urllib3_util
|
||||
from vistir.compat import ResourceWarning
|
||||
from vistir.misc import fs_str
|
||||
|
||||
import crayons
|
||||
import parse
|
||||
|
||||
from . import environments
|
||||
from .pep508checker import lookup
|
||||
|
||||
|
||||
six.add_move(six.MovedAttribute("Mapping", "collections", "collections.abc")) # noqa
|
||||
six.add_move(six.MovedAttribute("Sequence", "collections", "collections.abc")) # noqa
|
||||
six.add_move(six.MovedAttribute("Set", "collections", "collections.abc")) # noqa
|
||||
from six.moves import Mapping, Sequence, Set
|
||||
|
||||
from vistir.compat import ResourceWarning
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.ERROR)
|
||||
|
||||
from distutils.spawn import find_executable
|
||||
from contextlib import contextmanager
|
||||
from . import environments
|
||||
from .pep508checker import lookup
|
||||
|
||||
from six.moves.urllib.parse import urlparse
|
||||
from urllib3 import util as urllib3_util
|
||||
|
||||
|
||||
specifiers = [k for k in lookup.keys()]
|
||||
|
||||
Reference in New Issue
Block a user