The following issues were found

pipenv/vendor/packaging/_structures.py
3 issues
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.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"


            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              # for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

            

Reported by Pylint.

Missing class docstring
Error

Line: 38 Column: 1

              Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/urllib3/packages/backports/makefile.py
3 issues
Too many arguments (6/5)
Error

Line: 14 Column: 1

              from socket import SocketIO


def backport_makefile(
    self, mode="r", buffering=None, encoding=None, errors=None, newline=None
):
    """
    Backport of ``socket.makefile`` from Python 3.5.
    """

            

Reported by Pylint.

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

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

                      raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
    writing = "w" in mode
    reading = "r" in mode or not writing
    assert reading or writing
    binary = "b" in mode
    rawmode = ""
    if reading:
        rawmode += "r"
    if writing:

            

Reported by Bandit.

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

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

                  elif reading:
        buffer = io.BufferedReader(raw, buffering)
    else:
        assert writing
        buffer = io.BufferedWriter(raw, buffering)
    if binary:
        return buffer
    text = io.TextIOWrapper(buffer, encoding, errors, newline)
    text.mode = mode

            

Reported by Bandit.

pipenv/vendor/wheel/cli/unpack.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              import os.path
import sys

from ..wheelfile import WheelFile


def unpack(path, dest='.'):
    """Unpack a wheel.


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import print_function

import os.path
import sys

from ..wheelfile import WheelFile


def unpack(path, dest='.'):

            

Reported by Pylint.

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

Line: 18 Column: 29

                  :param path: The path to the wheel.
    :param dest: Destination directory (default to current directory).
    """
    with WheelFile(path) as wf:
        namever = wf.parsed_filename.group('namever')
        destination = os.path.join(dest, namever)
        print("Unpacking to: {}...".format(destination), end='')
        sys.stdout.flush()
        wf.extractall(destination)

            

Reported by Pylint.

pipenv/vendor/more_itertools/__init__.py
3 issues
Unable to import '__init__.more'
Error

Line: 1 Column: 1

              from .more import *  # noqa
from .recipes import *  # noqa

__version__ = '8.8.0'

            

Reported by Pylint.

Unable to import '__init__.recipes'
Error

Line: 2 Column: 1

              from .more import *  # noqa
from .recipes import *  # noqa

__version__ = '8.8.0'

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from .more import *  # noqa
from .recipes import *  # noqa

__version__ = '8.8.0'

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/urllib3/contrib/_securetransport/low_level.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              import ssl
import tempfile

from .bindings import Security, CoreFoundation, CFConst


