The following issues were found

pipenv/vendor/requirementslib/models/project.py
37 issues
Unable to import 'packaging.markers'
Error

Line: 10 Column: 1

              import os

import attr
import packaging.markers
import packaging.utils
import plette
import plette.models
import six
import tomlkit

            

Reported by Pylint.

Unable to import 'packaging.utils'
Error

Line: 11 Column: 1

              
import attr
import packaging.markers
import packaging.utils
import plette
import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError

            

Reported by Pylint.

Unable to import 'plette'
Error

Line: 12 Column: 1

              import attr
import packaging.markers
import packaging.utils
import plette
import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError


            

Reported by Pylint.

Unable to import 'plette.models'
Error

Line: 13 Column: 1

              import packaging.markers
import packaging.utils
import plette
import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError

SectionDifference = collections.namedtuple("SectionDifference", ["inthis", "inthat"])

            

Reported by Pylint.

Unable to import 'tomlkit'
Error

Line: 15 Column: 1

              import plette
import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError

SectionDifference = collections.namedtuple("SectionDifference", ["inthis", "inthat"])
FileDifference = collections.namedtuple("FileDifference", ["default", "develop"])


            

Reported by Pylint.

Unable to import 'vistir.compat'
Error

Line: 16 Column: 1

              import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError

SectionDifference = collections.namedtuple("SectionDifference", ["inthis", "inthat"])
FileDifference = collections.namedtuple("FileDifference", ["default", "develop"])



            

Reported by Pylint.

Unable to import 'requirementslib'
Error

Line: 144 Column: 9

                      )

    def add_line_to_pipfile(self, line, develop):
        from requirementslib import Requirement

        requirement = Requirement.from_line(line)
        section = self._get_pipfile_section(develop=develop)
        key = requirement.normalized_name
        entry = next(iter(requirement.as_pipfile().values()))

            

Reported by Pylint.

Redefining built-in 'FileNotFoundError'
Error

Line: 16 Column: 1

              import plette.models
import six
import tomlkit
from vistir.compat import FileNotFoundError

SectionDifference = collections.namedtuple("SectionDifference", ["inthis", "inthat"])
FileDifference = collections.namedtuple("FileDifference", ["default", "develop"])



            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 64 Column: 16

                          with io.open(location, encoding="utf-8") as f:
                model = model_cls.load(f)
                line_ending = preferred_newlines(f)
        except Exception:
            if not invalid_ok:
                raise
            model = None
            line_ending = DEFAULT_NEWLINES
        return cls(location=location, line_ending=line_ending, model=model)

            

Reported by Pylint.

Access to a protected member _data of a client class
Error

Line: 173 Column: 21

                              if packaging.utils.canonicalize_name(name) in keys:
                    removals.add(name)
            for key in removals:
                del section._data[key]

    def remove_keys_from_lockfile(self, keys):
        keys = {packaging.utils.canonicalize_name(key) for key in keys}
        removed = False
        for section_name in ("default", "develop"):

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/urllib3/contrib/appengine.py
37 issues
Attempted relative import beyond top-level package
Error

Line: 45 Column: 1

              import io
import logging
import warnings
from ..packages.six.moves.urllib.parse import urljoin

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 47 Column: 1

              import warnings
from ..packages.six.moves.urllib.parse import urljoin

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,
    ProtocolError,
    TimeoutError,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 56 Column: 1

                  SSLError,
)

from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.timeout import Timeout
from ..util.retry import Retry
from . import _appengine_environ


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 57 Column: 1

              )

from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.timeout import Timeout
from ..util.retry import Retry
from . import _appengine_environ

try:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 58 Column: 1

              
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.timeout import Timeout
from ..util.retry import Retry
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 59 Column: 1

              from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.timeout import Timeout
from ..util.retry import Retry
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch
except ImportError:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 60 Column: 1

              from ..response import HTTPResponse
