The following issues were found

pipenv/patched/notpip/_vendor/cachecontrol/_cmd.py
6 issues
Missing module docstring
Error

Line: 1 Column: 1

              import logging

from pipenv.patched.notpip._vendor import requests

from pipenv.patched.notpip._vendor.cachecontrol.adapter import CacheControlAdapter
from pipenv.patched.notpip._vendor.cachecontrol.cache import DictCache
from pipenv.patched.notpip._vendor.cachecontrol.controller import logger

from argparse import ArgumentParser

            

Reported by Pylint.

standard import "from argparse import ArgumentParser" should be placed before "from pipenv.patched.notpip._vendor import requests"
Error

Line: 9 Column: 1

              from pipenv.patched.notpip._vendor.cachecontrol.cache import DictCache
from pipenv.patched.notpip._vendor.cachecontrol.controller import logger

from argparse import ArgumentParser


def setup_logging():
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 12 Column: 1

              from argparse import ArgumentParser


def setup_logging():
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler()
    logger.addHandler(handler)



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 18 Column: 1

                  logger.addHandler(handler)


def get_session():
    adapter = CacheControlAdapter(
        DictCache(), cache_etags=True, serializer=None, heuristic=None
    )
    sess = requests.Session()
    sess.mount("http://", adapter)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 30 Column: 1

                  return sess


def get_args():
    parser = ArgumentParser()
    parser.add_argument("url", help="The URL to try and cache")
    return parser.parse_args()



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 36 Column: 1

                  return parser.parse_args()


def main(args=None):
    args = get_args()
    sess = get_session()

    # Make a request to get a response
    resp = sess.get(args.url)

            

Reported by Pylint.

pipenv/vendor/click_didyoumean/__init__.py
5 issues
standard import "import difflib" should be placed before "import click"
Error

Line: 9 Column: 1

              """

import click
import difflib

__version__ = "0.0.3"


class DYMMixin(object):  # pylint: disable=too-few-public-methods

            

Reported by Pylint.

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

Line: 14 Column: 1

              __version__ = "0.0.3"


class DYMMixin(object):  # pylint: disable=too-few-public-methods
    """
    Mixin class for click MultiCommand inherited classes
    to provide git-like *did-you-mean* functionality when
    a certain command is not registered.
    """

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 23 Column: 9

                  def __init__(self, *args, **kwargs):
        self.max_suggestions = kwargs.pop("max_suggestions", 3)
        self.cutoff = kwargs.pop("cutoff", 0.5)
        super(DYMMixin, self).__init__(*args, **kwargs)

    def resolve_command(self, ctx, args):
        """
        Overrides clicks ``resolve_command`` method
        and appends *Did you mean ...* suggestions

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 34 Column: 20

                      original_cmd_name = click.utils.make_str(args[0])

        try:
            return super(DYMMixin, self).resolve_command(ctx, args)
        except click.exceptions.UsageError as error:
            error_msg = str(error)
            matches = difflib.get_close_matches(original_cmd_name,
                                                self.list_commands(ctx), self.max_suggestions, self.cutoff)
            if matches:

            

Reported by Pylint.

Line too long (107/100)
Error

Line: 38 Column: 1

                      except click.exceptions.UsageError as error:
            error_msg = str(error)
            matches = difflib.get_close_matches(original_cmd_name,
                                                self.list_commands(ctx), self.max_suggestions, self.cutoff)
            if matches:
                error_msg += '\n\nDid you mean one of these?\n    %s' % '\n    '.join(matches)  # pylint: disable=line-too-long

            raise click.exceptions.UsageError(error_msg, error.ctx)


            

Reported by Pylint.

pipenv/vendor/ptyprocess/_fork_pty.py
5 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import errno

from pty import (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO, CHILD)
from .util import PtyProcessError