# This regular expression is used to grab PEM data out of a PEM bundle.
_PEM_CERTS_RE = re.compile(
    b"-----BEGIN CERTIFICATE-----\n(.*?)\n-----END CERTIFICATE-----", re.DOTALL

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 141 Column: 12

              
            CoreFoundation.CFArrayAppendValue(cert_array, cert)
            CoreFoundation.CFRelease(cert)
    except Exception:
        # We need to free the array before the exception bubbles further.
        # We only want to do that if an error occurs: otherwise, the caller
        # should free.
        CoreFoundation.CFRelease(cert_array)


            

Reported by Pylint.

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

Line: 212 Column: 30

                  identities = []
    result_array = None

    with open(path, "rb") as f:
        raw_filedata = f.read()

    try:
        filedata = CoreFoundation.CFDataCreate(
            CoreFoundation.kCFAllocatorDefault, raw_filedata, len(raw_filedata)

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/urllib3/contrib/_appengine_environ.py
3 issues
Missing function or method docstring
Error

Line: 8 Column: 1

              import os


def is_appengine():
    return "APPENGINE_RUNTIME" in os.environ


def is_appengine_sandbox():
    """Reports if the app is running in the first generation sandbox.

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 22 Column: 1

                  return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27"


def is_local_appengine():
    return is_appengine() and os.environ.get("SERVER_SOFTWARE", "").startswith(
        "Development/"
    )



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 28 Column: 1

                  )


def is_prod_appengine():
    return is_appengine() and os.environ.get("SERVER_SOFTWARE", "").startswith(
        "Google App Engine/"
    )



            

Reported by Pylint.

pipenv/patched/notpip/_internal/operations/build/wheel_legacy.py
3 issues
Catching too general exception Exception
Error

Line: 102 Column: 16

                              cwd=source_dir,
                spinner=spinner,
            )
        except Exception:
            spinner.finish("error")
            logger.error('Failed building wheel for %s', name)
            return None

        names = os.listdir(tempd)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import logging
import os.path

from pipenv.patched.notpip._internal.utils.setuptools_build import (
    make_setuptools_bdist_wheel_args,
)
from pipenv.patched.notpip._internal.utils.subprocess import (
    LOG_DIVIDER,
    call_subprocess,

            

Reported by Pylint.

Too many arguments (6/5)
Error

Line: 72 Column: 1

                  return os.path.join(temp_dir, names[0])


def build_wheel_legacy(
    name,  # type: str
    setup_py_path,  # type: str
    source_dir,  # type: str
    global_options,  # type: List[str]
    build_options,  # type: List[str]

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/requests/structures.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              Data structures that power Requests.
"""

from .compat import OrderedDict, Mapping, MutableMapping


class CaseInsensitiveDict(MutableMapping):
    """A case-insensitive ``dict``-like object.


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 80 Column: 5

                      return dict(self.lower_items()) == dict(other.lower_items())

    # Copy is required
    def copy(self):
        return CaseInsensitiveDict(self._store.values())

    def __repr__(self):
        return str(dict(self.items()))


            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 92 Column: 9

              
    def __init__(self, name=None):
        self.name = name
        super(LookupDict, self).__init__()

    def __repr__(self):
        return '<lookup \'%s\'>' % (self.name)

    def __getitem__(self, key):

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/chardet/cli/chardetect.py
3 issues
Variable name "u" doesn't conform to snake_case naming style
Error

Line: 36 Column: 5

                  :param name: Name of file or collection of lines
    :type name: str
    """
    u = UniversalDetector()
    for line in lines:
        line = bytearray(line)
        u.feed(line)
        # shortcut out of the loop to save reading further - particularly useful if we read a BOM.
        if u.done:

            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 47 Column: 5

                  result = u.result
    if PY2:
        name = name.decode(sys.getfilesystemencoding(), 'ignore')
    if result['encoding']:
        return '{0}: {1} with confidence {2}'.format(name, result['encoding'],
                                                     result['confidence'])
    else:
        return '{0}: no result'.format(name)


            

Reported by Pylint.

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

Line: 75 Column: 9

                                      version='%(prog)s {0}'.format(__version__))
    args = parser.parse_args(argv)

    for f in args.input:
        if f.isatty():
            print("You are running chardetect interactively. Press " +
                  "CTRL-D twice at the start of a blank line to signal the " +
                  "end of your input. If you want help, run chardetect " +
                  "--help\n", file=sys.stderr)

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/requests/status_codes.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              ``codes.okay`` all correspond to the HTTP status code 200.
"""

from .structures import LookupDict

_codes = {

    # Informational.
    100: ('continue',),

            

Reported by Pylint.

Using the global statement
Error

Line: 115 Column: 5

                      names = ', '.join('``%s``' % n for n in _codes[code])
        return '* %d: %s' % (code, names)

    global __doc__
    __doc__ = (__doc__ + '\n' +
               '\n'.join(doc(code) for code in sorted(_codes))
               if __doc__ is not None else None)

_init()

            

Reported by Pylint.

Redefining built-in '__doc__'
Error

Line: 115 Column: 5

                      names = ', '.join('``%s``' % n for n in _codes[code])
        return '* %d: %s' % (code, names)

    global __doc__
    __doc__ = (__doc__ + '\n' +
               '\n'.join(doc(code) for code in sorted(_codes))
               if __doc__ is not None else None)

_init()

            

Reported by Pylint.