The following issues were found

pipenv/patched/notpip/_vendor/cachecontrol/serialize.py
22 issues
Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              from pipenv.patched.notpip._vendor import msgpack
from pipenv.patched.notpip._vendor.requests.structures import CaseInsensitiveDict

from .compat import HTTPResponse, pickle, text_type


def _b64_decode_bytes(b):
    return base64.b64decode(b.encode("ascii"))


            

Reported by Pylint.

Access to a protected member _fp of a client class
Error

Line: 38 Column: 13

                          #       result being a `body` argument is *always* passed
            #       into cache_response, and in turn,
            #       `Serializer.dump`.
            response._fp = io.BytesIO(body)

        # NOTE: This is all a bit weird, but it's really important that on
        #       Python 2.x these objects are unicode and not str, even when
        #       they contain only ascii. The problem here is that msgpack
        #       understands the difference between unicode and bytes and we

            

Reported by Pylint.

Unused argument 'data'
Error

Line: 142 Column: 34

              
        return HTTPResponse(body=body, preload_content=False, **cached["response"])

    def _loads_v0(self, request, data):
        # The original legacy cache data. This doesn't contain enough
        # information to construct everything we need, so we'll treat this as
        # a miss.
        return


            

Reported by Pylint.

Unused argument 'request'
Error

Line: 142 Column: 25

              
        return HTTPResponse(body=body, preload_content=False, **cached["response"])

    def _loads_v0(self, request, data):
        # The original legacy cache data. This doesn't contain enough
        # information to construct everything we need, so we'll treat this as
        # a miss.
        return


            

Reported by Pylint.

Unused argument 'request'
Error

Line: 176 Column: 25

              
        return self.prepare_response(request, cached)

    def _loads_v3(self, request, data):
        # Due to Python 2 encoding issues, it's impossible to know for sure
        # exactly how to load v3 entries, thus we'll treat these as a miss so
        # that they get rewritten out as v4 entries.
        return


            

Reported by Pylint.

Unused argument 'data'
Error

Line: 176 Column: 34

              
        return self.prepare_response(request, cached)

    def _loads_v3(self, request, data):
        # Due to Python 2 encoding issues, it's impossible to know for sure
        # exactly how to load v3 entries, thus we'll treat these as a miss so
        # that they get rewritten out as v4 entries.
        return


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import base64
import io
import json
import zlib

from pipenv.patched.notpip._vendor import msgpack
from pipenv.patched.notpip._vendor.requests.structures import CaseInsensitiveDict

from .compat import HTTPResponse, pickle, text_type

            

Reported by Pylint.

Argument name "b" doesn't conform to snake_case naming style
Error

Line: 12 Column: 1

              from .compat import HTTPResponse, pickle, text_type


def _b64_decode_bytes(b):
    return base64.b64decode(b.encode("ascii"))


def _b64_decode_str(s):
    return _b64_decode_bytes(s).decode("utf8")

            

Reported by Pylint.

Argument name "s" doesn't conform to snake_case naming style
Error

Line: 16 Column: 1

                  return base64.b64decode(b.encode("ascii"))


def _b64_decode_str(s):
    return _b64_decode_bytes(s).decode("utf8")


class Serializer(object):


            

Reported by Pylint.

Missing class docstring
Error

Line: 20 Column: 1

                  return _b64_decode_bytes(s).decode("utf8")


class Serializer(object):

    def dumps(self, request, response, body=None):
        response_headers = CaseInsensitiveDict(response.headers)

        if body is None:

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/packaging/specifiers.py
22 issues
Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              import itertools
import re

from ._compat import string_types, with_metaclass
from ._typing import MYPY_CHECK_RUNNING
from .version import Version, LegacyVersion, parse