from ..util.timeout import Timeout
from ..util.retry import Retry
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch
except ImportError:
    urlfetch = None

            

Reported by Pylint.

Redefining built-in 'TimeoutError'
Error

Line: 47 Column: 1

              import warnings
from ..packages.six.moves.urllib.parse import urljoin

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,
    ProtocolError,
    TimeoutError,

            

Reported by Pylint.

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

Line: 158 Column: 13

                              validate_certificate=self.validate_certificate,
            )
        except urlfetch.DeadlineExceededError as e:
            raise TimeoutError(self, e)

        except urlfetch.InvalidURLError as e:
            if "too large" in str(e):
                raise AppEnginePlatformError(
                    "URLFetch request too large, URLFetch only "

            

Reported by Pylint.

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

Line: 162 Column: 17

              
        except urlfetch.InvalidURLError as e:
            if "too large" in str(e):
                raise AppEnginePlatformError(
                    "URLFetch request too large, URLFetch only "
                    "supports requests up to 10mb in size.",
                    e,
                )
            raise ProtocolError(e)

            

Reported by Pylint.

get-pipenv.py
37 issues
Unable to import 'pip.commands.install'
Error

Line: 89 Column: 5

              def bootstrap(tmpdir=None):
    # Import pip so we can use it to install pip and maybe setuptools too
    import pip
    from pip.commands.install import InstallCommand
    from pip.req import InstallRequirement


    # Wrapper to provide default certificate with the lowest priority
    class CertInstallCommand(InstallCommand):

            

Reported by Pylint.

No name 'commands' in module 'pip'
Error

Line: 89 Column: 5

              def bootstrap(tmpdir=None):
    # Import pip so we can use it to install pip and maybe setuptools too
    import pip
    from pip.commands.install import InstallCommand
    from pip.req import InstallRequirement


    # Wrapper to provide default certificate with the lowest priority
    class CertInstallCommand(InstallCommand):

            

Reported by Pylint.

No name 'req' in module 'pip'
Error

Line: 90 Column: 5

                  # Import pip so we can use it to install pip and maybe setuptools too
    import pip
    from pip.commands.install import InstallCommand
    from pip.req import InstallRequirement


    # Wrapper to provide default certificate with the lowest priority
    class CertInstallCommand(InstallCommand):


            

Reported by Pylint.

Unable to import 'pip.req'
Error

Line: 90 Column: 5

                  # Import pip so we can use it to install pip and maybe setuptools too
    import pip
    from pip.commands.install import InstallCommand
    from pip.req import InstallRequirement


    # Wrapper to provide default certificate with the lowest priority
    class CertInstallCommand(InstallCommand):


            

Reported by Pylint.

Module 'pip' has no 'commands_dict' member
Error

Line: 105 Column: 5

                              self.parser.defaults["cert"] = cert_path  # calculated below
            return super(CertInstallCommand, self).parse_args(args)

    pip.commands_dict["install"] = CertInstallCommand
    implicit_pip = True
    implicit_setuptools = True
    implicit_wheel = True
    # Check if the user has requested us not to install setuptools
    if "--no-setuptools" in sys.argv or os.environ.get("PIP_NO_SETUPTOOLS"):

            

Reported by Pylint.

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

Line: 67 Column: 25

                          except TypeError:
                for j, c in enumerate(iterbytes(chunk)):
                    if _b85dec[c] is None:
                        raise ValueError(
                            'bad base85 character at position %d' % (i + j)
                        )

                raise


            

Reported by Pylint.

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

Line: 76 Column: 17

                          try:
                out.append(packI(acc))
            except struct.error:
                raise ValueError(
                    'base85 overflow in hunk starting at byte %d' % i
                )

        result = b''.join(out)
        if padding:

            

Reported by Pylint.

Unused import setuptools
Error

Line: 123 Column: 13

                  # already exist on the target platform.
    if implicit_setuptools:
        try:
            import setuptools  # noqa

            implicit_setuptools = False
        except ImportError:
            pass
    if implicit_wheel:

            

Reported by Pylint.

Unused import wheel
Error

Line: 130 Column: 13

                          pass
    if implicit_wheel:
        try:
            import wheel  # noqa

            implicit_wheel = False
        except ImportError:
            pass
    # We want to support people passing things like 'pip<8' to get-pip.py which

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 143 Column: 9

                  for arg in args:
        try:
            req = InstallRequirement.from_line(arg)
        except:
            continue

        if implicit_pip and req.name == "pip":
            implicit_pip = False
        elif implicit_setuptools and req.name == "setuptools":

            

Reported by Pylint.

pipenv/vendor/urllib3/contrib/appengine.py
36 issues
Attempted relative import beyond top-level package
Error

Line: 47 Column: 1

              import logging
import warnings

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,
    ProtocolError,
    SSLError,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 55 Column: 1

                  SSLError,
    TimeoutError,
)
from ..packages.six.moves.urllib.parse import urljoin
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 56 Column: 1

                  TimeoutError,
)
from ..packages.six.moves.urllib.parse import urljoin
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 57 Column: 1

              )
