The following issues were found

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

Line: 10 Column: 1

              from distutils import dist
from glob import iglob

from ..bdist_wheel import bdist_wheel
from ..wheelfile import WheelFile
from . import WheelError, require_pkgresources

egg_info_re = re.compile(r'''
    (?P<name>.+?)-(?P<ver>.+?)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from glob import iglob

from ..bdist_wheel import bdist_wheel
from ..wheelfile import WheelFile
from . import WheelError, require_pkgresources

egg_info_re = re.compile(r'''
    (?P<name>.+?)-(?P<ver>.+?)
    (-(?P<pyver>py\d\.\d+)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              
from ..bdist_wheel import bdist_wheel
from ..wheelfile import WheelFile
from . import WheelError, require_pkgresources

egg_info_re = re.compile(r'''
    (?P<name>.+?)-(?P<ver>.+?)
    (-(?P<pyver>py\d\.\d+)
     (-(?P<arch>.+?))?

            

Reported by Pylint.

Redefining built-in 'dir'
Error

Line: 44 Column: 5

                      raise WheelError('Invalid egg file name: {}'.format(filename))

    egg_info = match.groupdict()
    dir = tempfile.mkdtemp(suffix="_e2w")
    if os.path.isfile(egg_path):
        # assume we have a bdist_egg otherwise
        with zipfile.ZipFile(egg_path) as egg:
            egg.extractall(dir)
    else:

            

Reported by Pylint.

Attribute 'root_is_pure' defined outside __init__
Error

Line: 73 Column: 5

                  else:
        bw = _bdist_wheel_tag(dist.Distribution())

    bw.root_is_pure = root_is_purelib
    bw.python_tag = pyver
    bw.plat_name_supplied = True
    bw.plat_name = egg_info['arch'] or 'any'
    if not root_is_purelib:
        bw.full_tag_supplied = True

            

Reported by Pylint.

Attribute 'python_tag' defined outside __init__
Error

Line: 74 Column: 5

                      bw = _bdist_wheel_tag(dist.Distribution())

    bw.root_is_pure = root_is_purelib
    bw.python_tag = pyver
    bw.plat_name_supplied = True
    bw.plat_name = egg_info['arch'] or 'any'
    if not root_is_purelib:
        bw.full_tag_supplied = True
        bw.full_tag = (pyver, abi, arch)

            

Reported by Pylint.

Attribute 'plat_name_supplied' defined outside __init__
Error

Line: 75 Column: 5

              
    bw.root_is_pure = root_is_purelib
    bw.python_tag = pyver
    bw.plat_name_supplied = True
    bw.plat_name = egg_info['arch'] or 'any'
    if not root_is_purelib:
        bw.full_tag_supplied = True
        bw.full_tag = (pyver, abi, arch)


            

Reported by Pylint.

Attribute 'plat_name' defined outside __init__
Error

Line: 76 Column: 5

                  bw.root_is_pure = root_is_purelib
    bw.python_tag = pyver
    bw.plat_name_supplied = True
    bw.plat_name = egg_info['arch'] or 'any'
    if not root_is_purelib:
        bw.full_tag_supplied = True
        bw.full_tag = (pyver, abi, arch)

    dist_info_dir = os.path.join(dir, '{name}-{ver}.dist-info'.format(**egg_info))

            

Reported by Pylint.

XXX grab wininst .ini - between .exe, padding, and first zip file.
Error

Line: 187 Column: 3

                      datadir = "%s.data/" % dist_info

        # rewrite paths to trick ZipFile into extracting an egg
        # XXX grab wininst .ini - between .exe, padding, and first zip file.
        members = []
        egginfo_name = ''
        for zipinfo in bdw.infolist():
            key, basename = zipinfo.filename.split('/', 1)
            key = key.lower()

            

Reported by Pylint.

Unused variable 'sep'
Error

Line: 209 Column: 35

                              if newname.endswith('.egg-info'):
                    egginfo_name = newname
                elif '.egg-info/' in newname:
                    egginfo_name, sep, _ = newname.rpartition('/')
        dir = tempfile.mkdtemp(suffix="_b2w")
        bdw.extractall(dir, members)

    # egg2wheel
    abi = 'none'

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/colorama/winterm.py
33 issues
Attempted relative import beyond top-level package
Error

Line: 2 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2

            

Reported by Pylint.

Unused argument 'on_stderr'
Error

Line: 44 Column: 25

                      self._back = (value >> 4) & 7
        self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND)

    def reset_all(self, on_stderr=None):
        self.set_attrs(self._default)
        self.set_console(attrs=self._default)
        self._light = 0

    def fore(self, fore=None, light=False, on_stderr=False):

            

Reported by Pylint.

Attribute '_fore' defined outside __init__
Error

Line: 52 Column: 9

                  def fore(self, fore=None, light=False, on_stderr=False):
        if fore is None:
            fore = self._default_fore
        self._fore = fore
        # Emulate LIGHT_EX with BRIGHT Style
        if light:
            self._light |= WinStyle.BRIGHT
        else:
            self._light &= ~WinStyle.BRIGHT

            

Reported by Pylint.

Attribute '_back' defined outside __init__
Error

Line: 63 Column: 9

                  def back(self, back=None, light=False, on_stderr=False):
        if back is None:
            back = self._default_back
        self._back = back
        # Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
        if light:
            self._light |= WinStyle.BRIGHT_BACKGROUND
        else:
            self._light &= ~WinStyle.BRIGHT_BACKGROUND

            

Reported by Pylint.

Attribute '_style' defined outside __init__
Error

Line: 74 Column: 9

                  def style(self, style=None, on_stderr=False):
        if style is None:
            style = self._default_style
        self._style = style
        self.set_console(on_stderr=on_stderr)

    def set_console(self, attrs=None, on_stderr=False):
        if attrs is None:
            attrs = self.get_attrs()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2

            

Reported by Pylint.

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

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

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

Line: 17 Column: 1

                  GREY    = 7

# from wincon.h
class WinStyle(object):
    NORMAL              = 0x00 # dim text, dim background
    BRIGHT              = 0x08 # bright text, dim background
    BRIGHT_BACKGROUND   = 0x80 # dim text, bright background

class WinTerm(object):

            

Reported by Pylint.

pipenv/vendor/colorama/winterm.py
33 issues
Attempted relative import beyond top-level package
Error

Line: 2 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2

            

Reported by Pylint.

Unused argument 'on_stderr'
Error

Line: 44 Column: 25

                      self._back = (value >> 4) & 7
        self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND)

    def reset_all(self, on_stderr=None):
        self.set_attrs(self._default)
        self.set_console(attrs=self._default)
        self._light = 0

    def fore(self, fore=None, light=False, on_stderr=False):

            

Reported by Pylint.

Attribute '_fore' defined outside __init__
Error

Line: 52 Column: 9

                  def fore(self, fore=None, light=False, on_stderr=False):
        if fore is None:
            fore = self._default_fore
        self._fore = fore
        # Emulate LIGHT_EX with BRIGHT Style
        if light:
            self._light |= WinStyle.BRIGHT
        else:
            self._light &= ~WinStyle.BRIGHT

            

Reported by Pylint.

Attribute '_back' defined outside __init__
Error

Line: 63 Column: 9

                  def back(self, back=None, light=False, on_stderr=False):
        if back is None:
            back = self._default_back
        self._back = back
        # Emulate LIGHT_EX with BRIGHT_BACKGROUND Style
        if light:
            self._light |= WinStyle.BRIGHT_BACKGROUND
        else:
            self._light &= ~WinStyle.BRIGHT_BACKGROUND

            

Reported by Pylint.

Attribute '_style' defined outside __init__
Error

Line: 74 Column: 9

                  def style(self, style=None, on_stderr=False):
        if style is None:
            style = self._default_style
        self._style = style
        self.set_console(on_stderr=on_stderr)

    def set_console(self, attrs=None, on_stderr=False):
        if attrs is None:
            attrs = self.get_attrs()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32


# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2

            

Reported by Pylint.

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

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              

# from wincon.h
class WinColor(object):
    BLACK   = 0
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4

            

Reported by Pylint.

Missing class docstring
Error

Line: 17 Column: 1

                  GREY    = 7

# from wincon.h
class WinStyle(object):
    NORMAL              = 0x00 # dim text, dim background
    BRIGHT              = 0x08 # bright text, dim background
    BRIGHT_BACKGROUND   = 0x80 # dim text, bright background

class WinTerm(object):

            

Reported by Pylint.

pipenv/vendor/urllib3/contrib/socks.py
33 issues
Attempted relative import beyond top-level package
Error

Line: 48 Column: 5

              except ImportError:
    import warnings

    from ..exceptions import DependencyWarning

    warnings.warn(
        (
            "SOCKS support in urllib3 requires the installation of optional "
            "dependencies: specifically, PySocks.  For more information, see "

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 63 Column: 1

              from socket import error as SocketError
from socket import timeout as SocketTimeout

from ..connection import HTTPConnection, HTTPSConnection
from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 64 Column: 1

              from socket import timeout as SocketTimeout

from ..connection import HTTPConnection, HTTPSConnection
from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url

try:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 65 Column: 1

              
from ..connection import HTTPConnection, HTTPSConnection
from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url

try:
    import ssl

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 66 Column: 1

              from ..connection import HTTPConnection, HTTPSConnection
from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url

try:
    import ssl
except ImportError:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 67 Column: 1

              from ..connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ..exceptions import ConnectTimeoutError, NewConnectionError
from ..poolmanager import PoolManager
from ..util.url import parse_url

try:
    import ssl
except ImportError:
    ssl = None

            

Reported by Pylint.

Module 'socks' has no 'create_connection' member
Error

Line: 96 Column: 20

                          extra_kw["socket_options"] = self.socket_options

        try:
            conn = socks.create_connection(
                (self.host, self.port),
                proxy_type=self._socks_options["socks_version"],
                proxy_addr=self._socks_options["proxy_host"],
                proxy_port=self._socks_options["proxy_port"],
                proxy_username=self._socks_options["username"],

            

Reported by Pylint.

Module 'socks' has no 'ProxyError' member
Error

Line: 115 Column: 16

                              % (self.host, self.timeout),
            )

        except socks.ProxyError as e:
            # This is fragile as hell, but it seems to be the only way to raise
            # useful errors here.
            if e.socket_err:
                error = e.socket_err
                if isinstance(error, SocketTimeout):

            

Reported by Pylint.

Module 'socks' has no 'PROXY_TYPE_SOCKS5' member
Error

Line: 186 Column: 29

                          if len(split) == 2:
                username, password = split
        if parsed.scheme == "socks5":
            socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = False
        elif parsed.scheme == "socks5h":
            socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = True
        elif parsed.scheme == "socks4":

            

Reported by Pylint.

Module 'socks' has no 'PROXY_TYPE_SOCKS5' member
Error

Line: 189 Column: 29

                          socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = False
        elif parsed.scheme == "socks5h":
            socks_version = socks.PROXY_TYPE_SOCKS5
            rdns = True
        elif parsed.scheme == "socks4":
            socks_version = socks.PROXY_TYPE_SOCKS4
            rdns = False
        elif parsed.scheme == "socks4a":

            

Reported by Pylint.

pipenv/vendor/importlib_resources/tests/test_read.py
33 issues
Unable to import 'importlib_resources'
Error

Line: 2 Column: 1

              import unittest
import importlib_resources as resources

from . import data01
from . import util
from importlib import import_module


class CommonBinaryTests(util.CommonTests, unittest.TestCase):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              import unittest
import importlib_resources as resources

from . import data01
from . import util
from importlib import import_module


class CommonBinaryTests(util.CommonTests, unittest.TestCase):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              import importlib_resources as resources

from . import data01
from . import util
from importlib import import_module


class CommonBinaryTests(util.CommonTests, unittest.TestCase):
    def execute(self, package, path):

            

Reported by Pylint.

Instance of 'ReadTests' has no 'data' member
Error

Line: 21 Column: 40

              
class ReadTests:
    def test_read_binary(self):
        result = resources.read_binary(self.data, 'binary.file')
        self.assertEqual(result, b'\0\1\2\3')

    def test_read_text_default_encoding(self):
        result = resources.read_text(self.data, 'utf-8.file')
        self.assertEqual(result, 'Hello, UTF-8 world!\n')

            

Reported by Pylint.

Instance of 'ReadTests' has no 'assertEqual' member
Error

Line: 22 Column: 9

              class ReadTests:
    def test_read_binary(self):
        result = resources.read_binary(self.data, 'binary.file')
        self.assertEqual(result, b'\0\1\2\3')

    def test_read_text_default_encoding(self):
        result = resources.read_text(self.data, 'utf-8.file')
        self.assertEqual(result, 'Hello, UTF-8 world!\n')


            

Reported by Pylint.

Instance of 'ReadTests' has no 'data' member
Error

Line: 25 Column: 38

                      self.assertEqual(result, b'\0\1\2\3')

    def test_read_text_default_encoding(self):
        result = resources.read_text(self.data, 'utf-8.file')
        self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_read_text_given_encoding(self):
        result = resources.read_text(self.data, 'utf-16.file', encoding='utf-16')
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

            

Reported by Pylint.

Instance of 'ReadTests' has no 'assertEqual' member
Error

Line: 26 Column: 9

              
    def test_read_text_default_encoding(self):
        result = resources.read_text(self.data, 'utf-8.file')
        self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_read_text_given_encoding(self):
        result = resources.read_text(self.data, 'utf-16.file', encoding='utf-16')
        self.assertEqual(result, 'Hello, UTF-16 world!\n')


            

Reported by Pylint.

Instance of 'ReadTests' has no 'data' member
Error

Line: 29 Column: 38

                      self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_read_text_given_encoding(self):
        result = resources.read_text(self.data, 'utf-16.file', encoding='utf-16')
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

    def test_read_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        self.assertRaises(UnicodeError, resources.read_text, self.data, 'utf-16.file')

            

Reported by Pylint.

Instance of 'ReadTests' has no 'assertEqual' member
Error

Line: 30 Column: 9

              
    def test_read_text_given_encoding(self):
        result = resources.read_text(self.data, 'utf-16.file', encoding='utf-16')
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

    def test_read_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        self.assertRaises(UnicodeError, resources.read_text, self.data, 'utf-16.file')
        result = resources.read_text(self.data, 'utf-16.file', errors='ignore')

            

Reported by Pylint.

Instance of 'ReadTests' has no 'data' member
Error

Line: 34 Column: 62

              
    def test_read_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        self.assertRaises(UnicodeError, resources.read_text, self.data, 'utf-16.file')
        result = resources.read_text(self.data, 'utf-16.file', errors='ignore')
        self.assertEqual(
            result,
            'H\x00e\x00l\x00l\x00o\x00,\x00 '
            '\x00U\x00T\x00F\x00-\x001\x006\x00 '

            

Reported by Pylint.

pipenv/patched/notpip/_internal/commands/configuration.py
33 issues
Class 'Enum' has no 'USER' member
Error

Line: 135 Column: 14

              
    def _determine_file(self, options, need_value):
        file_options = [key for key, value in (
            (kinds.USER, options.user_file),
            (kinds.GLOBAL, options.global_file),
            (kinds.SITE, options.site_file),
        ) if value]

        if not file_options:

            

Reported by Pylint.

Class 'Enum' has no 'GLOBAL' member
Error

Line: 136 Column: 14

                  def _determine_file(self, options, need_value):
        file_options = [key for key, value in (
            (kinds.USER, options.user_file),
            (kinds.GLOBAL, options.global_file),
            (kinds.SITE, options.site_file),
        ) if value]

        if not file_options:
            if not need_value:

            

Reported by Pylint.

Class 'Enum' has no 'SITE' member
Error

Line: 137 Column: 14

                      file_options = [key for key, value in (
            (kinds.USER, options.user_file),
            (kinds.GLOBAL, options.global_file),
            (kinds.SITE, options.site_file),
        ) if value]

        if not file_options:
            if not need_value:
                return None

            

Reported by Pylint.

Class 'Enum' has no 'SITE' member
Error

Line: 146 Column: 67

                          # Default to user, unless there's a site file.
            elif any(
                os.path.exists(site_config_file)
                for site_config_file in get_configuration_files()[kinds.SITE]
            ):
                return kinds.SITE
            else:
                return kinds.USER
        elif len(file_options) == 1:

            

Reported by Pylint.

Class 'Enum' has no 'SITE' member
Error

Line: 148 Column: 24

                              os.path.exists(site_config_file)
                for site_config_file in get_configuration_files()[kinds.SITE]
            ):
                return kinds.SITE
            else:
                return kinds.USER
        elif len(file_options) == 1:
            return file_options[0]


            

Reported by Pylint.

Class 'Enum' has no 'USER' member
Error

Line: 150 Column: 24

                          ):
                return kinds.SITE
            else:
                return kinds.USER
        elif len(file_options) == 1:
            return file_options[0]

        raise PipError(
            "Need exactly one file to operate upon "

            

Reported by Pylint.

Use lazy % formatting in logging functions
Error

Line: 101 Column: 26

              
        # Determine action
        if not args or args[0] not in handlers:
            logger.error("Need an action ({}) to perform.".format(
                ", ".join(sorted(handlers)))
            )
            return ERROR

        action = args[0]

            

Reported by Pylint.

Unused argument 'options'
Error

Line: 159 Column: 27

                          "(--user, --site, --global) to perform."
        )

    def list_values(self, options, args):
        self._get_n_args(args, "list", n=0)

        for key, value in sorted(self.configuration.items()):
            write_output("%s=%r", key, value)


            

Reported by Pylint.

Unused argument 'options'
Error

Line: 165 Column: 24

                      for key, value in sorted(self.configuration.items()):
            write_output("%s=%r", key, value)

    def get_name(self, options, args):
        key = self._get_n_args(args, "get [name]", n=1)
        value = self.configuration.get_value(key)

        write_output("%s", value)


            

Reported by Pylint.

Unused argument 'options'
Error

Line: 171 Column: 30

              
        write_output("%s", value)

    def set_name_value(self, options, args):
        key, value = self._get_n_args(args, "set [name] [value]", n=2)
        self.configuration.set_value(key, value)

        self._save_configuration()


            

Reported by Pylint.

pipenv/patched/pipfile/api.py
33 issues
Catching too general exception Exception
Error

Line: 37 Column: 12

                  # get files in current dir
    try:
        names = os.listdir(bottom)
    except Exception:
        return

    dirs, nondirs = [], []
    for name in names:
        if os.path.isdir(os.path.join(bottom, name)):

            

Reported by Pylint.

TODO: Validate given data here.
Error

Line: 127 Column: 3

                          },
        }

        # TODO: Validate given data here.
        self.groups['default'] = config['packages']
        self.groups['develop'] = config['dev-packages']

        # Update the data structure with group information.
        data.update(self.groups)

            

Reported by Pylint.

Unused variable 'd'
Error

Line: 146 Column: 16

                  def find(max_depth=3):
        """Returns the path of a Pipfile in parent directories."""
        i = 0
        for c, d, f in walk_up(os.getcwd()):
            i += 1

            if i < max_depth:
                if 'Pipfile':
                    p = os.path.join(c, 'Pipfile')

            

Reported by Pylint.

Unused variable 'f'
Error

Line: 146 Column: 19

                  def find(max_depth=3):
        """Returns the path of a Pipfile in parent directories."""
        i = 0
        for c, d, f in walk_up(os.getcwd()):
            i += 1

            if i < max_depth:
                if 'Pipfile':
                    p = os.path.join(c, 'Pipfile')

            

Reported by Pylint.

Using a conditional statement with a constant value
Error

Line: 150 Column: 17

                          i += 1

            if i < max_depth:
                if 'Pipfile':
                    p = os.path.join(c, 'Pipfile')
                    if os.path.isfile(p):
                        return p
        raise RuntimeError('No Pipfile found!')


            

Reported by Pylint.

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

Line: 219 Column: 21

                              try:
                    assert lookup[marker] == specifier
                except AssertionError:
                    raise AssertionError('Specifier {!r} does not match {!r}.'.format(marker, specifier))


def load(pipfile_path=None, inject_env=True):
    """Loads a pipfile from a given path.
    If none is provided, one will try to be found.

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import toml

import codecs
import json
import hashlib
import platform
import six
import sys
import os

            

Reported by Pylint.

standard import "import codecs" should be placed before "import toml"
Error

Line: 3 Column: 1

              import toml

import codecs
import json
import hashlib
import platform
import six
import sys
import os

            

Reported by Pylint.

standard import "import json" should be placed before "import toml"
Error

Line: 4 Column: 1

              import toml

import codecs
import json
import hashlib
import platform
import six
import sys
import os

            

Reported by Pylint.

standard import "import hashlib" should be placed before "import toml"
Error

Line: 5 Column: 1

              
import codecs
import json
import hashlib
import platform
import six
import sys
import os


            

Reported by Pylint.

pipenv/vendor/jinja2/debug.py
33 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              from types import CodeType
from types import TracebackType

from .exceptions import TemplateSyntaxError
from .utils import internal_code
from .utils import missing

if t.TYPE_CHECKING:
    from .runtime import Context

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              from types import TracebackType

from .exceptions import TemplateSyntaxError
from .utils import internal_code
from .utils import missing

if t.TYPE_CHECKING:
    from .runtime import Context


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from .exceptions import TemplateSyntaxError
from .utils import internal_code
from .utils import missing

if t.TYPE_CHECKING:
    from .runtime import Context



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 5

              from .utils import missing

if t.TYPE_CHECKING:
    from .runtime import Context


def rewrite_traceback_stack(source: t.Optional[str] = None) -> BaseException:
    """Rewrite the current exception to replace any tracebacks from
    within compiled template code with tracebacks that look like they

            

Reported by Pylint.

Unused Context imported from runtime
Error

Line: 12 Column: 5

              from .utils import missing

if t.TYPE_CHECKING:
    from .runtime import Context


def rewrite_traceback_stack(source: t.Optional[str] = None) -> BaseException:
    """Rewrite the current exception to replace any tracebacks from
    within compiled template code with tracebacks that look like they

            

Reported by Pylint.

Redefining built-in 'locals'
Error

Line: 94 Column: 9

                  if tb is not None:
        # Replace the real locals with the context that would be
        # available at that point in the template.
        locals = get_template_locals(tb.tb_frame.f_locals)
        locals.pop("__jinja_exception__", None)
    else:
        locals = {}

    globals = {

            

Reported by Pylint.

Redefining built-in 'globals'
Error

Line: 99 Column: 5

                  else:
        locals = {}

    globals = {
        "__name__": filename,
        "__file__": filename,
        "__jinja_exception__": exc_value,
    }
    # Raise an exception at the correct line number.

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 157 Column: 12

                              continue

        code = CodeType(*code_args)
    except Exception:
        # Some environments such as Google App Engine don't support
        # modifying code objects.
        pass

    # Execute the new code, which is guaranteed to raise, and return

            

Reported by Pylint.

Use of exec detected.
Security

Line: 165
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b102_exec_used.html

                  # Execute the new code, which is guaranteed to raise, and return
    # the new traceback without this frame.
    try:
        exec(code, globals, locals)
    except BaseException:
        return sys.exc_info()[2].tb_next  # type: ignore


def get_template_locals(real_locals: t.Mapping[str, t.Any]) -> t.Dict[str, t.Any]:

            

Reported by Bandit.

Use of exec
Error

Line: 165 Column: 9

                  # Execute the new code, which is guaranteed to raise, and return
    # the new traceback without this frame.
    try:
        exec(code, globals, locals)
    except BaseException:
        return sys.exc_info()[2].tb_next  # type: ignore


def get_template_locals(real_locals: t.Mapping[str, t.Any]) -> t.Dict[str, t.Any]:

            

Reported by Pylint.

pipenv/vendor/orderedmultidict/itemlist.py
32 issues
Redefining built-in 'next'
Error

Line: 27 Column: 35

                  doubly linked list defined below.
    """

    def __init__(self, prev=None, next=None, key=_absent, value=_absent):
        self.prev = prev
        self.next = next
        self.key = key
        self.value = value


            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 44 Column: 5

                  some otherwise common list methods may be missing.
    """

    def __init__(self, items=[]):
        self.root = itemnode()
        self.root.next = self.root.prev = self.root
        self.size = 0

        for key, value in items:

            

Reported by Pylint.

Unused variable 'value'
Error

Line: 67 Column: 24

                      return self

    def clear(self):
        for node, key, value in self:
            self.removenode(node)
        return self

    def items(self):
        return list(self.iteritems())

            

Reported by Pylint.

Unused variable 'key'
Error

Line: 67 Column: 19

                      return self

    def clear(self):
        for node, key, value in self:
            self.removenode(node)
        return self

    def items(self):
        return list(self.iteritems())

            

Reported by Pylint.

Unused variable 'node'
Error

Line: 81 Column: 13

                      return list(self.itervalues())

    def iteritems(self):
        for node, key, value in self:
            yield key, value

    def iterkeys(self):
        for node, key, value in self:
            yield key

            

Reported by Pylint.

Unused variable 'node'
Error

Line: 85 Column: 13

                          yield key, value

    def iterkeys(self):
        for node, key, value in self:
            yield key

    def itervalues(self):
        for node, key, value in self:
            yield value

            

Reported by Pylint.

Unused variable 'value'
Error

Line: 85 Column: 24

                          yield key, value

    def iterkeys(self):
        for node, key, value in self:
            yield key

    def itervalues(self):
        for node, key, value in self:
            yield value

            

Reported by Pylint.

Unused variable 'node'
Error

Line: 89 Column: 13

                          yield key

    def itervalues(self):
        for node, key, value in self:
            yield value

    def reverse(self):
        for node, key, value in self:
            node.prev, node.next = node.next, node.prev

            

Reported by Pylint.

Unused variable 'key'
Error

Line: 89 Column: 19

                          yield key

    def itervalues(self):
        for node, key, value in self:
            yield value

    def reverse(self):
        for node, key, value in self:
            node.prev, node.next = node.next, node.prev

            

Reported by Pylint.

Unused variable 'key'
Error

Line: 93 Column: 19

                          yield value

    def reverse(self):
        for node, key, value in self:
            node.prev, node.next = node.next, node.prev
        self.root.prev, self.root.next = self.root.next, self.root.prev
        return self

    def __len__(self):

            

Reported by Pylint.

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.