if MYPY_CHECK_RUNNING:  # pragma: no cover
    from typing import (

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              import re

from ._compat import string_types, with_metaclass
from ._typing import MYPY_CHECK_RUNNING
from .version import Version, LegacyVersion, parse

if MYPY_CHECK_RUNNING:  # pragma: no cover
    from typing import (
        List,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              
from ._compat import string_types, with_metaclass
from ._typing import MYPY_CHECK_RUNNING
from .version import Version, LegacyVersion, parse

if MYPY_CHECK_RUNNING:  # pragma: no cover
    from typing import (
        List,
        Dict,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import abc
import functools
import itertools
import re

            

Reported by Pylint.

Missing class docstring
Error

Line: 39 Column: 1

                  """


class BaseSpecifier(with_metaclass(abc.ABCMeta, object)):  # type: ignore
    @abc.abstractmethod
    def __str__(self):
        # type: () -> str
        """
        Returns the str representation of this Specifier like object. This

            

Reported by Pylint.

Argument name "op" doesn't conform to snake_case naming style
Error

Line: 163 Column: 5

              
        return self._spec != other._spec

    def _get_operator(self, op):
        # type: (str) -> CallableOperator
        operator_callable = getattr(
            self, "_compare_{0}".format(self._operators[op])
        )  # type: CallableOperator
        return operator_callable

            

Reported by Pylint.

Method could be a function
Error

Line: 170 Column: 5

                      )  # type: CallableOperator
        return operator_callable

    def _coerce_version(self, version):
        # type: (UnparsedVersion) -> ParsedVersion
        if not isinstance(version, (LegacyVersion, Version)):
            version = parse(version)
        return version


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 177 Column: 5

                      return version

    @property
    def operator(self):
        # type: () -> str
        return self._spec[0]

    @property
    def version(self):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 182 Column: 5

                      return self._spec[0]

    @property
    def version(self):
        # type: () -> str
        return self._spec[1]

    @property
    def prereleases(self):

            

Reported by Pylint.

Variable name "kw" doesn't conform to snake_case naming style
Error

Line: 228 Column: 9

                      yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = self._coerce_version(version)

            

Reported by Pylint.

pipenv/vendor/urllib3/poolmanager.py
21 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import functools
import logging

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
    LocationValueError,
    MaxRetryError,
    ProxySchemeUnknown,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              import logging

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
    LocationValueError,
    MaxRetryError,
    ProxySchemeUnknown,
    ProxySchemeUnsupported,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (
    LocationValueError,
    MaxRetryError,
    ProxySchemeUnknown,
    ProxySchemeUnsupported,
    URLSchemeUnknown,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

                  ProxySchemeUnsupported,
    URLSchemeUnknown,
)
from .packages import six
from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

                  URLSchemeUnknown,
)
from .packages import six
from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              )
from .packages import six
from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              from .packages import six
from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from .packages.six.moves.urllib.parse import urljoin
from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              from .request import RequestMethods
from .util.proxy import connection_requires_http_tunnel
from .util.retry import Retry
from .util.url import parse_url

__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]


log = logging.getLogger(__name__)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import

import collections
import functools
import logging

