The following issues were found

pipenv/vendor/urllib3/util/ssltransport.py
32 issues
No name 'six' in module 'urllib3.packages'
Error

Line: 6 Column: 1

              import ssl

from urllib3.exceptions import ProxySchemeUnsupported
from urllib3.packages import six

SSL_BLOCKSIZE = 16384


class SSLTransport:

            

Reported by Pylint.

Redefining name 'socket' from outer scope (line 2)
Error

Line: 45 Column: 15

                              )

    def __init__(
        self, socket, ssl_context, server_hostname=None, suppress_ragged_eofs=True
    ):
        """
        Create an SSLTransport around socket using the provided ssl_context.
        """
        self.incoming = ssl.MemoryBIO()

            

Reported by Pylint.

Redefining built-in 'len'
Error

Line: 72 Column: 20

                  def fileno(self):
        return self.socket.fileno()

    def read(self, len=1024, buffer=None):
        return self._wrap_ssl_read(len, buffer)

    def recv(self, len=1024, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to recv")

            

Reported by Pylint.

Redefining built-in 'len'
Error

Line: 75 Column: 20

                  def read(self, len=1024, buffer=None):
        return self._wrap_ssl_read(len, buffer)

    def recv(self, len=1024, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to recv")
        return self._wrap_ssl_read(len)

    def recv_into(self, buffer, nbytes=None, flags=0):

            

Reported by Pylint.

Access to a protected member _decref_socketios of a client class
Error

Line: 184 Column: 9

                      return self.socket.gettimeout()

    def _decref_socketios(self):
        self.socket._decref_socketios()

    def _wrap_ssl_read(self, len, buffer=None):
        try:
            return self._ssl_io_loop(self.sslobj.read, len, buffer)
        except ssl.SSLError as e:

            

Reported by Pylint.

Redefining built-in 'len'
Error

Line: 186 Column: 30

                  def _decref_socketios(self):
        self.socket._decref_socketios()

    def _wrap_ssl_read(self, len, buffer=None):
        try:
            return self._ssl_io_loop(self.sslobj.read, len, buffer)
        except ssl.SSLError as e:
            if e.errno == ssl.SSL_ERROR_EOF and self.suppress_ragged_eofs:
                return 0  # eof, return 0.

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import io
import socket
import ssl

from urllib3.exceptions import ProxySchemeUnsupported
from urllib3.packages import six

SSL_BLOCKSIZE = 16384


            

Reported by Pylint.

Unnecessary "else" after "raise"
Error

Line: 33 Column: 13

                      """

        if not hasattr(ssl_context, "wrap_bio"):
            if six.PY2:
                raise ProxySchemeUnsupported(
                    "TLS in TLS requires SSLContext.wrap_bio() which isn't "
                    "supported on Python 2"
                )
            else:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 69 Column: 5

                  def __exit__(self, *_):
        self.close()

    def fileno(self):
        return self.socket.fileno()

    def read(self, len=1024, buffer=None):
        return self._wrap_ssl_read(len, buffer)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 72 Column: 5

                  def fileno(self):
        return self.socket.fileno()

    def read(self, len=1024, buffer=None):
        return self._wrap_ssl_read(len, buffer)

    def recv(self, len=1024, flags=0):
        if flags != 0:
            raise ValueError("non-zero flags not allowed in calls to recv")

            

Reported by Pylint.

pipenv/vendor/click/decorators.py
32 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              from functools import update_wrapper
from gettext import gettext as _

from .core import Argument
from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              from gettext import gettext as _

from .core import Argument
from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from .core import Argument
from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              from .core import Argument
from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo

F = t.TypeVar("F", bound=t.Callable[..., t.Any])

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo

F = t.TypeVar("F", bound=t.Callable[..., t.Any])
FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              from .core import Group
from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo

F = t.TypeVar("F", bound=t.Callable[..., t.Any])
FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 14 Column: 1

              from .core import Option
from .core import Parameter
from .globals import get_current_context
from .utils import echo

F = t.TypeVar("F", bound=t.Callable[..., t.Any])
FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)



            

Reported by Pylint.

Redefining built-in 'help'
Error

Line: 140 Column: 5

                  except AttributeError:
        params = []

    help = attrs.get("help")

    if help is None:
        help = inspect.getdoc(f)
    else:
        help = inspect.cleandoc(help)

            

Reported by Pylint.

Unused argument 'param'
Error

Line: 262 Column: 32

                  :param kwargs: Extra arguments are passed to :func:`option`.
    """

    def callback(ctx: Context, param: Parameter, value: bool) -> None:
        if not value:
            ctx.abort()

    if not param_decls:
        param_decls = ("--yes",)

            

Reported by Pylint.

pipenv/vendor/packaging/version.py
32 issues
Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union

from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType

__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]

InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

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

import collections
import itertools
import re
import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union

            

Reported by Pylint.

Missing class docstring
Error

Line: 106 Column: 1

                      return self._key != other._key


class LegacyVersion(_BaseVersion):
    def __init__(self, version: str) -> None:
        self._version = str(version)
        self._key = _legacy_cmpkey(self._version)

        warnings.warn(

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 124 Column: 5

                      return f"<LegacyVersion('{self}')>"

    @property
    def public(self) -> str:
        return self._version

    @property
    def base_version(self) -> str:
        return self._version

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 128 Column: 5

                      return self._version

    @property
    def base_version(self) -> str:
        return self._version

    @property
    def epoch(self) -> int:
        return -1

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 132 Column: 5

                      return self._version

    @property
    def epoch(self) -> int:
        return -1

    @property
    def release(self) -> None:
        return None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 136 Column: 5

                      return -1

    @property
    def release(self) -> None:
        return None

    @property
    def pre(self) -> None:
        return None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 140 Column: 5

                      return None

    @property
    def pre(self) -> None:
        return None

    @property
    def post(self) -> None:
        return None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 144 Column: 5

                      return None

    @property
    def post(self) -> None:
        return None

    @property
    def dev(self) -> None:
        return None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 148 Column: 5

                      return None

    @property
    def dev(self) -> None:
        return None

    @property
    def local(self) -> None:
        return None

            

Reported by Pylint.

pipenv/vendor/urllib3/util/ssl_.py
32 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256

from ..exceptions import (
    InsecurePlatformWarning,
    ProxySchemeUnsupported,
    SNIMissingWarning,
    SSLError,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

                  SNIMissingWarning,
    SSLError,
)
from ..packages import six
from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE

SSLContext = None
SSLTransport = None
HAS_SNI = False

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

                  SSLError,
)
from ..packages import six
from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE

SSLContext = None
SSLTransport = None
HAS_SNI = False
IS_PYOPENSSL = False

            

Reported by Pylint.

class already defined line 19
Error

Line: 133 Column: 5

                  from ssl import SSLContext  # Modern SSL?
except ImportError:

    class SSLContext(object):  # Platform-specific: Python 2
        def __init__(self, protocol_version):
            self.protocol = protocol_version
            # Use default values from a real SSLContext
            self.check_hostname = False
            self.verify_mode = ssl.CERT_NONE

            

Reported by Pylint.

Unused argument 'server_hostname'
Error

Line: 161 Column: 39

                      def set_ciphers(self, cipher_suite):
            self.ciphers = cipher_suite

        def wrap_socket(self, socket, server_hostname=None, server_side=False):
            warnings.warn(
                "A true SSLContext object is not available. This prevents "
                "urllib3 from configuring SSL appropriately and may cause "
                "certain SSL connections to fail. You can upgrade to a newer "
                "version of Python to solve this. For more information, see "

            

Reported by Pylint.

Using deprecated method wrap_socket()
Error

Line: 179 Column: 20

                              "ssl_version": self.protocol,
                "server_side": server_side,
            }
            return wrap_socket(socket, ciphers=self.ciphers, **kwargs)


def assert_fingerprint(cert, fingerprint):
    """
    Checks if given fingerprint matches the supplied certificate.

            

Reported by Pylint.

Attribute 'post_handshake_auth' defined outside __init__
Error

Line: 323 Column: 9

                  if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(
        context, "post_handshake_auth", None
    ) is not None:
        context.post_handshake_auth = True

    def disable_check_hostname():
        if (
            getattr(context, "check_hostname", None) is not None
        ):  # Platform-specific: Python 3.2

            

Reported by Pylint.

Attribute 'keylog_filename' defined outside __init__
Error

Line: 350 Column: 13

                  if hasattr(context, "keylog_filename"):
        sslkeylogfile = os.environ.get("SSLKEYLOGFILE")
        if sslkeylogfile:
            context.keylog_filename = sslkeylogfile

    return context


def ssl_wrap_socket(

            

Reported by Pylint.

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

Line: 404 Column: 13

                      try:
            context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
        except (IOError, OSError) as e:
            raise SSLError(e)

    elif ssl_context is None and hasattr(context, "load_default_certs"):
        # try to load OS default certs; works well on Windows (require Python3.4+)
        context.load_default_certs()


            

Reported by Pylint.

Access to a protected member _validate_ssl_context_for_tls_in_tls of a client class
Error

Line: 489 Column: 9

                              "TLS in TLS requires support for the 'ssl' module"
            )

        SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context)
        return SSLTransport(sock, ssl_context, server_hostname)

    if server_hostname:
        return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
    else:

            

Reported by Pylint.

pipenv/vendor/pexpect/popen_spawn.py
32 issues
Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              except ImportError:
    from Queue import Queue, Empty  # Python 2

from .spawnbase import SpawnBase, PY3
from .exceptions import EOF
from .utils import string_types

class PopenSpawn(SpawnBase):
    def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

                  from Queue import Queue, Empty  # Python 2

from .spawnbase import SpawnBase, PY3
from .exceptions import EOF
from .utils import string_types

class PopenSpawn(SpawnBase):
    def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None,
                 logfile=None, cwd=None, env=None, encoding=None,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              
from .spawnbase import SpawnBase, PY3
from .exceptions import EOF
from .utils import string_types

class PopenSpawn(SpawnBase):
    def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None,
                 logfile=None, cwd=None, env=None, encoding=None,
                 codec_errors='strict', preexec_fn=None):

            

Reported by Pylint.

Module 'signal' has no 'CTRL_C_EVENT' member
Error

Line: 177 Column: 39

                      Use constants from the :mod:`signal` module to specify which signal.
        '''
        if sys.platform == 'win32':
            if sig in [signal.SIGINT, signal.CTRL_C_EVENT]:
                sig = signal.CTRL_C_EVENT
            elif sig in [signal.SIGBREAK, signal.CTRL_BREAK_EVENT]:
                sig = signal.CTRL_BREAK_EVENT
            else:
                sig = signal.SIGTERM

            

Reported by Pylint.

Module 'signal' has no 'CTRL_C_EVENT' member
Error

Line: 178 Column: 23

                      '''
        if sys.platform == 'win32':
            if sig in [signal.SIGINT, signal.CTRL_C_EVENT]:
                sig = signal.CTRL_C_EVENT
            elif sig in [signal.SIGBREAK, signal.CTRL_BREAK_EVENT]:
                sig = signal.CTRL_BREAK_EVENT
            else:
                sig = signal.SIGTERM


            

Reported by Pylint.

Module 'signal' has no 'CTRL_BREAK_EVENT' member
Error

Line: 179 Column: 43

                      if sys.platform == 'win32':
            if sig in [signal.SIGINT, signal.CTRL_C_EVENT]:
                sig = signal.CTRL_C_EVENT
            elif sig in [signal.SIGBREAK, signal.CTRL_BREAK_EVENT]:
                sig = signal.CTRL_BREAK_EVENT
            else:
                sig = signal.SIGTERM

        os.kill(self.proc.pid, sig)

            

Reported by Pylint.

Module 'signal' has no 'SIGBREAK' member
Error

Line: 179 Column: 26

                      if sys.platform == 'win32':
            if sig in [signal.SIGINT, signal.CTRL_C_EVENT]:
                sig = signal.CTRL_C_EVENT
            elif sig in [signal.SIGBREAK, signal.CTRL_BREAK_EVENT]:
                sig = signal.CTRL_BREAK_EVENT
            else:
                sig = signal.SIGTERM

        os.kill(self.proc.pid, sig)

            

Reported by Pylint.

Module 'signal' has no 'CTRL_BREAK_EVENT' member
Error

Line: 180 Column: 23

                          if sig in [signal.SIGINT, signal.CTRL_C_EVENT]:
                sig = signal.CTRL_C_EVENT
            elif sig in [signal.SIGBREAK, signal.CTRL_BREAK_EVENT]:
                sig = signal.CTRL_BREAK_EVENT
            else:
                sig = signal.SIGTERM

        os.kill(self.proc.pid, sig)


            

Reported by Pylint.

Attribute 'flag_eof' defined outside __init__
Error

Line: 74 Column: 17

                              self._buf = buf[size:]
                return buf[:size]
            else:
                self.flag_eof = True
                raise EOF('End Of File (EOF).')

        if timeout == -1:
            timeout = self.timeout
        elif timeout is None:

            

Reported by Pylint.

Attribute 'exitstatus' defined outside __init__
Error

Line: 163 Column: 13

                      '''
        status = self.proc.wait()
        if status >= 0:
            self.exitstatus = status
            self.signalstatus = None
        else:
            self.exitstatus = None
            self.signalstatus = -status
        self.terminated = True

            

Reported by Pylint.

tests/integration/test_windows.py
32 issues
Unable to import 'pytest'
Error

Line: 3 Column: 1

              import os

import pytest

from pipenv._compat import Path


# This module is run only on Windows.
pytestmark = pytest.mark.skipif(os.name != 'nt', reason="only relevant on windows")

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import os

import pytest

from pipenv._compat import Path


# This module is run only on Windows.
pytestmark = pytest.mark.skipif(os.name != 'nt', reason="only relevant on windows")

            

Reported by Pylint.

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

Line: 13 Column: 1

              

@pytest.mark.project
def test_case_changes_windows(PipenvInstance):
    """Test project matching for case changes on Windows.
    """
    with PipenvInstance(chdir=True) as p:
        c = p.pipenv('install pytz')
        assert c.returncode == 0

            

Reported by Pylint.

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

Line: 16 Column: 40

              def test_case_changes_windows(PipenvInstance):
    """Test project matching for case changes on Windows.
    """
    with PipenvInstance(chdir=True) as p:
        c = p.pipenv('install pytz')
        assert c.returncode == 0

        # Canonical venv location.
        c = p.pipenv('--venv')

            

Reported by Pylint.

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

Line: 17 Column: 9

                  """Test project matching for case changes on Windows.
    """
    with PipenvInstance(chdir=True) as p:
        c = p.pipenv('install pytz')
        assert c.returncode == 0

        # Canonical venv location.
        c = p.pipenv('--venv')
        assert c.returncode == 0

            

Reported by Pylint.

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

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

                  """
    with PipenvInstance(chdir=True) as p:
        c = p.pipenv('install pytz')
        assert c.returncode == 0

        # Canonical venv location.
        c = p.pipenv('--venv')
        assert c.returncode == 0
        virtualenv_location = c.stdout.strip()

            

Reported by Bandit.

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

Line: 21 Column: 9

                      assert c.returncode == 0

        # Canonical venv location.
        c = p.pipenv('--venv')
        assert c.returncode == 0
        virtualenv_location = c.stdout.strip()

        # Dance around to change the casing of the project directory.
        target = p.path.upper()

            

Reported by Pylint.

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

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

              
        # Canonical venv location.
        c = p.pipenv('--venv')
        assert c.returncode == 0
        virtualenv_location = c.stdout.strip()

        # Dance around to change the casing of the project directory.
        target = p.path.upper()
        if target == p.path:

            

Reported by Bandit.

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

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

                          target = p.path.lower()
        os.chdir('..')
        os.chdir(target)
        assert os.path.abspath(os.curdir) != p.path

        # Ensure the incorrectly-cased project can find the correct venv.
        c = p.pipenv('--venv')
        assert c.returncode == 0
        assert c.stdout.strip().lower() == virtualenv_location.lower()

            

Reported by Bandit.

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

Line: 34 Column: 9

                      assert os.path.abspath(os.curdir) != p.path

        # Ensure the incorrectly-cased project can find the correct venv.
        c = p.pipenv('--venv')
        assert c.returncode == 0
        assert c.stdout.strip().lower() == virtualenv_location.lower()


@pytest.mark.files

            

Reported by Pylint.

pipenv/patched/notpip/_internal/vcs/versioncontrol.py
31 issues
Unable to import 'pipenv.patched.notpip._vendor.six.moves.urllib'
Error

Line: 12 Column: 1

              import sys

from pipenv.patched.notpip._vendor import pkg_resources
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse

from pipenv.patched.notpip._internal.exceptions import BadCommand
from pipenv.patched.notpip._internal.utils.compat import samefile
from pipenv.patched.notpip._internal.utils.misc import (
    ask_path_exists,

            

Reported by Pylint.

No name 'urllib' in module '_MovedItems'
Error

Line: 12 Column: 1

              import sys

from pipenv.patched.notpip._vendor import pkg_resources
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse

from pipenv.patched.notpip._internal.exceptions import BadCommand
from pipenv.patched.notpip._internal.utils.compat import samefile
from pipenv.patched.notpip._internal.utils.misc import (
    ask_path_exists,

            

Reported by Pylint.

Unused argument 'location'
Error

Line: 284 Column: 31

                      return not remote_url.lower().startswith('{}:'.format(cls.name))

    @classmethod
    def get_subdirectory(cls, location):
        # type: (str) -> Optional[str]
        """
        Return the path to setup.py, relative to the repo root.
        Return None if setup.py is in the repo root.
        """

            

Reported by Pylint.

Unused argument 'url'
Error

Line: 339 Column: 41

                      """
        raise NotImplementedError

    def is_immutable_rev_checkout(self, url, dest):
        # type: (str, str) -> bool
        """
        Return true if the commit hash checked out at dest matches
        the revision in url.


            

Reported by Pylint.

Unused argument 'dest'
Error

Line: 339 Column: 46

                      """
        raise NotImplementedError

    def is_immutable_rev_checkout(self, url, dest):
        # type: (str, str) -> bool
        """
        Return true if the commit hash checked out at dest matches
        the revision in url.


            

Reported by Pylint.

Unused variable 'tail'
Error

Line: 372 Column: 16

                         posix absolute paths start with os.path.sep,
           win32 ones start with drive (like c:\\folder)
        """
        drive, tail = os.path.splitdrive(repo)
        return repo.startswith(os.path.sep) or bool(drive)

    def export(self, location, url):
        # type: (str, HiddenText) -> None
        """

            

Reported by Pylint.

Unused argument 'scheme'
Error

Line: 386 Column: 42

                      raise NotImplementedError

    @classmethod
    def get_netloc_and_auth(cls, netloc, scheme):
        # type: (str, str) -> Tuple[str, Tuple[Optional[str], Optional[str]]]
        """
        Parse the repository URL's netloc, and return the new netloc to use
        along with auth information.


            

Reported by Pylint.

Unused variable 'frag'
Error

Line: 414 Column: 38

              
        Returns: (url, rev, (username, password)).
        """
        scheme, netloc, path, query, frag = urllib_parse.urlsplit(url)
        if '+' not in scheme:
            raise ValueError(
                "Sorry, {!r} is a malformed VCS url. "
                "The format is <vcs>+<protocol>://<url>, "
                "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp".format(url)

            

Reported by Pylint.

Unused argument 'username'
Error

Line: 431 Column: 23

                      return url, rev, user_pass

    @staticmethod
    def make_rev_args(username, password):
        # type: (Optional[str], Optional[HiddenText]) -> CommandArgs
        """
        Return the RevOptions "extra arguments" to use in obtain().
        """
        return []

            

Reported by Pylint.

Unused argument 'password'
Error

Line: 431 Column: 33

                      return url, rev, user_pass

    @staticmethod
    def make_rev_args(username, password):
        # type: (Optional[str], Optional[HiddenText]) -> CommandArgs
        """
        Return the RevOptions "extra arguments" to use in obtain().
        """
        return []

            

Reported by Pylint.

pipenv/patched/notpip/_internal/req/req_uninstall.py
31 issues
No value for argument 'a' in function call
Error

Line: 133 Column: 33

              
    def norm_join(*a):
        # type: (str) -> str
        return os.path.normcase(os.path.join(*a))

    for root in unchecked:
        if any(os.path.normcase(root).startswith(w)
               for w in wildcards):
            # This directory has already been handled.

            

Reported by Pylint.

Access to a protected member _provider of a client class
Error

Line: 481 Column: 38

                          pkg_resources.to_filename(dist.project_name))
        egg_info_exists = dist.egg_info and os.path.exists(dist.egg_info)
        # Special case for distutils installed package
        distutils_egg_info = getattr(dist._provider, 'path', None)

        # Uninstall cases order do matter as in the case of 2 installs of the
        # same package, pip needs to uninstall the currently detected version
        if (egg_info_exists and dist.egg_info.endswith('.egg-info') and
                not dist.egg_info.endswith(develop_egg_link_egg_info)):

            

Reported by Pylint.

FIXME: need a test for this elif block
Error

Line: 497 Column: 3

                                      os.path.join(dist.egg_info, installed_file)
                    )
                    paths_to_remove.add(path)
            # FIXME: need a test for this elif block
            # occurs with --single-version-externally-managed/--record outside
            # of pip
            elif dist.has_metadata('top_level.txt'):
                if dist.has_metadata('namespace_packages.txt'):
                    namespaces = dist.get_metadata('namespace_packages.txt')

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import

import csv
import functools
import logging
import os
import sys
import sysconfig


            

Reported by Pylint.

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

Line: 61 Column: 1

                  return paths_to_remove


def _unique(fn):
    # type: (Callable[..., Iterator[Any]]) -> Callable[..., Iterator[Any]]
    @functools.wraps(fn)
    def unique(*args, **kw):
        # type: (Any, Any) -> Iterator[Any]
        seen = set()  # type: Set[Any]

            

Reported by Pylint.

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

Line: 85 Column: 5

              
    UninstallPathSet.add() takes care of the __pycache__ .py[co].
    """
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
    for row in r:
        path = os.path.join(dist.location, row[0])
        yield path
        if path.endswith('.py'):
            dn, fn = os.path.split(path)

            

Reported by Pylint.

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

Line: 90 Column: 13

                      path = os.path.join(dist.location, row[0])
        yield path
        if path.endswith('.py'):
            dn, fn = os.path.split(path)
            base = fn[:-3]
            path = os.path.join(dn, base + '.pyc')
            yield path
            path = os.path.join(dn, base + '.pyo')
            yield path

            

Reported by Pylint.

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

Line: 90 Column: 17

                      path = os.path.join(dist.location, row[0])
        yield path
        if path.endswith('.py'):
            dn, fn = os.path.split(path)
            base = fn[:-3]
            path = os.path.join(dn, base + '.pyc')
            yield path
            path = os.path.join(dn, base + '.pyo')
            yield path

            

Reported by Pylint.

Unnecessary parens after 'not' keyword
Error

Line: 151 Column: 1

                      # If all the files we found are in our remaining set of files to
        # remove, then remove them from the latter set and add a wildcard
        # for the directory.
        if not (all_files - remaining):
            remaining.difference_update(all_files)
            wildcards.add(root + os.sep)

    return set(map(case_map.__getitem__, remaining)) | wildcards


            

Reported by Pylint.

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

Line: 209 Column: 1

                  return will_remove, will_skip


class StashedUninstallPathSet(object):
    """A set of file rename operations to stash files while
    tentatively uninstalling them."""
    def __init__(self):
        # type: () -> None
        # Mapping from source file root to [Adjacent]TempDirectory

            

Reported by Pylint.

pipenv/vendor/attr/_funcs.py
31 issues
Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              
import copy

from ._compat import iteritems
from ._make import NOTHING, _obj_setattr, fields
from .exceptions import AttrsAttributeNotFoundError


def asdict(

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              import copy

from ._compat import iteritems
from ._make import NOTHING, _obj_setattr, fields
from .exceptions import AttrsAttributeNotFoundError


def asdict(
    inst,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              
from ._compat import iteritems
from ._make import NOTHING, _obj_setattr, fields
from .exceptions import AttrsAttributeNotFoundError


def asdict(
    inst,
    recurse=True,

            

Reported by Pylint.

Redefining built-in 'filter'
Error

Line: 13 Column: 5

              def asdict(
    inst,
    recurse=True,
    filter=None,
    dict_factory=dict,
    retain_collection_types=False,
    value_serializer=None,
):
    """

            

Reported by Pylint.

Redefining built-in 'filter'
Error

Line: 114 Column: 5

              
def _asdict_anything(
    val,
    filter,
    dict_factory,
    retain_collection_types,
    value_serializer,
):
    """

            

Reported by Pylint.

Redefining built-in 'filter'
Error

Line: 170 Column: 5

              def astuple(
    inst,
    recurse=True,
    filter=None,
    tuple_factory=tuple,
    retain_collection_types=False,
):
    """
    Return the ``attrs`` attribute values of *inst* as a tuple.

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import, division, print_function

import copy

from ._compat import iteritems
from ._make import NOTHING, _obj_setattr, fields
from .exceptions import AttrsAttributeNotFoundError



            

Reported by Pylint.

Too many arguments (6/5)
Error

Line: 10 Column: 1

              from .exceptions import AttrsAttributeNotFoundError


def asdict(
    inst,
    recurse=True,
    filter=None,
    dict_factory=dict,
    retain_collection_types=False,

            

Reported by Pylint.

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

Line: 51 Column: 5

                  ..  versionadded:: 20.3.0 *value_serializer*
    """
    attrs = fields(inst.__class__)
    rv = dict_factory()
    for a in attrs:
        v = getattr(inst, a.name)
        if filter is not None and not filter(a, v):
            continue


            

Reported by Pylint.

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

Line: 52 Column: 9

                  """
    attrs = fields(inst.__class__)
    rv = dict_factory()
    for a in attrs:
        v = getattr(inst, a.name)
        if filter is not None and not filter(a, v):
            continue

        if value_serializer is not None:

            

Reported by Pylint.

pipenv/vendor/click/_winconsole.py
31 issues
Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              from ctypes.wintypes import LPCWSTR
from ctypes.wintypes import LPWSTR

from ._compat import _NonClosingTextIOWrapper

assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

            

Reported by Pylint.

Unable to import 'msvcrt'
Error

Line: 31 Column: 1

              from ._compat import _NonClosingTextIOWrapper

assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)


            

Reported by Pylint.

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

Line: 106 Column: 5

              

class _WindowsConsoleRawIOBase(io.RawIOBase):
    def __init__(self, handle):
        self.handle = handle

    def isatty(self):
        super().isatty()
        return True

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 195 Column: 16

                          return self._text_stream.write(x)
        try:
            self.flush()
        except Exception:
            pass
        return self.buffer.write(x)

    def writelines(self, lines: t.Iterable[t.AnyStr]) -> None:
        for line in lines:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # This module is based on the excellent work by Adam Bartoš who
# provided a lot of what went into the implementation here in
# the discussion to issue1602 in the Python bug tracker.
#
# There are some general differences in regards to how this works
# compared to the original patches as we do not need to patch
# the entire interpreter but just work in our little world of
# echo and prompt.
import io

            

Reported by Pylint.

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

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

              
from ._compat import _NonClosingTextIOWrapper

assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)

            

Reported by Bandit.

standard import "import msvcrt" should be placed before "from ._compat import _NonClosingTextIOWrapper"
Error

Line: 31 Column: 1

              from ._compat import _NonClosingTextIOWrapper

assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)


            

Reported by Pylint.

Imports from package ctypes are not grouped
Error

Line: 32 Column: 1

              
assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)

kernel32 = windll.kernel32

            

Reported by Pylint.

standard import "from ctypes import windll" should be placed before "from ._compat import _NonClosingTextIOWrapper"
Error

Line: 32 Column: 1

              
assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)

kernel32 = windll.kernel32

            

Reported by Pylint.

standard import "from ctypes import WINFUNCTYPE" should be placed before "from ._compat import _NonClosingTextIOWrapper"
Error

Line: 33 Column: 1

              assert sys.platform == "win32"
import msvcrt  # noqa: E402
from ctypes import windll  # noqa: E402
from ctypes import WINFUNCTYPE  # noqa: E402

c_ssize_p = POINTER(c_ssize_t)

kernel32 = windll.kernel32
GetStdHandle = kernel32.GetStdHandle

            

Reported by Pylint.