The following issues were found

pipenv/patched/notpip/_vendor/distlib/locators.py
120 issues
Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

                  import dummy_threading as threading
import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

                                   queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

                                   HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

                                   Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 31 Column: 1

              from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 32 Column: 1

                                 split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)

            

Reported by Pylint.

Undefined variable 'd'
Error

Line: 596 Column: 57

                  # These are used to deal with various Content-Encoding schemes.
    decoders = {
        'deflate': zlib.decompress,
        'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(d)).read(),
        'none': lambda b: b,
    }

    def __init__(self, url, timeout=None, num_workers=10, **kwargs):
        """

            

Reported by Pylint.

Unused string_types imported from compat
Error

Line: 22 Column: 1

              import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, string_types, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError

            

Reported by Pylint.

Unused parse_credentials imported from util
Error

Line: 28 Column: 1

                                   Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, parse_credentials, ensure_slash,
                   split_filename, get_project_data, parse_requirement,
                   parse_name_and_version, ServerProxy, normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible


            

Reported by Pylint.

pipenv/vendor/requirementslib/models/utils.py
119 issues
Unable to import 'tomlkit'
Error

Line: 13 Column: 1

              from itertools import chain, groupby

import six
import tomlkit
from attr import validators
from packaging.markers import InvalidMarker, Marker, Op, Value, Variable
from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection

            

Reported by Pylint.

Unable to import 'packaging.markers'
Error

Line: 15 Column: 1

              import six
import tomlkit
from attr import validators
from packaging.markers import InvalidMarker, Marker, Op, Value, Variable
from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table

            

Reported by Pylint.

Unable to import 'packaging.specifiers'
Error

Line: 16 Column: 1

              import tomlkit
from attr import validators
from packaging.markers import InvalidMarker, Marker, Op, Value, Variable
from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util

            

Reported by Pylint.

Unable to import 'packaging.version'
Error

Line: 17 Column: 1

              from attr import validators
from packaging.markers import InvalidMarker, Marker, Op, Value, Variable
from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse

            

Reported by Pylint.

Unable to import 'plette.models'
Error

Line: 18 Column: 1

              from packaging.markers import InvalidMarker, Marker, Op, Value, Variable
from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache

            

Reported by Pylint.

Unable to import 'tomlkit.container'
Error

Line: 19 Column: 1

              from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet
from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache
from vistir.misc import dedup

            

Reported by Pylint.

Unable to import 'tomlkit.items'
Error

Line: 20 Column: 1

              from packaging.version import parse as parse_version
from plette.models import Package, PackageCollection
from tomlkit.container import Container
from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache
from vistir.misc import dedup
from vistir.path import is_valid_url

            

Reported by Pylint.

Unable to import 'vistir.compat'
Error

Line: 23 Column: 1

              from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table
from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache
from vistir.misc import dedup
from vistir.path import is_valid_url

from ..environment import MYPY_RUNNING
from ..utils import SCHEME_LIST, VCS_LIST, is_star

            

Reported by Pylint.

Unable to import 'vistir.misc'
Error

Line: 24 Column: 1

              from urllib3 import util as urllib3_util
from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache
from vistir.misc import dedup
from vistir.path import is_valid_url

from ..environment import MYPY_RUNNING
from ..utils import SCHEME_LIST, VCS_LIST, is_star


            

Reported by Pylint.

Unable to import 'vistir.path'
Error

Line: 25 Column: 1

              from urllib3.util import parse_url as urllib3_parse
from vistir.compat import lru_cache
from vistir.misc import dedup
from vistir.path import is_valid_url

from ..environment import MYPY_RUNNING
from ..utils import SCHEME_LIST, VCS_LIST, is_star

if MYPY_RUNNING:

            

Reported by Pylint.

pipenv/vendor/docopt.py
118 issues
Instance of 'Pattern' has no 'flat' member
Error

Line: 49 Column: 25

                      """Make pattern-tree tips point to same object if they are equal."""
        if not hasattr(self, 'children'):
            return self
        uniq = list(set(self.flat())) if uniq is None else uniq
        for i, c in enumerate(self.children):
            if not hasattr(c, 'children'):
                assert c in uniq
                self.children[i] = uniq[uniq.index(c)]
            else:

            

Reported by Pylint.

Instance of 'Pattern' has no 'children' member
Error

Line: 50 Column: 31

                      if not hasattr(self, 'children'):
            return self
        uniq = list(set(self.flat())) if uniq is None else uniq
        for i, c in enumerate(self.children):
            if not hasattr(c, 'children'):
                assert c in uniq
                self.children[i] = uniq[uniq.index(c)]
            else:
                c.fix_identities(uniq)

            

Reported by Pylint.

Instance of 'Pattern' has no 'children' member
Error

Line: 53 Column: 17

                      for i, c in enumerate(self.children):
            if not hasattr(c, 'children'):
                assert c in uniq
                self.children[i] = uniq[uniq.index(c)]
            else:
                c.fix_identities(uniq)

    def fix_repeating_arguments(self):
        """Fix elements that should accumulate/increment values."""

            

Reported by Pylint.

Instance of 'ChildPattern' has no 'single_match' member
Error

Line: 121 Column: 22

              
    def match(self, left, collected=None):
        collected = [] if collected is None else collected
        pos, match = self.single_match(left)
        if match is None:
            return False, left, collected
        left_ = left[:pos] + left[pos + 1:]
        same_name = [a for a in collected if a.name == self.name]
        if type(self.value) in (int, list):

            

Reported by Pylint.

Instance of 'TokenStream' has no 'error' member
Error

Line: 375 Column: 15

                                       DocoptLanguageError)
    result = parse_expr(tokens, options)
    if tokens.current() is not None:
        raise tokens.error('unexpected ending: %r' % ' '.join(tokens))
    return Required(*result)


def parse_expr(tokens, options):
    """expr ::= seq ( '|' seq )* ;"""

            

Reported by Pylint.

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

Line: 165 Column: 30

              
    @classmethod
    def parse(class_, source):
        name = re.findall('(<\S*?>)', source)[0]
        value = re.findall('\[default: (.*)\]', source, flags=re.I)
        return class_(name, value[0] if value else None)


class Command(Argument):

            

Reported by Pylint.

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

Line: 166 Column: 44

                  @classmethod
    def parse(class_, source):
        name = re.findall('(<\S*?>)', source)[0]
        value = re.findall('\[default: (.*)\]', source, flags=re.I)
        return class_(name, value[0] if value else None)


class Command(Argument):


            

Reported by Pylint.

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

Line: 166 Column: 29

                  @classmethod
    def parse(class_, source):
        name = re.findall('(<\S*?>)', source)[0]
        value = re.findall('\[default: (.*)\]', source, flags=re.I)
        return class_(name, value[0] if value else None)


class Command(Argument):


            

Reported by Pylint.

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

Line: 172 Column: 5

              
class Command(Argument):

    def __init__(self, name, value=False):
        self.name = name
        self.value = value

    def single_match(self, left):
        for n, p in enumerate(left):

            

Reported by Pylint.

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

Line: 188 Column: 5

              
class Option(ChildPattern):

    def __init__(self, short=None, long=None, argcount=0, value=False):
        assert argcount in (0, 1)
        self.short, self.long = short, long
        self.argcount, self.value = argcount, value
        self.value = None if value is False and argcount else value


            

Reported by Pylint.

pipenv/resolver.py
117 issues
Unused argument 'kwargs'
Error

Line: 75 Column: 1

                  return parser


def which(*args, **kwargs):
    return sys.executable


def handle_parsed_args(parsed):
    if parsed.debug:

            

Reported by Pylint.

Unused argument 'args'
Error

Line: 75 Column: 1

                  return parser


def which(*args, **kwargs):
    return sys.executable


def handle_parsed_args(parsed):
    if parsed.debug:

            

Reported by Pylint.

Access to a protected member _deptree of a client class
Error

Line: 297 Column: 9

                  def create_parent(self, name, specifier="*"):
        parent = self.create(name, specifier, self.project, self.resolver,
                             self.reverse_deps, self.dev)
        parent._deptree = self.deptree
        return parent

    @property
    def deptree(self):
        if not self._deptree:

            

Reported by Pylint.

Access to a protected member _operators of a client class
Error

Line: 313 Column: 53

                  @staticmethod
    def clean_specifier(specifier):
        from pipenv.vendor.packaging.specifiers import Specifier
        if not any(specifier.startswith(k) for k in Specifier._operators.keys()):
            if specifier.strip().lower() in ["any", "<any>", "*"]:
                return "*"
            specifier = f"=={specifier}"
        elif specifier.startswith("==") and specifier.count("=") > 3:
            specifier = "=={}".format(specifier.lstrip("="))

            

Reported by Pylint.

Access to a protected member _operators of a client class
Error

Line: 325 Column: 24

                  def strip_version(specifier):
        from pipenv.vendor.packaging.specifiers import Specifier
        op = next(iter(
            k for k in Specifier._operators.keys() if specifier.startswith(k)
        ), None)
        if op:
            specifier = specifier[len(op):]
        while op:
            op = next(iter(

            

Reported by Pylint.

Access to a protected member _operators of a client class
Error

Line: 331 Column: 28

                          specifier = specifier[len(op):]
        while op:
            op = next(iter(
                k for k in Specifier._operators.keys() if specifier.startswith(k)
            ), None)
            if op:
                specifier = specifier[len(op):]
        return specifier


            

Reported by Pylint.

Access to a protected member _operators of a client class
Error

Line: 408 Column: 47

                      from pipenv.vendor.packaging.specifiers import Specifier
        parents = []
        for spec in self.reverse_deps.get(self.normalized_name, {}).get("parents", set()):
            spec_match = next(iter(c for c in Specifier._operators if c in spec), None)
            name = spec
            parent = None
            if spec_match is not None:
                spec_index = spec.index(spec_match)
                specifier = self.clean_specifier(spec[spec_index:len(spec_match)]).strip()

            

Reported by Pylint.

Attribute 'can_use_original' defined outside __init__
Error

Line: 442 Column: 17

                      satisfied_by_versions = set()
        for constraint in constraints:
            if not constraint.specifier.contains(self.original_version):
                self.can_use_original = False
            if not constraint.specifier.contains(self.updated_version):
                self.can_use_updated = False
            satisfied_by_value = getattr(constraint, "satisfied_by", None)
            if satisfied_by_value:
                satisfied_by = "{}".format(

            

Reported by Pylint.

Attribute 'can_use_updated' defined outside __init__
Error

Line: 444 Column: 17

                          if not constraint.specifier.contains(self.original_version):
                self.can_use_original = False
            if not constraint.specifier.contains(self.updated_version):
                self.can_use_updated = False
            satisfied_by_value = getattr(constraint, "satisfied_by", None)
            if satisfied_by_value:
                satisfied_by = "{}".format(
                    self.clean_specifier(str(satisfied_by_value.version))
                )

            

Reported by Pylint.

Access to a protected member _should_include_hash of a client class
Error

Line: 461 Column: 59

                              hashes = None
                if self.lockfile_entry.specifiers == satisfied_by:
                    ireq = self.lockfile_entry.as_ireq()
                    if not self.lockfile_entry.hashes and self.resolver._should_include_hash(ireq):
                        hashes = self.resolver.get_hash(ireq)
                    else:
                        hashes = self.lockfile_entry.hashes
                else:
                    if self.resolver._should_include_hash(constraint):

            

Reported by Pylint.

pipenv/vendor/distlib/locators.py
117 issues
Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

                  import dummy_threading as threading
import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              import zlib

from . import DistlibException
from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url,
                     queue, quote, unescape, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

                                   queue, quote, unescape, build_opener,
                     HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, ensure_slash, split_filename, get_project_data,
                   parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

                                   HTTPRedirectHandler as BaseRedirectHandler, text_type,
                     Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, ensure_slash, split_filename, get_project_data,
                   parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

                                   Request, HTTPError, URLError)
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
from .util import (cached_property, ensure_slash, split_filename, get_project_data,
                   parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 31 Column: 1

              from .util import (cached_property, ensure_slash, split_filename, get_project_data,
                   parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 32 Column: 1

                                 parse_requirement, parse_name_and_version, ServerProxy,
                   normalize_name)
from .version import get_scheme, UnsupportedVersionError
from .wheel import Wheel, is_compatible

logger = logging.getLogger(__name__)

HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)')
CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I)

            

Reported by Pylint.

Attribute '_scheme' defined outside __init__
Error

Line: 149 Column: 9

                      return self._scheme

    def _set_scheme(self, value):
        self._scheme = value

    scheme = property(_get_scheme, _set_scheme)

    def _get_project(self, name):
        """

            

