The following issues were found

pipenv/patched/notpip/_internal/utils/wheel.py
17 issues
Consider explicitly re-raising using the 'from' keyword
Error

Line: 51 Column: 13

                          return super(WheelMetadata, self).get_metadata(name)
        except UnicodeDecodeError as e:
            # Augment the default error with the origin of the file.
            raise UnsupportedWheel(
                "Error decoding metadata for {}: {}".format(
                    self._wheel_name, e
                )
            )


            

Reported by Pylint.

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

Line: 84 Column: 13

                              wheel_zip, full_path
            )
        except UnsupportedWheel as e:
            raise UnsupportedWheel(
                "{} has an invalid wheel, {}".format(name, str(e))
            )

    metadata = WheelMetadata(metadata_text, location)


            

Reported by Pylint.

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

Line: 107 Column: 9

                      metadata = wheel_metadata(wheel_zip, info_dir)
        version = wheel_version(metadata)
    except UnsupportedWheel as e:
        raise UnsupportedWheel(
            "{} has an invalid wheel, {}".format(name, str(e))
        )

    check_compatibility(version, name)


            

Reported by Pylint.

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

Line: 161 Column: 9

                      # BadZipFile for general corruption, KeyError for missing entry,
        # and RuntimeError for password-protected files
    except (BadZipFile, KeyError, RuntimeError) as e:
        raise UnsupportedWheel(
            "could not read {!r} file: {!r}".format(path, e)
        )


def wheel_metadata(source, dist_info_dir):

            

Reported by Pylint.

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

Line: 178 Column: 9

                  try:
        wheel_text = ensure_str(wheel_contents)
    except UnicodeDecodeError as e:
        raise UnsupportedWheel("error decoding {!r}: {!r}".format(path, e))

    # FeedParser (used by Parser) does not raise any exceptions. The returned
    # message may have .defects populated, but for backwards-compatibility we
    # currently ignore them.
    return Parser().parsestr(wheel_text)

            

Reported by Pylint.

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

Line: 200 Column: 9

                  try:
        return tuple(map(int, version.split('.')))
    except ValueError:
        raise UnsupportedWheel("invalid Wheel-Version: {!r}".format(version))