from ..packages.six.moves.urllib.parse import urljoin
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

try:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 58 Column: 1

              from ..packages.six.moves.urllib.parse import urljoin
from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 59 Column: 1

              from ..request import RequestMethods
from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch
except ImportError:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 60 Column: 1

              from ..response import HTTPResponse
from ..util.retry import Retry
from ..util.timeout import Timeout
from . import _appengine_environ

try:
    from google.appengine.api import urlfetch
except ImportError:
    urlfetch = None

            

Reported by Pylint.

Redefining built-in 'TimeoutError'
Error

Line: 47 Column: 1

              import logging
import warnings

from ..exceptions import (
    HTTPError,
    HTTPWarning,
    MaxRetryError,
    ProtocolError,
    SSLError,

            

Reported by Pylint.

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

Line: 158 Column: 13

                              validate_certificate=self.validate_certificate,
            )
        except urlfetch.DeadlineExceededError as e:
            raise TimeoutError(self, e)

        except urlfetch.InvalidURLError as e:
            if "too large" in str(e):
                raise AppEnginePlatformError(
                    "URLFetch request too large, URLFetch only "

            

Reported by Pylint.

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

Line: 162 Column: 17

              
        except urlfetch.InvalidURLError as e:
            if "too large" in str(e):
                raise AppEnginePlatformError(
                    "URLFetch request too large, URLFetch only "
                    "supports requests up to 10mb in size.",
                    e,
                )
            raise ProtocolError(e)

            

Reported by Pylint.

pipenv/vendor/cerberus/errors.py
36 issues
Unable to import 'cerberus.platform'
Error

Line: 11 Column: 1

              from functools import wraps
from pprint import pformat

from cerberus.platform import PYTHON_VERSION, MutableMapping
from cerberus.utils import compare_paths_lt, quote_string


ErrorDefinition = namedtuple('ErrorDefinition', 'code, rule')
"""

            

Reported by Pylint.

Unable to import 'cerberus.utils'
Error

Line: 12 Column: 1

              from pprint import pformat

from cerberus.platform import PYTHON_VERSION, MutableMapping
from cerberus.utils import compare_paths_lt, quote_string


ErrorDefinition = namedtuple('ErrorDefinition', 'code, rule')
"""
This class is used to define possible errors. Each distinguishable error is

            

Reported by Pylint.

Undefined variable 'unicode'
Error

Line: 447 Column: 34

                  def wrapped(obj, error):
        def _encode(value):
            """Helper encoding unicode strings into binary utf-8"""
            if isinstance(value, unicode):  # noqa: F821
                return value.encode('utf-8')
            return value

        error = copy(error)
        error.document_path = _encode(error.document_path)

            

Reported by Pylint.

TODO remove KEYSCHEMA AND VALUESCHEMA with next major release
Error

Line: 70 Column: 3

              ERROR_GROUP = ErrorDefinition(0x80, None)
MAPPING_SCHEMA = ErrorDefinition(0x81, 'schema')
SEQUENCE_SCHEMA = ErrorDefinition(0x82, 'schema')
# TODO remove KEYSCHEMA AND VALUESCHEMA with next major release
KEYSRULES = KEYSCHEMA = ErrorDefinition(0x83, 'keysrules')
VALUESRULES = VALUESCHEMA = ErrorDefinition(0x84, 'valuesrules')
BAD_ITEMS = ErrorDefinition(0x8F, 'items')

LOGICAL = ErrorDefinition(0x90, None)

            

Reported by Pylint.

Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
Error

Line: 157 Column: 38

                  @property
    def definitions_errors(self):
        """
        Dictionary with errors of an \*of-rule mapped to the index of the definition it
        occurred in. Returns :obj:`None` if not applicable.
        """
        if not self.is_logic_error:
            return None


            

Reported by Pylint.

Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
Error

Line: 185 Column: 71

                  @property
    def is_logic_error(self):
        """
        ``True`` for validation errors against different schemas with \*of-rules.
        """
        return bool(self.code & LOGICAL.code - ERROR_GROUP.code)

    @property
    def is_normalization_error(self):

            

Reported by Pylint.

__init__ method from base class 'ErrorTreeNode' is not called
Error

Line: 288 Column: 5

                  :class:`~cerberus.errors.SchemaErrorTree`.
    """

    def __init__(self, errors=()):
        self.parent_node = None
        self.tree_root = self
        self.path = ()
        self.errors = ErrorList()
        self.descendants = {}

            

Reported by Pylint.

Unnecessary pass statement
Error

Line: 361 Column: 9

              
    def __init__(self, *args, **kwargs):
        """Optionally initialize a new instance."""
        pass

    def __call__(self, errors):
        """
        Returns errors in a handler-specific format.


            

Reported by Pylint.

Unnecessary pass statement
Error

Line: 395 Column: 9

                      :param error: The error to emit.
        :type error: :class:`~cerberus.errors.ValidationError`
        """
        pass

    def end(self, validator):
        """
        Gets called when a validation ends.


            

Reported by Pylint.

Unnecessary pass statement
Error

Line: 404 Column: 9

                      :param validator: The calling validator.
        :type validator: :class:`~cerberus.Validator`
        """
        pass

    def extend(self, errors):
        """
        Adds all errors to the handler's container object.


            

Reported by Pylint.

pipenv/vendor/jinja2/loaders.py
36 issues
Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              from importlib import import_module
from types import ModuleType

from .exceptions import TemplateNotFound
from .utils import internalcode
from .utils import open_if_exists

if t.TYPE_CHECKING:
    from .environment import Environment

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              from types import ModuleType

from .exceptions import TemplateNotFound
from .utils import internalcode
from .utils import open_if_exists

if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              
from .exceptions import TemplateNotFound
from .utils import internalcode
from .utils import open_if_exists

if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 5

              from .utils import open_if_exists

if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template


def split_template_path(template: str) -> t.List[str]:
    """Split a path into segments and perform a sanity check.  If it detects

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 5

              
if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template


def split_template_path(template: str) -> t.List[str]:
    """Split a path into segments and perform a sanity check.  If it detects
    '..' in the path it will raise a `TemplateNotFound` error.

            

Reported by Pylint.

Assigning result of a function call, where the function has no return
Error

Line: 125 Column: 9

              
        # first we try to get the source for this template together
        # with the filename and the uptodate function.
        source, filename, uptodate = self.get_source(environment, name)

        # try to load the code from the bytecode cache if there is a
        # bytecode cache configured.
        bcc = environment.bytecode_cache
        if bcc is not None:

            

Reported by Pylint.

Module 'zipimport' has no 'zipimporter' member
Error

Line: 294 Column: 31

                      self._archive = None
        template_root = None

        if isinstance(loader, zipimport.zipimporter):
            self._archive = loader.archive
            pkgdir = next(iter(spec.submodule_search_locations))  # type: ignore
            template_root = os.path.join(pkgdir, package_path)
        elif spec.submodule_search_locations:
            # This will be one element for regular packages and multiple

            

Reported by Pylint.

function already defined line 320
Error

Line: 332 Column: 13

              
            mtime = os.path.getmtime(p)

            def up_to_date() -> bool:
                return os.path.isfile(p) and os.path.getmtime(p) == mtime

        else:
            # Package is a zip file.
            try:

            

Reported by Pylint.

Unused Environment imported from environment
Error

Line: 20 Column: 5

              from .utils import open_if_exists

if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template


def split_template_path(template: str) -> t.List[str]:
    """Split a path into segments and perform a sanity check.  If it detects

            

Reported by Pylint.

Unused Template imported from environment
Error

Line: 21 Column: 5

              
if t.TYPE_CHECKING:
    from .environment import Environment
    from .environment import Template


def split_template_path(template: str) -> t.List[str]:
    """Split a path into segments and perform a sanity check.  If it detects
    '..' in the path it will raise a `TemplateNotFound` error.

            

Reported by Pylint.

pipenv/vendor/requirementslib/exceptions.py
36 issues
Unable to import 'vistir.compat'
Error

Line: 9 Column: 1

              import sys

import six
from vistir.compat import FileNotFoundError

if six.PY2:

    class FileExistsError(OSError):
        def __init__(self, *args, **kwargs):

            

Reported by Pylint.

Instance of 'reversed' has no 'pop' member
Error

Line: 46 Column: 27

                      backup_path = kwargs.pop("backup_path", None)
        if not backup_path and args:
            args = reversed(args)
            backup_path = args.pop()
            if not isinstance(backup_path, six.string_types) or not os.path.exists(
                os.path.abspath(os.path.dirname(backup_path))
            ):
                args.append(backup_path)
                backup_path = None

            

Reported by Pylint.

Instance of 'tuple' has no 'append' member
Error

Line: 50 Column: 17

                          if not isinstance(backup_path, six.string_types) or not os.path.exists(
                os.path.abspath(os.path.dirname(backup_path))
            ):
                args.append(backup_path)
                backup_path = None
            if args:
                args = reversed(args)
        self.message = self.get_message(path, backup_path=backup_path)
        super(FileCorruptException, self).__init__(self.message)

            

Reported by Pylint.

Instance of 'reversed' has no 'append' member
Error

Line: 50 Column: 17

                          if not isinstance(backup_path, six.string_types) or not os.path.exists(
                os.path.abspath(os.path.dirname(backup_path))
            ):
                args.append(backup_path)
                backup_path = None
            if args:
                args = reversed(args)
        self.message = self.get_message(path, backup_path=backup_path)
        super(FileCorruptException, self).__init__(self.message)

            

Reported by Pylint.

Redefining built-in 'FileNotFoundError'
Error

Line: 9 Column: 1

              import sys

import six
from vistir.compat import FileNotFoundError

if six.PY2:

    class FileExistsError(OSError):
        def __init__(self, *args, **kwargs):

            

Reported by Pylint.

Redefining built-in 'FileExistsError'
Error

Line: 13 Column: 5

              
if six.PY2:

    class FileExistsError(OSError):
        def __init__(self, *args, **kwargs):
            self.errno = errno.EEXIST
            super(FileExistsError, self).__init__(*args, **kwargs)



            

Reported by Pylint.

Unused argument 'param'
Error

Line: 36 Column: 20

                  def get_message(cls, param):
        return "Missing Parameter: %s" % param

    def show(self, param):
        print(self.message, file=sys.stderr, flush=True)


class FileCorruptException(OSError):
    def __init__(self, path, *args, **kwargs):

            

Reported by Pylint.

Assigning the same variable 'path' to itself
Error

Line: 42 Column: 9

              
class FileCorruptException(OSError):
    def __init__(self, path, *args, **kwargs):
        path = path
        backup_path = kwargs.pop("backup_path", None)
        if not backup_path and args:
            args = reversed(args)
            backup_path = args.pop()
            if not isinstance(backup_path, six.string_types) or not os.path.exists(

            

Reported by Pylint.

Unused argument 'backup_path'
Error

Line: 84 Column: 26

                      message = "{0}\nYour lockfile is corrupt, {1}".format(message, msg)
        return message

    def show(self, path, backup_path=None):
        print(self.message, file=sys.stderr, flush=True)


class PipfileCorruptException(FileCorruptException):
    def __init__(self, path, backup_path=None):

            

Reported by Pylint.

Parameters differ from overridden 'show' method
Error

Line: 84 Column: 5

                      message = "{0}\nYour lockfile is corrupt, {1}".format(message, msg)
        return message

    def show(self, path, backup_path=None):
        print(self.message, file=sys.stderr, flush=True)


class PipfileCorruptException(FileCorruptException):
    def __init__(self, path, backup_path=None):

            

Reported by Pylint.

pipenv/vendor/requirementslib/models/cache.py
36 issues
Unable to import 'vistir'
Error

Line: 11 Column: 1

              import os
import sys

import vistir

from appdirs import user_cache_dir
from pip_shims.shims import FAVORITE_HASH, SafeFileCache
from packaging.requirements import Requirement


            

Reported by Pylint.

Unable to import 'appdirs'
Error

Line: 13 Column: 1

              
import vistir

from appdirs import user_cache_dir
from pip_shims.shims import FAVORITE_HASH, SafeFileCache
from packaging.requirements import Requirement

from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version


            

Reported by Pylint.

Unable to import 'pip_shims.shims'
Error

Line: 14 Column: 1

              import vistir

from appdirs import user_cache_dir
from pip_shims.shims import FAVORITE_HASH, SafeFileCache
from packaging.requirements import Requirement

from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version

from ..exceptions import FileExistsError

            

Reported by Pylint.

Unable to import 'packaging.requirements'
Error

Line: 15 Column: 1

              
from appdirs import user_cache_dir
from pip_shims.shims import FAVORITE_HASH, SafeFileCache
from packaging.requirements import Requirement

from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version

from ..exceptions import FileExistsError


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              from pip_shims.shims import FAVORITE_HASH, SafeFileCache
from packaging.requirements import Requirement

from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version

from ..exceptions import FileExistsError


CACHE_DIR = os.environ.get("PIPENV_CACHE_DIR", user_cache_dir("pipenv"))

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              
from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version

from ..exceptions import FileExistsError


CACHE_DIR = os.environ.get("PIPENV_CACHE_DIR", user_cache_dir("pipenv"))



            

Reported by Pylint.

Unable to import 'pip_shims'
Error

Line: 208 Column: 9

                      super(HashCache, self).__init__(*args, **kwargs)

    def get_hash(self, location):
        from pip_shims import VcsSupport
        # if there is no location hash (i.e., md5 / sha256 / etc) we on't want to store it
        hash_value = None
        vcs = VcsSupport()
        orig_scheme = location.scheme
        new_location = copy.deepcopy(location)

            

Reported by Pylint.

Redefining built-in 'FileExistsError'
Error

Line: 19 Column: 1

              
from .utils import as_tuple, key_from_req, lookup_table, get_pinned_version

from ..exceptions import FileExistsError


CACHE_DIR = os.environ.get("PIPENV_CACHE_DIR", user_cache_dir("pipenv"))



            

Reported by Pylint.

__init__ method from base class 'Exception' is not called
Error

Line: 27 Column: 5

              
# Pip-tools cache implementation
class CorruptCacheError(Exception):
    def __init__(self, path):
        self.path = path

    def __str__(self):
        lines = [
            'The dependency cache seems to have been corrupted.',

            

Reported by Pylint.

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

Line: 44 Column: 13

                      try:
            doc = json.load(cache_file)
        except ValueError:
            raise CorruptCacheError(cache_file_path)

        # Check version and load the contents
        assert doc['__format__'] == 1, 'Unknown cache file format'
        return doc['dependencies']


            

Reported by Pylint.

pipenv/vendor/colorama/ansi.py
36 issues
Missing function or method docstring
Error

Line: 12 Column: 1

              BEL = '\a'


def code_to_chars(code):
    return CSI + str(code) + 'm'

def set_title(title):
    return OSC + '2;' + title + BEL


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 15 Column: 1

              def code_to_chars(code):
    return CSI + str(code) + 'm'

def set_title(title):
    return OSC + '2;' + title + BEL

def clear_screen(mode=2):
    return CSI + str(mode) + 'J'


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 18 Column: 1

              def set_title(title):
    return OSC + '2;' + title + BEL

def clear_screen(mode=2):
    return CSI + str(mode) + 'J'

def clear_line(mode=2):
    return CSI + str(mode) + 'K'


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 21 Column: 1

              def clear_screen(mode=2):
    return CSI + str(mode) + 'J'

def clear_line(mode=2):
    return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):

            

Reported by Pylint.

Missing class docstring
Error

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

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

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

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

Line: 36 Column: 1

                              setattr(self, name, code_to_chars(value))


class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):

            

Reported by Pylint.

Missing class docstring
Error

Line: 36 Column: 1

                              setattr(self, name, code_to_chars(value))


class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):

            