def fork_pty():
    '''This implements a substitute for the forkpty system call. This
    should be more portable than the pty.fork() function. Specifically,
    this should work on Solaris.

            

Reported by Pylint.

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

Line: 54 Column: 9

                  # if there was no controlling tty to begin with, such as when
    # executed by a cron(1) job.
    try:
        fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY)
        os.close(fd)
    except OSError as err:
        if err.errno != errno.ENXIO:
            raise


            

Reported by Pylint.

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

Line: 65 Column: 9

                  # Verify we are disconnected from controlling tty by attempting to open
    # it again.  We expect that OSError of ENXIO should always be raised.
    try:
        fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY)
        os.close(fd)
        raise PtyProcessError("OSError of errno.ENXIO should be raised.")
    except OSError as err:
        if err.errno != errno.ENXIO:
            raise

            

Reported by Pylint.

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

Line: 73 Column: 5

                          raise

    # Verify we can open child pty.
    fd = os.open(child_name, os.O_RDWR)
    os.close(fd)

    # Verify we now have a controlling tty.
    fd = os.open("/dev/tty", os.O_WRONLY)
    os.close(fd)

            

Reported by Pylint.

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

Line: 77 Column: 5

                  os.close(fd)

    # Verify we now have a controlling tty.
    fd = os.open("/dev/tty", os.O_WRONLY)
    os.close(fd)

            

Reported by Pylint.

pipenv/vendor/toml/ordered.py
5 issues
Bad first argument 'self.__class__' given to super()
Error

Line: 9 Column: 9

              class TomlOrderedDecoder(TomlDecoder):

    def __init__(self):
        super(self.__class__, self).__init__(_dict=OrderedDict)


class TomlOrderedEncoder(TomlEncoder):

    def __init__(self):

            

Reported by Pylint.

Bad first argument 'self.__class__' given to super()
Error

Line: 15 Column: 9

              class TomlOrderedEncoder(TomlEncoder):

    def __init__(self):
        super(self.__class__, self).__init__(_dict=OrderedDict)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from collections import OrderedDict
from toml import TomlEncoder
from toml import TomlDecoder


class TomlOrderedDecoder(TomlDecoder):

    def __init__(self):
        super(self.__class__, self).__init__(_dict=OrderedDict)

            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              from toml import TomlDecoder


class TomlOrderedDecoder(TomlDecoder):

    def __init__(self):
        super(self.__class__, self).__init__(_dict=OrderedDict)



            

Reported by Pylint.

Missing class docstring
Error

Line: 12 Column: 1

                      super(self.__class__, self).__init__(_dict=OrderedDict)


class TomlOrderedEncoder(TomlEncoder):

    def __init__(self):
        super(self.__class__, self).__init__(_dict=OrderedDict)

            

Reported by Pylint.

pipenv/vendor/click/_textwrap.py
5 issues
Missing module docstring
Error

Line: 1 Column: 1

              import textwrap
import typing as t
from contextlib import contextmanager


class TextWrapper(textwrap.TextWrapper):
    def _handle_long_word(
        self,
        reversed_chunks: t.List[str],

            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              from contextlib import contextmanager


class TextWrapper(textwrap.TextWrapper):
    def _handle_long_word(
        self,
        reversed_chunks: t.List[str],
        cur_line: t.List[str],
        cur_len: int,

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 26 Column: 5

                          cur_line.append(reversed_chunks.pop())

    @contextmanager
    def extra_indent(self, indent: str) -> t.Iterator[None]:
        old_initial_indent = self.initial_indent
        old_subsequent_indent = self.subsequent_indent
        self.initial_indent += indent
        self.subsequent_indent += indent


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 38 Column: 5

                          self.initial_indent = old_initial_indent
            self.subsequent_indent = old_subsequent_indent

    def indent_only(self, text: str) -> str:
        rv = []

        for idx, line in enumerate(text.splitlines()):
            indent = self.initial_indent


            

Reported by Pylint.

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

Line: 39 Column: 9

                          self.subsequent_indent = old_subsequent_indent

    def indent_only(self, text: str) -> str:
        rv = []

        for idx, line in enumerate(text.splitlines()):
            indent = self.initial_indent

            if idx > 0:

            

Reported by Pylint.

pipenv/patched/notpip/_internal/models/format_control.py
5 issues
Missing module docstring
Error

Line: 1 Column: 1

              # The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from pipenv.patched.notpip._vendor.packaging.utils import canonicalize_name

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

if MYPY_CHECK_RUNNING:

            

Reported by Pylint.

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

Line: 13 Column: 1

                  from typing import Optional, Set, FrozenSet


class FormatControl(object):
    """Helper for managing formats from which a package can be installed.
    """

    def __init__(self, no_binary=None, only_binary=None):
        # type: (Optional[Set[str]], Optional[Set[str]]) -> None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 44 Column: 5

                      )

    @staticmethod
    def handle_mutual_excludes(value, target, other):
        # type: (str, Optional[Set[str]], Optional[Set[str]]) -> None
        if value.startswith('-'):
            raise CommandError(
                "--no-binary / --only-binary option requires 1 argument."
            )

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 67 Column: 5

                          other.discard(name)
            target.add(name)

    def get_allowed_formats(self, canonical_name):
        # type: (str) -> FrozenSet[str]
        result = {"binary", "source"}
        if canonical_name in self.only_binary:
            result.discard('source')
        elif canonical_name in self.no_binary:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 80 Column: 5

                          result.discard('binary')
        return frozenset(result)

    def disallow_binaries(self):
        # type: () -> None
        self.handle_mutual_excludes(
            ':all:', self.no_binary, self.only_binary,
        )

            

Reported by Pylint.

pipenv/vendor/shellingham/posix/__init__.py
5 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              import os
import re

from .._core import SHELL_NAMES, ShellDetectionFailure
from . import proc, ps


def _get_process_mapping():
    """Select a way to obtain process information from the system.

            

Reported by Pylint.

Module import itself
Error

Line: 5 Column: 1

              import re

from .._core import SHELL_NAMES, ShellDetectionFailure
from . import proc, ps


def _get_process_mapping():
    """Select a way to obtain process information from the system.


            

Reported by Pylint.

Module import itself
Error

Line: 5 Column: 1

              import re

from .._core import SHELL_NAMES, ShellDetectionFailure
from . import proc, ps


def _get_process_mapping():
    """Select a way to obtain process information from the system.


            

Reported by Pylint.

Redefining name 'proc' from outer scope (line 5)
Error

Line: 27 Column: 13

                  """Traverse up the tree and yield each process's argument list."""
    for _ in range(max_depth):
        try:
            proc = mapping[pid]
        except KeyError:  # We've reached the root process. Give up.
            break
        if proc.args:  # Persumably the process should always have a name?
            yield proc.args
        pid = proc.ppid  # Go up one level.

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import os
import re

from .._core import SHELL_NAMES, ShellDetectionFailure
from . import proc, ps


def _get_process_mapping():
    """Select a way to obtain process information from the system.

            

Reported by Pylint.

pipenv/vendor/chardet/langthaimodel.py
5 issues
No name 'SingleByteCharSetModel' in module 'chardet.sbcharsetprober'
Error

Line: 4 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Too many lines in module (4383/1000)
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Line too long (143/100)
Error

Line: 4382 Column: 1

                                                          language_model=THAI_LANG_MODEL,
                                            typical_positive_ratio=0.926386,
                                            keep_ascii_letters=False,
                                            alphabet='กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛')


            

Reported by Pylint.

Trailing newlines
Error

Line: 4383 Column: 1

                                                          typical_positive_ratio=0.926386,
                                            keep_ascii_letters=False,
                                            alphabet='กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛')


            

Reported by Pylint.

pipenv/vendor/chardet/langhebrewmodel.py
5 issues
No name 'SingleByteCharSetModel' in module 'chardet.sbcharsetprober'
Error

Line: 4 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Too many lines in module (4383/1000)
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

from chardet.sbcharsetprober import SingleByteCharSetModel


# 3: Positive
# 2: Likely
# 1: Unlikely

            

Reported by Pylint.

Line too long (103/100)
Error

Line: 4378 Column: 1

              
WINDOWS_1255_HEBREW_MODEL = SingleByteCharSetModel(charset_name='windows-1255',
                                                   language='Hebrew',
                                                   char_to_order_map=WINDOWS_1255_HEBREW_CHAR_TO_ORDER,
                                                   language_model=HEBREW_LANG_MODEL,
                                                   typical_positive_ratio=0.984004,
                                                   keep_ascii_letters=False,
                                                   alphabet='אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ')


            

Reported by Pylint.

Trailing newlines
Error

Line: 4383 Column: 1

                                                                 typical_positive_ratio=0.984004,
                                                   keep_ascii_letters=False,
                                                   alphabet='אבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ')


            

Reported by Pylint.

pipenv/vendor/shellingham/__init__.py
5 issues
Unable to import '__init__._core'
Error

Line: 4 Column: 1

              import importlib
import os

from ._core import ShellDetectionFailure


__version__ = "1.4.0"



            

Reported by Pylint.

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

Line: 16 Column: 9

                      impl = importlib.import_module(".{}".format(name), __name__)
    except ImportError:
        message = "Shell detection not implemented for {0!r}".format(name)
        raise RuntimeError(message)
    try:
        get_shell = impl.get_shell
    except AttributeError:
        raise RuntimeError("get_shell not implemented for {0!r}".format(name))
    shell = get_shell(pid, max_depth=max_depth)

            

Reported by Pylint.

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

Line: 20 Column: 9

                  try:
        get_shell = impl.get_shell
    except AttributeError:
        raise RuntimeError("get_shell not implemented for {0!r}".format(name))
    shell = get_shell(pid, max_depth=max_depth)
    if shell:
        return shell
    raise ShellDetectionFailure()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import importlib
import os

from ._core import ShellDetectionFailure


__version__ = "1.4.0"



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 10 Column: 1

              __version__ = "1.4.0"


def detect_shell(pid=None, max_depth=10):
    name = os.name
    try:
        impl = importlib.import_module(".{}".format(name), __name__)
    except ImportError:
        message = "Shell detection not implemented for {0!r}".format(name)

            

Reported by Pylint.