def check_compatibility(version, name):
    # type: (Tuple[int, ...], str) -> None
    """Raises errors or warns if called with an incompatible Wheel-Version.

            

Reported by Pylint.

Imports from package email are not grouped
Error

Line: 19 Column: 5

              from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING

if MYPY_CHECK_RUNNING:
    from email.message import Message
    from typing import Dict, Tuple

    from pipenv.patched.notpip._vendor.pkg_resources import Distribution

if PY2:

            

Reported by Pylint.

Imports from package zipfile are not grouped
Error

Line: 25 Column: 5

                  from pipenv.patched.notpip._vendor.pkg_resources import Distribution

if PY2:
    from zipfile import BadZipfile as BadZipFile
else:
    from zipfile import BadZipFile


VERSION_COMPATIBLE = (1, 0)

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 42 Column: 9

                  """
    def __init__(self, metadata, wheel_name):
        # type: (Dict[str, bytes], str) -> None
        super(WheelMetadata, self).__init__(metadata)
        self._wheel_name = wheel_name

    def get_metadata(self, name):
        # type: (str) -> str
        try:

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 48 Column: 20

                  def get_metadata(self, name):
        # type: (str) -> str
        try:
            return super(WheelMetadata, self).get_metadata(name)
        except UnicodeDecodeError as e:
            # Augment the default error with the origin of the file.
            raise UnsupportedWheel(
                "Error decoding metadata for {}: {}".format(
                    self._wheel_name, e

            

Reported by Pylint.

pipenv/vendor/tomlkit/_utils.py
17 issues
Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              from datetime import timedelta
from typing import Union

from ._compat import decode
from ._compat import timezone


try:
    from collections.abc import Mapping

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              from typing import Union

from ._compat import decode
from ._compat import timezone


try:
    from collections.abc import Mapping
except ImportError:

            

Reported by Pylint.

Unused variable 'v'
Error

Line: 140 Column: 12

              

def merge_dicts(d1, d2):
    for k, v in d2.items():
        if k in d1 and isinstance(d1[k], dict) and isinstance(d2[k], Mapping):
            merge_dicts(d1[k], d2[k])
        else:
            d1[k] = d2[k]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import re

from datetime import date
from datetime import datetime
from datetime import time
from datetime import timedelta
from typing import Union

from ._compat import decode

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 48 Column: 1

              _utc = timezone(timedelta(), "UTC")


def parse_rfc3339(string):  # type: (str) -> Union[datetime, date, time]
    m = RFC_3339_DATETIME.match(string)
    if m:
        year = int(m.group(1))
        month = int(m.group(2))
        day = int(m.group(3))

            

Reported by Pylint.

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

Line: 49 Column: 5

              

def parse_rfc3339(string):  # type: (str) -> Union[datetime, date, time]
    m = RFC_3339_DATETIME.match(string)
    if m:
        year = int(m.group(1))
        month = int(m.group(2))
        day = int(m.group(3))
        hour = int(m.group(4))

            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 62 Column: 9

                      if m.group(7):
            microsecond = int(("{:<06s}".format(m.group(8)))[:6])

        if m.group(9):
            # Timezone
            tz = m.group(9)
            if tz == "Z":
                tzinfo = _utc
            else:

            

Reported by Pylint.

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

Line: 64 Column: 13

              
        if m.group(9):
            # Timezone
            tz = m.group(9)
            if tz == "Z":
                tzinfo = _utc
            else:
                sign = m.group(11)[0]
                hour_offset, minute_offset = int(m.group(12)), int(m.group(13))

            

Reported by Pylint.

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

Line: 84 Column: 5

                      else:
            return datetime(year, month, day, hour, minute, second, microsecond)

    m = RFC_3339_DATE.match(string)
    if m:
        year = int(m.group(1))
        month = int(m.group(2))
        day = int(m.group(3))


            

Reported by Pylint.

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

Line: 92 Column: 5

              
        return date(year, month, day)

    m = RFC_3339_TIME.match(string)
    if m:
        hour = int(m.group(1))
        minute = int(m.group(2))
        second = int(m.group(3))
        microsecond = 0

            

Reported by Pylint.

pipenv/patched/notpip/_internal/cli/base_command.py
17 issues
Uses of a deprecated module 'optparse'
Error

Line: 7 Column: 1

              
import logging
import logging.config
import optparse
import os
import platform
import sys
import traceback


            

Reported by Pylint.

Uses of a deprecated module 'optparse'
Error

Line: 43 Column: 5

              
if MYPY_CHECK_RUNNING:
    from typing import List, Tuple, Any
    from optparse import Values

__all__ = ['Command']

logger = logging.getLogger(__name__)


            

Reported by Pylint.

Attribute 'verbosity' defined outside __init__
Error

Line: 118 Column: 9

                      options, args = self.parse_args(args)

        # Set verbosity so that it can be used elsewhere.
        self.verbosity = options.verbose - options.quiet

        level_number = setup_logging(
            verbosity=self.verbosity,
            no_color=options.no_color,
            user_log_file=options.log,

            

Reported by Pylint.

TODO: Try to get these passing down from the command?
Error

Line: 154 Column: 3

                              issue=7297,
            )

        # TODO: Try to get these passing down from the command?
        #       without resorting to os.environ to hold these.
        #       This also affects isolated builds and it should.

        if options.no_input:
            os.environ['PIP_NO_INPUT'] = '1'

            

Reported by Pylint.

FIXME: all commands should return an exit status
Error

Line: 187 Column: 3

              
        try:
            status = self.run(options, args)
            # FIXME: all commands should return an exit status
            # and when it is done, isinstance is not needed anymore
            if isinstance(status, int):
                return status
        except PreviousBuildDirError as exc:
            logger.critical(str(exc))

            

Reported by Pylint.

Catching too general exception BaseException
Error

Line: 219 Column: 16

                          logger.debug('Exception information:', exc_info=True)

            return ERROR
        except BaseException:
            logger.critical('Exception:', exc_info=True)

            return UNKNOWN_ERROR
        finally:
            self.handle_pip_version_check(options)

            

Reported by Pylint.

Missing class docstring
Error

Line: 50 Column: 1

              logger = logging.getLogger(__name__)


class Command(CommandContextMixIn):
    usage = None  # type: str
    ignore_require_venv = False  # type: bool

    def __init__(self, name, summary, isolated=False):
        # type: (str, str, bool) -> None

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 56 Column: 9

              
    def __init__(self, name, summary, isolated=False):
        # type: (str, str, bool) -> None
        super(Command, self).__init__()
        parser_kw = {
            'usage': self.usage,
            'prog': '%s %s' % (get_prog(), name),
            'formatter': UpdatingDefaultsHelpFormatter(),
            'add_help_option': False,

            

Reported by Pylint.

Method could be a function
Error

Line: 82 Column: 5

                      )
        self.parser.add_option_group(gen_opts)

    def handle_pip_version_check(self, options):
        # type: (Values) -> None
        """
        This is a no-op so that commands by default do not do the pip version
        check.
        """

            

Reported by Pylint.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Security

Line: 90
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html

                      """
        # Make sure we do the pip version check if the index_group options
        # are present.
        assert not hasattr(options, 'no_index')

    def run(self, options, args):
        # type: (Values, List[Any]) -> Any
        raise NotImplementedError


            

Reported by Bandit.

pipenv/patched/yaml3/nodes.py
17 issues
__init__ method from base class 'Node' is not called
Error

Line: 27 Column: 5

              
class ScalarNode(Node):
    id = 'scalar'
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark

            

Reported by Pylint.

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

Line: 36 Column: 5

                      self.style = style

class CollectionNode(Node):
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, flow_style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              
class Node(object):
    def __init__(self, tag, value, start_mark, end_mark):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
    def __repr__(self):
        value = self.value

            

Reported by Pylint.

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

Line: 2 Column: 1

              
class Node(object):
    def __init__(self, tag, value, start_mark, end_mark):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
    def __repr__(self):
        value = self.value

            

Reported by Pylint.

Missing class docstring
Error

Line: 2 Column: 1

              
class Node(object):
    def __init__(self, tag, value, start_mark, end_mark):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
    def __repr__(self):
        value = self.value

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 2 Column: 1

              
class Node(object):
    def __init__(self, tag, value, start_mark, end_mark):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark
    def __repr__(self):
        value = self.value

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 25 Column: 1

                      value = repr(value)
        return '%s(tag=%r, value=%s)' % (self.__class__.__name__, self.tag, value)

class ScalarNode(Node):
    id = 'scalar'
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, style=None):
        self.tag = tag
        self.value = value

            

Reported by Pylint.

Missing class docstring
Error

Line: 25 Column: 1

                      value = repr(value)
        return '%s(tag=%r, value=%s)' % (self.__class__.__name__, self.tag, value)

class ScalarNode(Node):
    id = 'scalar'
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, style=None):
        self.tag = tag
        self.value = value

            

Reported by Pylint.

Too many arguments (6/5)
Error

Line: 27 Column: 5

              
class ScalarNode(Node):
    id = 'scalar'
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark
        self.end_mark = end_mark

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

                      self.end_mark = end_mark
        self.style = style

class CollectionNode(Node):
    def __init__(self, tag, value,
            start_mark=None, end_mark=None, flow_style=None):
        self.tag = tag
        self.value = value
        self.start_mark = start_mark

            

Reported by Pylint.

pipenv/vendor/importlib_resources/tests/test_reader.py
17 issues
Unable to import 'importlib_resources.readers'
Error

Line: 7 Column: 1

              import unittest

from importlib import import_module
from importlib_resources.readers import MultiplexedPath, NamespaceReader


class MultiplexedPathTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import os.path
import sys
import pathlib
import unittest

from importlib import import_module
from importlib_resources.readers import MultiplexedPath, NamespaceReader



            

Reported by Pylint.

Missing class docstring
Error

Line: 10 Column: 1

              from importlib_resources.readers import MultiplexedPath, NamespaceReader


class MultiplexedPathTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        path = pathlib.Path(__file__).parent / 'namespacedata01'
        cls.folder = str(path)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 16 Column: 5

                      path = pathlib.Path(__file__).parent / 'namespacedata01'
        cls.folder = str(path)

    def test_init_no_paths(self):
        with self.assertRaises(FileNotFoundError):
            MultiplexedPath()

    def test_init_file(self):
        with self.assertRaises(NotADirectoryError):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 20 Column: 5

                      with self.assertRaises(FileNotFoundError):
            MultiplexedPath()

    def test_init_file(self):
        with self.assertRaises(NotADirectoryError):
            MultiplexedPath(os.path.join(self.folder, 'binary.file'))

    def test_iterdir(self):
        contents = {path.name for path in MultiplexedPath(self.folder).iterdir()}

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 24 Column: 5

                      with self.assertRaises(NotADirectoryError):
            MultiplexedPath(os.path.join(self.folder, 'binary.file'))

    def test_iterdir(self):
        contents = {path.name for path in MultiplexedPath(self.folder).iterdir()}
        try:
            contents.remove('__pycache__')
        except (KeyError, ValueError):
            pass

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 32 Column: 5

                          pass
        self.assertEqual(contents, {'binary.file', 'utf-16.file', 'utf-8.file'})

    def test_iterdir_duplicate(self):
        data01 = os.path.abspath(os.path.join(__file__, '..', 'data01'))
        contents = {
            path.name for path in MultiplexedPath(self.folder, data01).iterdir()
        }
        for remove in ('__pycache__', '__init__.pyc'):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 47 Column: 5

                          {'__init__.py', 'binary.file', 'subdirectory', 'utf-16.file', 'utf-8.file'},
        )

    def test_is_dir(self):
        self.assertEqual(MultiplexedPath(self.folder).is_dir(), True)

    def test_is_file(self):
        self.assertEqual(MultiplexedPath(self.folder).is_file(), False)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 50 Column: 5

                  def test_is_dir(self):
        self.assertEqual(MultiplexedPath(self.folder).is_dir(), True)

    def test_is_file(self):
        self.assertEqual(MultiplexedPath(self.folder).is_file(), False)

    def test_open_file(self):
        path = MultiplexedPath(self.folder)
        with self.assertRaises(FileNotFoundError):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 53 Column: 5

                  def test_is_file(self):
        self.assertEqual(MultiplexedPath(self.folder).is_file(), False)

    def test_open_file(self):
        path = MultiplexedPath(self.folder)
        with self.assertRaises(FileNotFoundError):
            path.read_bytes()
        with self.assertRaises(FileNotFoundError):
            path.read_text()

            

Reported by Pylint.

pipenv/patched/piptools/repositories/local.py
17 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
from contextlib import contextmanager

from .._compat import PIP_VERSION, FAVORITE_HASH
from .base import BaseRepository

from piptools.utils import as_tuple, key_from_ireq, make_install_requirement



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              from contextlib import contextmanager

from .._compat import PIP_VERSION, FAVORITE_HASH
from .base import BaseRepository

from piptools.utils import as_tuple, key_from_ireq, make_install_requirement


def ireq_satisfied_by_existing_pin(ireq, existing_pin):

            

Reported by Pylint.

Unable to import 'piptools.utils'
Error

Line: 9 Column: 1

              from .._compat import PIP_VERSION, FAVORITE_HASH
from .base import BaseRepository

from piptools.utils import as_tuple, key_from_ireq, make_install_requirement


def ireq_satisfied_by_existing_pin(ireq, existing_pin):
    """
    Return True if the given InstallationRequirement is satisfied by the

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals

from contextlib import contextmanager

from .._compat import PIP_VERSION, FAVORITE_HASH
from .base import BaseRepository

from piptools.utils import as_tuple, key_from_ireq, make_install_requirement

            

Reported by Pylint.

third party import "from piptools.utils import as_tuple, key_from_ireq, make_install_requirement" should be placed before "from .._compat import PIP_VERSION, FAVORITE_HASH"
Error

Line: 9 Column: 1

              from .._compat import PIP_VERSION, FAVORITE_HASH
from .base import BaseRepository

from piptools.utils import as_tuple, key_from_ireq, make_install_requirement


def ireq_satisfied_by_existing_pin(ireq, existing_pin):
    """
    Return True if the given InstallationRequirement is satisfied by the

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 39 Column: 5

                      self.existing_pins = existing_pins

    @property
    def options(self):
        return self.repository.options

    @property
    def finder(self):
        return self.repository.finder

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 43 Column: 5

                      return self.repository.options

    @property
    def finder(self):
        return self.repository.finder

    @property
    def session(self):
        return self.repository.session

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 47 Column: 5

                      return self.repository.finder

    @property
    def session(self):
        return self.repository.session

    @property
    def DEFAULT_INDEX_URL(self):
        return self.repository.DEFAULT_INDEX_URL

            

Reported by Pylint.

Attribute name "DEFAULT_INDEX_URL" doesn't conform to snake_case naming style
Error

Line: 51 Column: 5

                      return self.repository.session

    @property
    def DEFAULT_INDEX_URL(self):
        return self.repository.DEFAULT_INDEX_URL

    def clear_caches(self):
        self.repository.clear_caches()


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 51 Column: 5

                      return self.repository.session

    @property
    def DEFAULT_INDEX_URL(self):
        return self.repository.DEFAULT_INDEX_URL

    def clear_caches(self):
        self.repository.clear_caches()


            

Reported by Pylint.

pipenv/patched/piptools/_compat/pip_compat.py
17 issues
Unable to import 'appdirs'
Error

Line: 5 Column: 1

              from __future__ import absolute_import
import importlib
import os
from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes

InstallationCandidate = ShimmedPathCollection("InstallationCandidate", ImportTypes.CLASS)

            

Reported by Pylint.

Unable to import 'pip_shims.shims'
Error

Line: 7 Column: 1

              import os
from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes

InstallationCandidate = ShimmedPathCollection("InstallationCandidate", ImportTypes.CLASS)
InstallationCandidate.create_path("models.candidate", "18.0", "9999")
InstallationCandidate.create_path("index", "7.0.3", "10.9.9")

            

Reported by Pylint.

Unable to import 'pip_shims.models'
Error

Line: 8 Column: 1

              from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes

InstallationCandidate = ShimmedPathCollection("InstallationCandidate", ImportTypes.CLASS)
InstallationCandidate.create_path("models.candidate", "18.0", "9999")
InstallationCandidate.create_path("index", "7.0.3", "10.9.9")


            

Reported by Pylint.

No name 'install_req_from_parsed_requirement' in module 'pipenv.patched.notpip._internal.req.constructors'
Error

Line: 42 Column: 5

                      return req

else:
    from pipenv.patched.notpip._internal.req.constructors import install_req_from_parsed_requirement

InstallRequirement = pip_shims.shims.InstallRequirement
InstallationError = pip_shims.shims.InstallationError
parse_requirements = pip_shims.shims.parse_requirements
RequirementSet = pip_shims.shims.RequirementSet

            

Reported by Pylint.

function already defined line 46
Error

Line: 71 Column: 1

              install_req_from_line = pip_shims.shims.install_req_from_line
install_req_from_editable = pip_shims.shims.install_req_from_editable

def parse_requirements(
    filename, session, finder=None, options=None, constraint=False, isolated=False
):
    for parsed_req in _parse_requirements(
        filename, session, finder=finder, options=options, constraint=constraint
    ):

            

Reported by Pylint.

Undefined variable '_parse_requirements'
Error

Line: 74 Column: 23

              def parse_requirements(
    filename, session, finder=None, options=None, constraint=False, isolated=False
):
    for parsed_req in _parse_requirements(
        filename, session, finder=finder, options=options, constraint=constraint
    ):
        yield install_req_from_parsed_requirement(parsed_req, isolated=isolated)

            

Reported by Pylint.

Unused user_cache_dir imported from appdirs
Error

Line: 5 Column: 1

              from __future__ import absolute_import
import importlib
import os
from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes

InstallationCandidate = ShimmedPathCollection("InstallationCandidate", ImportTypes.CLASS)

            

Reported by Pylint.

Unused argument 'kwargs'
Error

Line: 38 Column: 1

                          return getattr(imported, package)

if PIP_VERSION[:2] <= (20, 0):
    def install_req_from_parsed_requirement(req, **kwargs):
        return req

else:
    from pipenv.patched.notpip._internal.req.constructors import install_req_from_parsed_requirement


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding=utf-8 -*-
from __future__ import absolute_import
import importlib
import os
from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes


            

Reported by Pylint.

Import "import pip_shims.shims" should be placed at the top of the module
Error

Line: 7 Column: 1

              import os
from appdirs import user_cache_dir
os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
import pip_shims.shims
from pip_shims.models import ShimmedPathCollection, ImportTypes

InstallationCandidate = ShimmedPathCollection("InstallationCandidate", ImportTypes.CLASS)
InstallationCandidate.create_path("models.candidate", "18.0", "9999")
InstallationCandidate.create_path("index", "7.0.3", "10.9.9")

            

Reported by Pylint.

pipenv/vendor/chardet/hebrewprober.py
17 issues
Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              # 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              ######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers

### General ideas of the Hebrew charset recognition ###

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):

            

Reported by Pylint.

Missing class docstring
Error

Line: 128 Column: 1

              # model probers scores. The answer is returned in the form of the name of the
# charset identified, either "windows-1255" or "ISO-8859-8".

class HebrewProber(CharSetProber):
    # windows-1255 / ISO-8859-8 code points of interest
    FINAL_KAF = 0xea
    NORMAL_KAF = 0xeb
    FINAL_MEM = 0xed
    NORMAL_MEM = 0xee

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 155 Column: 9

                  LOGICAL_HEBREW_NAME = "windows-1255"

    def __init__(self):
        super(HebrewProber, self).__init__()
        self._final_char_logical_score = None
        self._final_char_visual_score = None
        self._prev = None
        self._before_prev = None
        self._logical_prober = None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 164 Column: 5

                      self._visual_prober = None
        self.reset()

    def reset(self):
        self._final_char_logical_score = 0
        self._final_char_visual_score = 0
        # The two last characters seen in the previous buffer,
        # mPrev and mBeforePrev are initialized to space in order to simulate
        # a word delimiter at the beginning of the data

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

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

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

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

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

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

Line: 178 Column: 5

                      self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,
                     self.FINAL_PE, self.FINAL_TSADI]

    def is_non_final(self, c):
        # The normal Tsadi is not a good Non-Final letter due to words like

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/chardet/hebrewprober.py
17 issues
Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              # 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              ######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState

# This prober doesn't actually recognize a language or a charset.
# It is a helper prober for the use of the Hebrew model probers

### General ideas of the Hebrew charset recognition ###

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
#          Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):

            

Reported by Pylint.

Missing class docstring
Error

Line: 128 Column: 1

              # model probers scores. The answer is returned in the form of the name of the
# charset identified, either "windows-1255" or "ISO-8859-8".

class HebrewProber(CharSetProber):
    # windows-1255 / ISO-8859-8 code points of interest
    FINAL_KAF = 0xea
    NORMAL_KAF = 0xeb
    FINAL_MEM = 0xed
    NORMAL_MEM = 0xee

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 155 Column: 9

                  LOGICAL_HEBREW_NAME = "windows-1255"

    def __init__(self):
        super(HebrewProber, self).__init__()
        self._final_char_logical_score = None
        self._final_char_visual_score = None
        self._prev = None
        self._before_prev = None
        self._logical_prober = None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 164 Column: 5

                      self._visual_prober = None
        self.reset()

    def reset(self):
        self._final_char_logical_score = 0
        self._final_char_visual_score = 0
        # The two last characters seen in the previous buffer,
        # mPrev and mBeforePrev are initialized to space in order to simulate
        # a word delimiter at the beginning of the data

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

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

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

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

Line: 174 Column: 5

                      self._before_prev = ' '
        # These probers are owned by the group prober.

    def set_model_probers(self, logicalProber, visualProber):
        self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 178 Column: 5

                      self._logical_prober = logicalProber
        self._visual_prober = visualProber

    def is_final(self, c):
        return c in [self.FINAL_KAF, self.FINAL_MEM, self.FINAL_NUN,
                     self.FINAL_PE, self.FINAL_TSADI]

    def is_non_final(self, c):
        # The normal Tsadi is not a good Non-Final letter due to words like

            

Reported by Pylint.

pipenv/vendor/cached_property.py
17 issues
Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding: utf-8 -*-

__author__ = "Daniel Greenfeld"
__email__ = "pydanny@gmail.com"
__version__ = "1.5.2"
__license__ = "BSD"

from functools import wraps
from time import time

            

Reported by Pylint.

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

Line: 18 Column: 1

                  asyncio = None


class cached_property(object):
    """
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Deleting the attribute resets the property.
    Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
    """  # noqa

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 18 Column: 1

                  asyncio = None


class cached_property(object):
    """
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Deleting the attribute resets the property.
    Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
    """  # noqa

            

Reported by Pylint.

Class name "cached_property" doesn't conform to PascalCase naming style
Error

Line: 18 Column: 1

                  asyncio = None


class cached_property(object):
    """
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Deleting the attribute resets the property.
    Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
    """  # noqa

            

Reported by Pylint.

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

Line: 50 Column: 1

                      return wrapper()


class threaded_cached_property(object):
    """
    A cached_property version for use in environments where multiple threads
    might concurrently try to access the property.
    """


            

Reported by Pylint.

Class name "threaded_cached_property" doesn't conform to PascalCase naming style
Error

Line: 50 Column: 1

                      return wrapper()


class threaded_cached_property(object):
    """
    A cached_property version for use in environments where multiple threads
    might concurrently try to access the property.
    """


            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 50 Column: 1

                      return wrapper()


class threaded_cached_property(object):
    """
    A cached_property version for use in environments where multiple threads
    might concurrently try to access the property.
    """


            

Reported by Pylint.

Class name "cached_property_with_ttl" doesn't conform to PascalCase naming style
Error

Line: 77 Column: 1

                              return obj_dict.setdefault(name, self.func(obj))


class cached_property_with_ttl(object):
    """
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Setting the ttl to a number expresses how long
    the property will last before being timed out.
    """

            

Reported by Pylint.

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

Line: 77 Column: 1

                              return obj_dict.setdefault(name, self.func(obj))


class cached_property_with_ttl(object):
    """
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Setting the ttl to a number expresses how long
    the property will last before being timed out.
    """

            

Reported by Pylint.

Class name "cached_property_ttl" doesn't conform to PascalCase naming style
Error

Line: 132 Column: 1

              

# Aliases to make cached_property_with_ttl easier to use
cached_property_ttl = cached_property_with_ttl
timed_cached_property = cached_property_with_ttl


class threaded_cached_property_with_ttl(cached_property_with_ttl):
    """

            

Reported by Pylint.