Reported by Pylint.

Method name "UP" doesn't conform to snake_case naming style
Error

Line: 37 Column: 5

              

class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):
        return CSI + str(n) + 'C'

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/colorama/ansi.py
36 issues
Missing function or method docstring
Error

Line: 12 Column: 1

              BEL = '\007'


def code_to_chars(code):
    return CSI + str(code) + 'm'

def set_title(title):
    return OSC + '2;' + title + BEL


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 15 Column: 1

              def code_to_chars(code):
    return CSI + str(code) + 'm'

def set_title(title):
    return OSC + '2;' + title + BEL

def clear_screen(mode=2):
    return CSI + str(mode) + 'J'


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 18 Column: 1

              def set_title(title):
    return OSC + '2;' + title + BEL

def clear_screen(mode=2):
    return CSI + str(mode) + 'J'

def clear_line(mode=2):
    return CSI + str(mode) + 'K'


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 21 Column: 1

              def clear_screen(mode=2):
    return CSI + str(mode) + 'J'

def clear_line(mode=2):
    return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):

            

Reported by Pylint.

Missing class docstring
Error

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

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

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 25 Column: 1

                  return CSI + str(mode) + 'K'


class AnsiCodes(object):
    def __init__(self):
        # the subclasses declare class attributes which are numbers.
        # Upon instantiation we define instance attributes, which are the same
        # as the class attributes but wrapped with the ANSI escape sequence
        for name in dir(self):

            

Reported by Pylint.

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

Line: 36 Column: 1

                              setattr(self, name, code_to_chars(value))


class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):

            

Reported by Pylint.

Missing class docstring
Error

Line: 36 Column: 1

                              setattr(self, name, code_to_chars(value))


class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):

            

Reported by Pylint.

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

Line: 37 Column: 5

              

class AnsiCursor(object):
    def UP(self, n=1):
        return CSI + str(n) + 'A'
    def DOWN(self, n=1):
        return CSI + str(n) + 'B'
    def FORWARD(self, n=1):
        return CSI + str(n) + 'C'

            

Reported by Pylint.