from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
from .exceptions import (

            

Reported by Pylint.

pipenv/vendor/requirementslib/models/vcs.py
21 issues
Unable to import 'pip_shims'
Error

Line: 9 Column: 1

              import sys

import attr
import pip_shims
import six

from ..environment import MYPY_RUNNING
from .url import URI


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              import pip_shims
import six

from ..environment import MYPY_RUNNING
from .url import URI

if MYPY_RUNNING:
    from typing import Any, Optional, Tuple


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              import six

from ..environment import MYPY_RUNNING
from .url import URI

if MYPY_RUNNING:
    from typing import Any, Optional, Tuple



            

Reported by Pylint.

Unable to import 'pip_shims.shims'
Error

Line: 45 Column: 9

                          default_run_args = self.monkeypatch_pip()
        else:
            default_run_args = self.DEFAULT_RUN_ARGS
        from pip_shims.shims import VcsSupport

        VCS_SUPPORT = VcsSupport()
        backend = VCS_SUPPORT.get_backend(self.vcs_type)
        # repo = backend(url=self.url)
        if backend.run_command.__func__.__defaults__ != default_run_args:

            

Reported by Pylint.

Unable to import 'pip_shims.compat'
Error

Line: 115 Column: 9

                  @classmethod
    def monkeypatch_pip(cls):
        # type: () -> Tuple[Any, ...]
        from pip_shims.compat import get_allowed_args

        target_module = pip_shims.shims.VcsSupport.__module__
        pip_vcs = importlib.import_module(target_module)
        args, kwargs = get_allowed_args(pip_vcs.VersionControl.run_command)
        run_command_defaults = pip_vcs.VersionControl.run_command.__defaults__

            

Reported by Pylint.

Unused argument 'ref'
Error

Line: 107 Column: 31

                          self.repo_backend.update(self.checkout_directory, target_ref)
        self.commit_sha = self.get_commit_hash()

    def get_commit_hash(self, ref=None):
        # type: (Optional[str]) -> str
        with pip_shims.shims.global_tempdir_manager():
            return self.repo_backend.get_revision(self.checkout_directory)

    @classmethod

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function

import importlib
import os
import sys

import attr
import pip_shims

            

Reported by Pylint.

Class 'VCSRepository' inherits from object, can be safely removed from bases in python3
Error

Line: 20 Column: 1

              

@attr.s(hash=True)
class VCSRepository(object):
    DEFAULT_RUN_ARGS = None

    url = attr.ib()  # type: str
    name = attr.ib()  # type: str
    checkout_directory = attr.ib()  # type: str

            

Reported by Pylint.

Too many instance attributes (10/7)
Error

Line: 20 Column: 1

              

@attr.s(hash=True)
class VCSRepository(object):
    DEFAULT_RUN_ARGS = None

    url = attr.ib()  # type: str
    name = attr.ib()  # type: str
    checkout_directory = attr.ib()  # type: str

            

Reported by Pylint.

Missing class docstring
Error

Line: 20 Column: 1

              

@attr.s(hash=True)
class VCSRepository(object):
    DEFAULT_RUN_ARGS = None

    url = attr.ib()  # type: str
    name = attr.ib()  # type: str
    checkout_directory = attr.ib()  # type: str

            

Reported by Pylint.

pipenv/patched/notpip/_internal/utils/unpacking.py
21 issues
Unused import bz2
Error

Line: 37 Column: 5

              SUPPORTED_EXTENSIONS = ZIP_EXTENSIONS + TAR_EXTENSIONS

try:
    import bz2  # noqa
    SUPPORTED_EXTENSIONS += BZ2_EXTENSIONS
except ImportError:
    logger.debug('bz2 module is not available')

try:

            

Reported by Pylint.

Unused import lzma
Error

Line: 44 Column: 5

              
try:
    # Only for Python 3.3+
    import lzma  # noqa
    SUPPORTED_EXTENSIONS += XZ_EXTENSIONS
except ImportError:
    logger.debug('lzma module is not available')



            

Reported by Pylint.

Unused variable 'rest'
Error

Line: 79 Column: 17

                  (i.e., everything is in one subdirectory in an archive)"""
    common_prefix = None
    for path in paths:
        prefix, rest = split_leading_dir(path)
        if not prefix:
            return False
        elif common_prefix is None:
            common_prefix = prefix
        elif prefix != common_prefix:

            

Reported by Pylint.

Redefining built-in 'zip'
Error

Line: 114 Column: 9

                  ensure_dir(location)
    zipfp = open(filename, 'rb')
    try:
        zip = zipfile.ZipFile(zipfp, allowZip64=True)
        leading = has_leading_dir(zip.namelist()) and flatten
        for info in zip.infolist():
            name = info.filename
            fn = name
            if leading:

            

Reported by Pylint.

Redefining built-in 'dir'
Error

Line: 122 Column: 13

                          if leading:
                fn = split_leading_dir(name)[1]
            fn = os.path.join(location, fn)
            dir = os.path.dirname(fn)
            if not is_within_directory(location, fn):
                message = (
                    'The zip file ({}) has a file ({}) trying to install '
                    'outside target directory ({})'
                )

            

Reported by Pylint.

Access to a protected member _extract_member of a client class
Error

Line: 201 Column: 21

                          elif member.issym():
                try:
                    # https://github.com/python/typeshed/issues/2673
                    tar._extract_member(member, path)  # type: ignore
                except Exception as exc:
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warning(
                        'In the tar file %s the member %s is invalid: %s',

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 202 Column: 24

                              try:
                    # https://github.com/python/typeshed/issues/2673
                    tar._extract_member(member, path)  # type: ignore
                except Exception as exc:
                    # Some corrupt tar files seem to produce this
                    # (specifically bad symlinks)
                    logger.warning(
                        'In the tar file %s the member %s is invalid: %s',
                        filename, member.name, exc,

            

Reported by Pylint.

FIXME: handle?
Error

Line: 263 Column: 3

                  ):
        untar_file(filename, location)
    else:
        # FIXME: handle?
        # FIXME: magic signatures?
        logger.critical(
            'Cannot unpack file %s (downloaded from %s, content-type: %s); '
            'cannot detect archive format',
            filename, location, content_type,

            

Reported by Pylint.

FIXME: magic signatures?
Error

Line: 264 Column: 3

                      untar_file(filename, location)
    else:
        # FIXME: handle?
        # FIXME: magic signatures?
        logger.critical(
            'Cannot unpack file %s (downloaded from %s, content-type: %s); '
            'cannot detect archive format',
            filename, location, content_type,
        )

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 57 Column: 1

                  return mask


def split_leading_dir(path):
    # type: (Union[str, Text]) -> List[Union[str, Text]]
    path = path.lstrip('/').lstrip('\\')
    if (
        '/' in path and (
            ('\\' in path and path.find('/') < path.find('\\')) or

            

Reported by Pylint.

pipenv/patched/notpip/_internal/utils/temp_dir.py
21 issues
Redefining built-in 'ResourceWarning'
Error

Line: 15 Column: 1

              
from pipenv.patched.notpip._internal.utils.misc import rmtree
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING
from pipenv.vendor.vistir.compat import finalize, ResourceWarning

if MYPY_CHECK_RUNNING:
    from typing import Any, Dict, Iterator, Optional, TypeVar

    _T = TypeVar('_T', bound='TempDirectory')

            

Reported by Pylint.

Using the global statement
Error

Line: 32 Column: 5

              @contextmanager
def global_tempdir_manager():
    # type: () -> Iterator[None]
    global _tempdir_manager
    with ExitStack() as stack:
        old_tempdir_manager, _tempdir_manager = _tempdir_manager, stack
        try:
            yield
        finally:

            

Reported by Pylint.

Using the global statement
Error

Line: 73 Column: 5

                  """Provides a scoped global tempdir registry that can be used to dictate
    whether directories should be deleted.
    """
    global _tempdir_registry
    old_tempdir_registry = _tempdir_registry
    _tempdir_registry = TempDirectoryTypeRegistry()
    try:
        yield _tempdir_registry
    finally:

            

Reported by Pylint.

Use lazy % formatting in logging functions
Error

Line: 182 Column: 22

                      path = os.path.realpath(
            tempfile.mkdtemp(prefix="pip-{}-".format(kind))
        )
        logger.debug("Created temporary directory: {}".format(path))
        return path

    @classmethod
    def _cleanup(cls, name, warn_message=None):
        if not os.path.exists(name):

            

Reported by Pylint.

Use lazy % formatting in logging functions
Error

Line: 281 Column: 22

                              tempfile.mkdtemp(prefix="pip-{}-".format(kind))
            )

        logger.debug("Created temporary directory: {}".format(path))
        return path

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import

import errno
import itertools
import logging
import os.path
import tempfile
from contextlib import contextmanager


            

Reported by Pylint.

standard import "import warnings" should be placed before "from pipenv.patched.notpip._vendor.contextlib2 import ExitStack"
Error

Line: 11 Column: 1

              from contextlib import contextmanager

from pipenv.patched.notpip._vendor.contextlib2 import ExitStack
import warnings

from pipenv.patched.notpip._internal.utils.misc import rmtree
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING
from pipenv.vendor.vistir.compat import finalize, ResourceWarning


            

Reported by Pylint.

Constant name "_tempdir_manager" doesn't conform to UPPER_CASE naming style
Error

Line: 26 Column: 1

              logger = logging.getLogger(__name__)


_tempdir_manager = None  # type: Optional[ExitStack]


@contextmanager
def global_tempdir_manager():
    # type: () -> Iterator[None]

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 30 Column: 1

              

@contextmanager
def global_tempdir_manager():
    # type: () -> Iterator[None]
    global _tempdir_manager
    with ExitStack() as stack:
        old_tempdir_manager, _tempdir_manager = _tempdir_manager, stack
        try:

            

Reported by Pylint.

Constant name "_tempdir_manager" doesn't conform to UPPER_CASE naming style
Error

Line: 32 Column: 5

              @contextmanager
def global_tempdir_manager():
    # type: () -> Iterator[None]
    global _tempdir_manager
    with ExitStack() as stack:
        old_tempdir_manager, _tempdir_manager = _tempdir_manager, stack
        try:
            yield
        finally:

            

Reported by Pylint.

pipenv/patched/piptools/writer.py
21 issues
Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
import six

from .click import unstyle
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    comment,
    dedup,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              import six

from .click import unstyle
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    comment,
    dedup,
    format_requirement,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              
from .click import unstyle
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    comment,
    dedup,
    format_requirement,
    get_compile_command,

            

Reported by Pylint.

Access to a protected member _source_ireqs of a client class
Error

Line: 227 Column: 33

                      if hasattr(ireq, "_source_ireqs"):
            required_by |= {
                _comes_from_as_string(src_ireq)
                for src_ireq in ireq._source_ireqs
                if src_ireq.comes_from
            }
        elif ireq.comes_from:
            required_by.add(_comes_from_as_string(ireq))
        if required_by:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import unicode_literals

import os
import re
from itertools import chain

import six

from .click import unstyle

            

Reported by Pylint.

Too many instance attributes (16/7)
Error

Line: 51 Column: 1

                  return key_from_ireq(ireq.comes_from)


class OutputWriter(object):
    def __init__(
        self,
        src_files,
        dst_file,
        click_ctx,

            

Reported by Pylint.

Missing class docstring
Error

Line: 51 Column: 1

                  return key_from_ireq(ireq.comes_from)


class OutputWriter(object):
    def __init__(
        self,
        src_files,
        dst_file,
        click_ctx,

            

Reported by Pylint.

Class 'OutputWriter' inherits from object, can be safely removed from bases in python3
Error

Line: 51 Column: 1

                  return key_from_ireq(ireq.comes_from)


class OutputWriter(object):
    def __init__(
        self,
        src_files,
        dst_file,
        click_ctx,

            

Reported by Pylint.

Too many local variables (17/15)
Error

Line: 52 Column: 5

              

class OutputWriter(object):
    def __init__(
        self,
        src_files,
        dst_file,
        click_ctx,
        dry_run,

            

Reported by Pylint.

Too many arguments (17/5)
Error

Line: 52 Column: 5

              

class OutputWriter(object):
    def __init__(
        self,
        src_files,
        dst_file,
        click_ctx,
        dry_run,

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/colorama/initialise.py
21 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              import contextlib
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = None
orig_stderr = None


            

Reported by Pylint.

Using the global statement
Error

Line: 28 Column: 5

                  if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr


            

Reported by Pylint.

Using the global statement
Error

Line: 29 Column: 5

                      raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr

    if sys.stdout is None:

            

Reported by Pylint.

Using the global statement
Error

Line: 45 Column: 5

                      sys.stderr = wrapped_stderr = \
            wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True



            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import contextlib
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = None

            

Reported by Pylint.

Constant name "orig_stdout" doesn't conform to UPPER_CASE naming style
Error

Line: 9 Column: 1

              from .ansitowin32 import AnsiToWin32


orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None


            

Reported by Pylint.

Constant name "orig_stderr" doesn't conform to UPPER_CASE naming style
Error

Line: 10 Column: 1

              

orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False

            

Reported by Pylint.

Constant name "wrapped_stdout" doesn't conform to UPPER_CASE naming style
Error

Line: 12 Column: 1

              orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False



            

Reported by Pylint.

Constant name "wrapped_stderr" doesn't conform to UPPER_CASE naming style
Error

Line: 13 Column: 1

              orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False


def reset_all():

            

Reported by Pylint.

Constant name "atexit_done" doesn't conform to UPPER_CASE naming style
Error

Line: 15 Column: 1

              wrapped_stdout = None
wrapped_stderr = None

atexit_done = False


def reset_all():
    if AnsiToWin32 is not None:    # Issue #74: objects might become None at exit
        AnsiToWin32(orig_stdout).reset_all()

            

Reported by Pylint.

pipenv/vendor/colorama/initialise.py
21 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              import contextlib
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = None
orig_stderr = None


            

Reported by Pylint.

Using the global statement
Error

Line: 28 Column: 5

                  if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr


            

Reported by Pylint.

Using the global statement
Error

Line: 29 Column: 5

                      raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr

    if sys.stdout is None:

            

Reported by Pylint.

Using the global statement
Error

Line: 45 Column: 5

                      sys.stderr = wrapped_stderr = \
            wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True



            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import contextlib
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = None

            

Reported by Pylint.

Constant name "orig_stdout" doesn't conform to UPPER_CASE naming style
Error

Line: 9 Column: 1

              from .ansitowin32 import AnsiToWin32


orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None


            

Reported by Pylint.

Constant name "orig_stderr" doesn't conform to UPPER_CASE naming style
Error

Line: 10 Column: 1

              

orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False

            

Reported by Pylint.

Constant name "wrapped_stdout" doesn't conform to UPPER_CASE naming style
Error

Line: 12 Column: 1

              orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False



            

Reported by Pylint.

Constant name "wrapped_stderr" doesn't conform to UPPER_CASE naming style
Error

Line: 13 Column: 1

              orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False


def reset_all():

            

Reported by Pylint.

Constant name "atexit_done" doesn't conform to UPPER_CASE naming style
Error

Line: 15 Column: 1

              wrapped_stdout = None
wrapped_stderr = None

atexit_done = False


def reset_all():
    if AnsiToWin32 is not None:    # Issue #74: objects might become None at exit
        AnsiToWin32(orig_stdout).reset_all()

            

Reported by Pylint.

pipenv/vendor/plette/pipfiles.py
21 issues
Unable to import 'tomlkit'
Error

Line: 7 Column: 1

              import json

import six
import tomlkit

from .models import (
    DataView, Hash, Requires,
    PackageCollection, ScriptCollection, SourceCollection,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              import six
import tomlkit

from .models import (
    DataView, Hash, Requires,
    PackageCollection, ScriptCollection, SourceCollection,
)



            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 102 Column: 13

                      try:
            return self["source"]
        except KeyError:
            raise AttributeError("sources")

    @sources.setter
    def sources(self, value):
        self["source"] = value


            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 113 Column: 13

                      try:
            return self["source"]
        except KeyError:
            raise AttributeError("source")

    @source.setter
    def source(self, value):
        self["source"] = value


            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 124 Column: 13

                      try:
            return self["packages"]
        except KeyError:
            raise AttributeError("packages")

    @packages.setter
    def packages(self, value):
        self["packages"] = value


            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 135 Column: 13

                      try:
            return self["dev-packages"]
        except KeyError:
            raise AttributeError("dev-packages")

    @dev_packages.setter
    def dev_packages(self, value):
        self["dev-packages"] = value


            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 146 Column: 13

                      try:
            return self["requires"]
        except KeyError:
            raise AttributeError("requires")

    @requires.setter
    def requires(self, value):
        self["requires"] = value


            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 157 Column: 13

                      try:
            return self["scripts"]
        except KeyError:
            raise AttributeError("scripts")

    @scripts.setter
    def scripts(self, value):
        self["scripts"] = value

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import unicode_literals

import hashlib
import json

import six
import tomlkit

from .models import (

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 37 Column: 5

                  __SCHEMA__ = {}

    @classmethod
    def validate(cls, data):
        # HACK: DO NOT CALL `super().validate()` here!!
        # Cerberus seems to break TOML Kit's inline table preservation if it
        # is not at the top-level. Fortunately the spec doesn't have nested
        # non-inlined tables, so we're OK as long as validation is only
        # performed at section-level. validation is performed.

            

Reported by Pylint.