Reported by Pylint.

Unused variable 'e'
Error

Line: 275 Column: 13

                                          'python-version': ', '.join(
                                ['.'.join(list(v[2:])) for v in wheel.pyver]),
                        }
            except Exception as e:  # pragma: no cover
                logger.warning('invalid path for wheel: %s', path)
        elif not path.endswith(self.downloadable_extensions):  # pragma: no cover
            logger.debug('Not downloadable: %s', path)
        else:  # downloadable extension
            path = filename = posixpath.basename(path)

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 275 Column: 20

                                          'python-version': ', '.join(
                                ['.'.join(list(v[2:])) for v in wheel.pyver]),
                        }
            except Exception as e:  # pragma: no cover
                logger.warning('invalid path for wheel: %s', path)
        elif not path.endswith(self.downloadable_extensions):  # pragma: no cover
            logger.debug('Not downloadable: %s', path)
        else:  # downloadable extension
            path = filename = posixpath.basename(path)

            

Reported by Pylint.

pipenv/cli/options.py
116 issues
Attempted relative import beyond top-level package
Error

Line: 23 Column: 9

                  """Custom Group class provides formatted main help"""

    def get_help_option(self, ctx):
        from ..core import format_help

        """Override for showing formatted main help via --help and -h options"""
        help_options = self.get_help_option_names(ctx)
        if not help_options or not self.add_help_option:
            return

            

Reported by Pylint.

String statement has no effect
Error

Line: 25 Column: 9

                  def get_help_option(self, ctx):
        from ..core import format_help

        """Override for showing formatted main help via --help and -h options"""
        help_options = self.get_help_option_names(ctx)
        if not help_options or not self.add_help_option:
            return

        def show_help(ctx, param, value):

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 30 Column: 28

                      if not help_options or not self.add_help_option:
            return

        def show_help(ctx, param, value):
            if value and not ctx.resilient_parsing:
                if not ctx.invoked_subcommand:
                    # legit main help
                    echo(format_help(ctx.get_help()))
                else:

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 95 Column: 23

              

def index_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.index = value
        return value
    return option('-i', '--index', expose_value=False, envvar="PIP_INDEX_URL",
                  help='Target PyPI-compatible package index url.', nargs=1,

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 105 Column: 23

              

def extra_index_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.extra_index_urls.extend(list(value))
        return value
    return option("--extra-index-url", multiple=True, expose_value=False,
                  help="URLs to the extra PyPI compatible indexes to query for package look-ups.",

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 115 Column: 23

              

def editable_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.installstate.editables.extend(value)
        return value
    return option('-e', '--editable', expose_value=False, multiple=True,
                  callback=callback, type=click_types.STRING, help=(

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 127 Column: 23

              

def sequential_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.installstate.sequential = value
        return value
    return option("--sequential", is_flag=True, default=False, expose_value=False,
                  help="Install dependencies one-at-a-time, instead of concurrently.",

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 137 Column: 23

              

def skip_lock_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.installstate.skip_lock = value
        return value
    return option("--skip-lock", is_flag=True, default=False, expose_value=False,
                  help="Skip locking mechanisms and use the Pipfile instead during operation.",

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 148 Column: 23

              

def keep_outdated_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.installstate.keep_outdated = value
        return value
    return option("--keep-outdated", is_flag=True, default=False, expose_value=False,
                  help="Keep out-dated dependencies from being updated in Pipfile.lock.",

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 158 Column: 23

              

def selective_upgrade_option(f):
    def callback(ctx, param, value):
        state = ctx.ensure_object(State)
        state.installstate.selective_upgrade = value
        return value
    return option("--selective-upgrade", is_flag=True, default=False, type=click_types.BOOL,
                  help="Update specified packages.", callback=callback,

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/html5lib/treebuilders/etree_lxml.py
109 issues
Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              import re
import sys

from . import base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import _ihatexml


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              import sys

from . import base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import _ihatexml

import lxml.etree as etree

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              
from . import base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import _ihatexml

import lxml.etree as etree


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              from . import base
from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import _ihatexml

import lxml.etree as etree



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 23 Column: 1

              from ..constants import DataLossWarning
from .. import constants
from . import etree as etree_builders
from .. import _ihatexml

import lxml.etree as etree


fullTree = True

            

Reported by Pylint.

Unable to import 'lxml.etree'
Error

Line: 25 Column: 1

              from . import etree as etree_builders
from .. import _ihatexml

import lxml.etree as etree


fullTree = True
tag_regexp = re.compile("{([^}]*)}(.*)")


            

Reported by Pylint.

Redefining name 'fullTree' from outer scope (line 28)
Error

Line: 183 Column: 47

                  fragmentClass = Document
    implementation = etree

    def __init__(self, namespaceHTMLElements, fullTree=False):
        builder = etree_builders.getETreeModule(etree, fullTree=fullTree)
        infosetFilter = self.infosetFilter = _ihatexml.InfosetFilter(preventDoubleDashComments=True)
        self.namespaceHTMLElements = namespaceHTMLElements

        class Attributes(dict):

            

Reported by Pylint.

Attribute '_name' defined outside __init__
Error

Line: 216 Column: 17

                              self._attributes = Attributes(self)

            def _setName(self, name):
                self._name = infosetFilter.coerceElement(name)
                self._element.tag = self._getETreeTag(
                    self._name, self._namespace)

            def _getName(self):
                return infosetFilter.fromXmlName(self._name)

            

Reported by Pylint.

Attribute 'insertComment' defined outside __init__
Error

Line: 261 Column: 9

              
    def reset(self):
        base.TreeBuilder.reset(self)
        self.insertComment = self.insertCommentInitial
        self.initial_comments = []
        self.doctype = None

    def testSerializer(self, element):
        return testSerializer(element)

            

Reported by Pylint.

Attribute 'initial_comments' defined outside __init__
Error

Line: 262 Column: 9

                  def reset(self):
        base.TreeBuilder.reset(self)
        self.insertComment = self.insertCommentInitial
        self.initial_comments = []
        self.doctype = None

    def testSerializer(self, element):
        return testSerializer(element)


            

Reported by Pylint.

pipenv/environment.py
108 issues
Unable to import 'pip_shims.shims'
Error

Line: 29 Column: 5

                      ContextManager, Dict, Generator, List, Optional, Set, Union
    )

    import pip_shims.shims
    import tomlkit

    from pipenv.project import Project, TPipfile, TSource
    from pipenv.vendor.packaging.version import Version


            

Reported by Pylint.

Unable to import 'tomlkit'
Error

Line: 30 Column: 5

                  )

    import pip_shims.shims
    import tomlkit

    from pipenv.project import Project, TPipfile, TSource
    from pipenv.vendor.packaging.version import Version

BASE_WORKING_SET = pkg_resources.WorkingSet(sys.path)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 291 Column: 9

                      :rtype: list
        """

        from .vendor.vistir.compat import JSONDecodeError
        current_executable = vistir.compat.Path(sys.executable).as_posix()
        if not self.python or self.python == current_executable:
            return sys.path
        elif any([sys.prefix == self.prefix, not self.is_venv]):
            return sys.path

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 503 Column: 9

                      Get the pip version in the environment.  Useful for knowing which args we can use
        when installing.
        """
        from .vendor.packaging.version import parse as parse_version
        pip = next(iter(
            pkg for pkg in self.get_installed_packages() if pkg.key == "pip"
        ), None)
        if pip is not None:
            return parse_version(pip.version)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 574 Column: 9

                  def dist_is_in_project(self, dist):
        # type: (pkg_resources.Distribution) -> bool
        """Determine whether the supplied distribution is in the environment."""
        from .environments import normalize_pipfile_path as _normalized
        prefixes = [
            _normalized(prefix) for prefix in self.base_paths["libdirs"].split(os.pathsep)
            if _normalized(prefix).startswith(_normalized(self.prefix.as_posix()))
        ]
        location = self.locate_dist(dist)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 598 Column: 9

                  @contextlib.contextmanager
    def get_finder(self, pre=False):
        # type: (bool) -> ContextManager[pip_shims.shims.PackageFinder]
        from .vendor.pip_shims.shims import InstallCommand, get_package_finder

        pip_command = InstallCommand()
        pip_args = self._modules["pipenv"].utils.prepare_pip_source_args(self.sources)
        pip_options, _ = pip_command.parser.parse_args(pip_args)
        pip_options.cache_dir = self.project.s.PIPENV_CACHE_DIR

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 611 Column: 9

              
    def get_package_info(self, pre=False):
        # type: (bool) -> Generator[pkg_resources.Distribution, None, None]
        from .vendor.pip_shims.shims import parse_version, pip_version
        dependency_links = []
        packages = self.get_installed_packages()
        # This code is borrowed from pip's current implementation
        if parse_version(pip_version) < parse_version("19.0"):
            for dist in packages:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 680 Column: 9

                      return d

    def get_package_requirements(self, pkg=None):
        from .vendor.pipdeptree import PackageDAG, flatten

        packages = self.get_installed_packages()
        if pkg:
            packages = [p for p in packages if p.key == pkg]


            

Reported by Pylint.

Unable to import 'vistir.misc'
Error

Line: 711 Column: 9

                      yield new_node

    def reverse_dependencies(self):
        from vistir.misc import chunked, unnest
        rdeps = {}
        for req in self.get_package_requirements():
            for d in self.reverse_dependency(req):
                parents = None
                name = d["package_name"]

            

Reported by Pylint.

Instance of 'Environment' has no '_which' member; maybe 'which'?
Error

Line: 919 Column: 22

                      find = operator.methodcaller("which", search)
        result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
        if not result:
            result = self._which(search)
        else:
            if as_path:
                result = str(result.path)
        return result


            

Reported by Pylint.

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

Line: 14 Column: 1

              from typing import Tuple
from typing import Union

from ._compat import chr
from ._compat import decode
from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              from typing import Union

from ._compat import chr
from ._compat import decode
from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              
from ._compat import chr
from ._compat import decode
from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              from ._compat import chr
from ._compat import decode
from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              from ._compat import decode
from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              from ._utils import RFC_3339_LOOSE
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError
from .exceptions import InvalidControlChar

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError
from .exceptions import InvalidControlChar
from .exceptions import InvalidDateError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              from ._utils import parse_rfc3339
from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError
from .exceptions import InvalidControlChar
from .exceptions import InvalidDateError
from .exceptions import InvalidDateTimeError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              from .container import Container
from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError
from .exceptions import InvalidControlChar
from .exceptions import InvalidDateError
from .exceptions import InvalidDateTimeError
from .exceptions import InvalidNumberError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 23 Column: 1

              from .exceptions import EmptyKeyError
from .exceptions import EmptyTableNameError
from .exceptions import InternalParserError
from .exceptions import InvalidCharInStringError
from .exceptions import InvalidControlChar
from .exceptions import InvalidDateError
from .exceptions import InvalidDateTimeError
from .exceptions import InvalidNumberError
from .exceptions import InvalidTimeError

            

Reported by Pylint.

pipenv/vendor/toml/decoder.py
107 issues
Undefined variable 'xrange'
Error

Line: 10 Column: 14

              from toml.tz import TomlTz

if sys.version_info < (3,):
    _range = xrange  # noqa: F821
else:
    unicode = str
    _range = range
    basestring = str
    unichr = chr

            

Reported by Pylint.

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

Line: 158 Column: 13

                      try:
            return loads(f.read(), _dict, decoder)
        except AttributeError:
            raise TypeError("You can only load a file descriptor, filename or "
                            "list")


_groupname_re = re.compile(r'^[A-Za-z0-9_-]+$')


            

Reported by Pylint.

Unused variable 'vtype'
Error

Line: 395 Column: 28

                                        line[-3] == multilinestr[0])
            if closed:
                try:
                    value, vtype = decoder.load_value(multilinestr)
                except ValueError as err:
                    raise TomlDecodeError(str(err), original, pos)
                currentlevel[multikey] = value
                multikey = None
                multilinestr = ""

            

Reported by Pylint.

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

Line: 397 Column: 21

                              try:
                    value, vtype = decoder.load_value(multilinestr)
                except ValueError as err:
                    raise TomlDecodeError(str(err), original, pos)
                currentlevel[multikey] = value
                multikey = None
                multilinestr = ""
            else:
                k = len(multilinestr) - 1

            

Reported by Pylint.

Access to a protected member _get_split_on_quotes of a client class
Error

Line: 424 Column: 27

                              line = line[1:]
                splitstr = ']'
            i = 1
            quotesplits = decoder._get_split_on_quotes(line)
            quoted = False
            for quotesplit in quotesplits:
                if not quoted and splitstr in quotesplit:
                    break
                i += quotesplit.count(splitstr)

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 466 Column: 21

                                  raise TomlDecodeError("Can't have a keygroup with an empty "
                                          "name", original, pos)
                try:
                    currentlevel[group]
                    if i == len(groups) - 1:
                        if group in implicitgroups:
                            implicitgroups.remove(group)
                            if arrayoftables:
                                raise TomlDecodeError("An implicitly defined "

            

Reported by Pylint.

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

Line: 508 Column: 17

                              decoder.load_inline_object(line, currentlevel, multikey,
                                           multibackslash)
            except ValueError as err:
                raise TomlDecodeError(str(err), original, pos)
        elif "=" in line:
            try:
                ret = decoder.load_line(line, currentlevel, multikey,
                                        multibackslash)
            except ValueError as err:

            

Reported by Pylint.

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

Line: 514 Column: 17

                              ret = decoder.load_line(line, currentlevel, multikey,
                                        multibackslash)
            except ValueError as err:
                raise TomlDecodeError(str(err), original, pos)
            if ret is not None:
                multikey, multilinestr, multibackslash = ret
    return retval



            

Reported by Pylint.

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

Line: 665 Column: 17

                          try:
                _, value = candidate_group.split('=', 1)
            except ValueError:
                raise ValueError("Invalid inline table encountered")
            value = value.strip()
            if ((value[0] == value[-1] and value[0] in ('"', "'")) or (
                    value[0] in '-0123456789' or
                    value in ('true', 'false') or
                    (value[0] == "[" and value[-1] == "]") or

            

Reported by Pylint.

Unused variable 'vtype'
Error

Line: 778 Column: 20

                              multilinestr = pair[1] + "\n"
            multikey = pair[0]
        else:
            value, vtype = self.load_value(pair[1], strictly_valid)
        try:
            currentlevel[pair[0]]
            raise ValueError("Duplicate keys!")
        except TypeError:
            raise ValueError("Duplicate keys!")

            

Reported by Pylint.