The following issues were found

pipenv/vendor/vistir/_winconsole.py
58 issues
Unable to import 'msvcrt'
Error

Line: 66 Column: 1

              from ctypes.wintypes import HANDLE, LPCWSTR, LPWSTR
from itertools import count

import msvcrt
from six import PY2, text_type

from .compat import IS_TYPE_CHECKING
from .misc import StreamWrapper, run, to_text


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 69 Column: 1

              import msvcrt
from six import PY2, text_type

from .compat import IS_TYPE_CHECKING
from .misc import StreamWrapper, run, to_text

try:
    from ctypes import pythonapi


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 70 Column: 1

              from six import PY2, text_type

from .compat import IS_TYPE_CHECKING
from .misc import StreamWrapper, run, to_text

try:
    from ctypes import pythonapi

    PyObject_GetBuffer = pythonapi.PyObject_GetBuffer

            

Reported by Pylint.

Module 'sys' has no 'getwindowsversion' member
Error

Line: 311 Column: 16

              
def _wrap_std_stream(name):
    # Python 2 & Windows 7 and below
    if PY2 and sys.getwindowsversion()[:2] <= (6, 1) and name not in _wrapped_std_streams:
        setattr(sys, name, WindowsChunkedWriter(getattr(sys, name)))
        _wrapped_std_streams.add(name)


def _get_text_stdin(buffer_stream):

            

Reported by Pylint.

Module 'os' has no 'O_BINARY' member
Error

Line: 399 Column: 44

                              # deal with to binary mode as otherwise the exercise if a
                # bit moot.  The same problems apply as for
                # get_binary_stdin and friends from _compat.
                msvcrt.setmode(f.fileno(), os.O_BINARY)
            return func(f)


def hide_cursor():
    cursor_info = CONSOLE_CURSOR_INFO()

            

Reported by Pylint.

Unused HANDLE imported from ctypes.wintypes
Error

Line: 63 Column: 1

                  py_object,
    windll,
)
from ctypes.wintypes import HANDLE, LPCWSTR, LPWSTR
from itertools import count

import msvcrt
from six import PY2, text_type


            

Reported by Pylint.

XXX: Added for cursor hiding on windows
Error

Line: 99 Column: 3

              SetConsoleCursorInfo = kernel32.SetConsoleCursorInfo
WriteConsoleW = kernel32.WriteConsoleW

# XXX: Added for cursor hiding on windows
STDOUT_HANDLE_ID = ctypes.c_ulong(-11)
STDERR_HANDLE_ID = ctypes.c_ulong(-12)
STDIN_HANDLE = GetStdHandle(-10)
STDOUT_HANDLE = GetStdHandle(-11)
STDERR_HANDLE = GetStdHandle(-12)

            

Reported by Pylint.

XXX: This was added for the use of cursors
Error

Line: 143 Column: 3

                      _fields_.insert(-1, ("smalltable", c_ssize_t * 2))


# XXX: This was added for the use of cursors
class CONSOLE_CURSOR_INFO(Structure):
    _fields_ = [("dwSize", ctypes.c_int), ("bVisible", ctypes.c_int)]


# On PyPy we cannot get buffers so our ability to operate here is

            

Reported by Pylint.

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

Line: 175 Column: 5

              

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

    def isatty(self):
        io.RawIOBase.isatty(self)
        return True

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 260 Column: 16

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

    def writelines(self, lines):
        for line in lines:

            

Reported by Pylint.

pipenv/vendor/toml/encoder.py
57 issues
Missing module docstring
Error

Line: 1 Column: 1

              import datetime
import re
import sys
from decimal import Decimal

from toml.decoder import InlineTableDict

if sys.version_info >= (3,):
    unicode = str

            

Reported by Pylint.

Class name "unicode" doesn't conform to PascalCase naming style
Error

Line: 9 Column: 5

              from toml.decoder import InlineTableDict

if sys.version_info >= (3,):
    unicode = str


def dump(o, f, encoder=None):
    """Writes out dict as toml to a file


            

Reported by Pylint.

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

Line: 12 Column: 1

                  unicode = str


def dump(o, f, encoder=None):
    """Writes out dict as toml to a file

    Args:
        o: Object to dump into toml
        f: File descriptor where the toml should be stored

            

Reported by Pylint.

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

Line: 12 Column: 1

                  unicode = str


def dump(o, f, encoder=None):
    """Writes out dict as toml to a file

    Args:
        o: Object to dump into toml
        f: File descriptor where the toml should be stored

            

Reported by Pylint.

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

Line: 29 Column: 5

              
    if not f.write:
        raise TypeError("You can only dump an object to a file descriptor")
    d = dumps(o, encoder=encoder)
    f.write(d)
    return d


def dumps(o, encoder=None):

            

Reported by Pylint.

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

Line: 34 Column: 1

                  return d


def dumps(o, encoder=None):
    """Stringifies input dict as toml

    Args:
        o: Object to dump into toml
        encoder: The ``TomlEncoder`` to use for constructing the output string

            

Reported by Pylint.

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

Line: 80 Column: 17

                              retval += "[" + section + "]\n"
                if addtoretval:
                    retval += addtoretval
            for s in addtosections:
                newsections[section + "." + s] = addtosections[s]
        sections = newsections
    return retval



            

Reported by Pylint.

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

Line: 86 Column: 1

                  return retval


def _dump_str(v):
    if sys.version_info < (3,) and hasattr(v, 'decode') and isinstance(v, str):
        v = v.decode('utf-8')
    v = "%r" % v
    if v[0] == 'u':
        v = v[1:]

            

Reported by Pylint.

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

Line: 117 Column: 1

                  return unicode('"' + v[0] + '"')


def _dump_float(v):
    return "{}".format(v).replace("e+0", "e+").replace("e-0", "e-")


def _dump_time(v):
    utcoffset = v.utcoffset()

            

Reported by Pylint.

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

Line: 121 Column: 1

                  return "{}".format(v).replace("e+0", "e+").replace("e-0", "e-")


def _dump_time(v):
    utcoffset = v.utcoffset()
    if utcoffset is None:
        return v.isoformat()
    # The TOML norm specifies that it's local time thus we drop the offset
    return v.isoformat()[:-6]

            

Reported by Pylint.

pipenv/vendor/requirementslib/models/pipfile.py
57 issues
Unable to import 'plette.models.base'
Error

Line: 11 Column: 1

              import sys

import attr
import plette.models.base
import plette.pipfiles
import tomlkit
from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING

            

Reported by Pylint.

Unable to import 'plette.pipfiles'
Error

Line: 12 Column: 1

              
import attr
import plette.models.base
import plette.pipfiles
import tomlkit
from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError

            

Reported by Pylint.

Unable to import 'tomlkit'
Error

Line: 13 Column: 1

              import attr
import plette.models.base
import plette.pipfiles
import tomlkit
from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items

            

Reported by Pylint.

Unable to import 'vistir.compat'
Error

Line: 14 Column: 1

              import plette.models.base
import plette.pipfiles
import tomlkit
from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              import tomlkit
from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              from vistir.compat import FileNotFoundError, Path

from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              
from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python

if MYPY_RUNNING:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python

if MYPY_RUNNING:
    from typing import Union, Any, Dict, Iterable, Mapping, List, Text

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from ..exceptions import RequirementError
from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python

if MYPY_RUNNING:
    from typing import Union, Any, Dict, Iterable, Mapping, List, Text


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              from ..utils import is_editable, is_vcs, merge_items
from .project import ProjectFile
from .requirements import Requirement
from .utils import get_url_name, optional_instance_of, tomlkit_value_to_python

if MYPY_RUNNING:
    from typing import Union, Any, Dict, Iterable, Mapping, List, Text

    package_type = Dict[Text, Dict[Text, Union[List[Text], Text]]]

            

Reported by Pylint.

pipenv/patched/notpip/_internal/utils/ui.py
56 issues
self.next is not callable
Error

Line: 162 Column: 13

                  def iter(self, it):
        for x in it:
            yield x
            self.next(len(x))
        self.finish()


class WindowsMixin(object):


            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 31 Column: 8

                  from pipenv.patched.notpip._vendor import colorama
# Lots of different errors can come from this, including SystemError and
# ImportError.
except Exception:
    colorama = None

logger = logging.getLogger(__name__)



            

Reported by Pylint.

Lambda may not be necessary
Error

Line: 188 Column: 32

                          # The progress code expects to be able to call self.file.isatty()
            # but the colorama.AnsiToWin32() object doesn't have that, so we'll
            # add it.
            self.file.isatty = lambda: self.file.wrapped.isatty()
            # The progress code expects to be able to call self.file.flush()
            # but the colorama.AnsiToWin32() object doesn't have that, so we'll
            # add it.
            self.file.flush = lambda: self.file.wrapped.flush()


            

Reported by Pylint.

Lambda may not be necessary
Error

Line: 192 Column: 31

                          # The progress code expects to be able to call self.file.flush()
            # but the colorama.AnsiToWin32() object doesn't have that, so we'll
            # add it.
            self.file.flush = lambda: self.file.wrapped.flush()


class BaseDownloadProgressBar(WindowsMixin, InterruptibleMixin,
                              DownloadProgressMixin):


            

Reported by Pylint.

Attribute '_phaser' defined outside __init__
Error

Line: 238 Column: 13

              
    def next_phase(self):
        if not hasattr(self, "_phaser"):
            self._phaser = itertools.cycle(self.phases)
        return next(self._phaser)

    def update(self):
        message = self.message % self
        phase = self.next_phase()

            

Reported by Pylint.

Redefining built-in 'max'
Error

Line: 265 Column: 44

              }


def DownloadProgressProvider(progress_bar, max=None):
    if max is None or max == 0:
        return BAR_TYPES[progress_bar][1]().iter
    else:
        return BAR_TYPES[progress_bar][0](max=max).iter


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

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

from __future__ import absolute_import, division

import contextlib
import itertools
import logging

            

Reported by Pylint.

Constant name "colorama" doesn't conform to UPPER_CASE naming style
Error

Line: 32 Column: 5

              # Lots of different errors can come from this, including SystemError and
# ImportError.
except Exception:
    colorama = None

logger = logging.getLogger(__name__)


def _select_progress_class(preferred, fallback):

            

Reported by Pylint.

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

Line: 67 Column: 1

              _BaseBar = _select_progress_class(IncrementalBar, Bar)  # type: Any


class InterruptibleMixin(object):
    """
    Helper to ensure that self.finish() gets called on keyboard interrupt.

    This allows downloads to be interrupted without leaving temporary state
    (like hidden cursors) behind.

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 89 Column: 9

                      """
        Save the original SIGINT handler for later.
        """
        super(InterruptibleMixin, self).__init__(*args, **kwargs)

        self.original_handler = signal(SIGINT, self.handle_sigint)

        # If signal() returns None, the previous handler was not installed from
        # Python, and we cannot restore it. This probably should not happen,

            

Reported by Pylint.

pipenv/patched/yaml3/serializer.py
56 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              
__all__ = ['Serializer', 'SerializerError']

from .error import YAMLError
from .events import *
from .nodes import *

class SerializerError(YAMLError):
    pass

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              __all__ = ['Serializer', 'SerializerError']

from .error import YAMLError
from .events import *
from .nodes import *

class SerializerError(YAMLError):
    pass


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
from .error import YAMLError
from .events import *
from .nodes import *

class SerializerError(YAMLError):
    pass

class Serializer:

            

Reported by Pylint.

Undefined variable 'StreamStartEvent'
Error

Line: 29 Column: 23

              
    def open(self):
        if self.closed is None:
            self.emit(StreamStartEvent(encoding=self.use_encoding))
            self.closed = False
        elif self.closed:
            raise SerializerError("serializer is closed")
        else:
            raise SerializerError("serializer is already opened")

            

Reported by Pylint.

Instance of 'Serializer' has no 'emit' member
Error

Line: 29 Column: 13

              
    def open(self):
        if self.closed is None:
            self.emit(StreamStartEvent(encoding=self.use_encoding))
            self.closed = False
        elif self.closed:
            raise SerializerError("serializer is closed")
        else:
            raise SerializerError("serializer is already opened")

            

Reported by Pylint.

Undefined variable 'StreamEndEvent'
Error

Line: 40 Column: 23

                      if self.closed is None:
            raise SerializerError("serializer is not opened")
        elif not self.closed:
            self.emit(StreamEndEvent())
            self.closed = True

    #def __del__(self):
    #    self.close()


            

Reported by Pylint.

Instance of 'Serializer' has no 'emit' member
Error

Line: 40 Column: 13

                      if self.closed is None:
            raise SerializerError("serializer is not opened")
        elif not self.closed:
            self.emit(StreamEndEvent())
            self.closed = True

    #def __del__(self):
    #    self.close()


            

Reported by Pylint.

Instance of 'Serializer' has no 'emit' member
Error

Line: 51 Column: 9

                          raise SerializerError("serializer is not opened")
        elif self.closed:
            raise SerializerError("serializer is closed")
        self.emit(DocumentStartEvent(explicit=self.use_explicit_start,
            version=self.use_version, tags=self.use_tags))
        self.anchor_node(node)
        self.serialize_node(node, None, None)
        self.emit(DocumentEndEvent(explicit=self.use_explicit_end))
        self.serialized_nodes = {}

            

Reported by Pylint.

Undefined variable 'DocumentStartEvent'
Error

Line: 51 Column: 19

                          raise SerializerError("serializer is not opened")
        elif self.closed:
            raise SerializerError("serializer is closed")
        self.emit(DocumentStartEvent(explicit=self.use_explicit_start,
            version=self.use_version, tags=self.use_tags))
        self.anchor_node(node)
        self.serialize_node(node, None, None)
        self.emit(DocumentEndEvent(explicit=self.use_explicit_end))
        self.serialized_nodes = {}

            

Reported by Pylint.

Undefined variable 'DocumentEndEvent'
Error

Line: 55 Column: 19

                          version=self.use_version, tags=self.use_tags))
        self.anchor_node(node)
        self.serialize_node(node, None, None)
        self.emit(DocumentEndEvent(explicit=self.use_explicit_end))
        self.serialized_nodes = {}
        self.anchors = {}
        self.last_anchor_id = 0

    def anchor_node(self, node):

            

Reported by Pylint.

pipenv/vendor/importlib_resources/tests/test_resource.py
56 issues
Unable to import 'importlib_resources'
Error

Line: 3 Column: 1

              import sys
import unittest
import importlib_resources as resources
import uuid
import pathlib

from . import data01
from . import zipdata01, zipdata02
from . import util

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import uuid
import pathlib

from . import data01
from . import zipdata01, zipdata02
from . import util
from importlib import import_module
from ._compat import import_helper, unlink


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              import pathlib

from . import data01
from . import zipdata01, zipdata02
from . import util
from importlib import import_module
from ._compat import import_helper, unlink



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from . import data01
from . import zipdata01, zipdata02
from . import util
from importlib import import_module
from ._compat import import_helper, unlink


class ResourceTests:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from . import zipdata01, zipdata02
from . import util
from importlib import import_module
from ._compat import import_helper, unlink


class ResourceTests:
    # Subclasses are expected to set the `data` attribute.


            

Reported by Pylint.

Instance of 'ResourceTests' has no 'assertTrue' member
Error

Line: 18 Column: 9

                  # Subclasses are expected to set the `data` attribute.

    def test_is_resource_good_path(self):
        self.assertTrue(resources.is_resource(self.data, 'binary.file'))

    def test_is_resource_missing(self):
        self.assertFalse(resources.is_resource(self.data, 'not-a-file'))

    def test_is_resource_subresource_directory(self):

            

Reported by Pylint.

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

Line: 18 Column: 47

                  # Subclasses are expected to set the `data` attribute.

    def test_is_resource_good_path(self):
        self.assertTrue(resources.is_resource(self.data, 'binary.file'))

    def test_is_resource_missing(self):
        self.assertFalse(resources.is_resource(self.data, 'not-a-file'))

    def test_is_resource_subresource_directory(self):

            

Reported by Pylint.

Instance of 'ResourceTests' has no 'assertFalse' member
Error

Line: 21 Column: 9

                      self.assertTrue(resources.is_resource(self.data, 'binary.file'))

    def test_is_resource_missing(self):
        self.assertFalse(resources.is_resource(self.data, 'not-a-file'))

    def test_is_resource_subresource_directory(self):
        # Directories are not resources.
        self.assertFalse(resources.is_resource(self.data, 'subdirectory'))


            

Reported by Pylint.

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

Line: 21 Column: 48

                      self.assertTrue(resources.is_resource(self.data, 'binary.file'))

    def test_is_resource_missing(self):
        self.assertFalse(resources.is_resource(self.data, 'not-a-file'))

    def test_is_resource_subresource_directory(self):
        # Directories are not resources.
        self.assertFalse(resources.is_resource(self.data, 'subdirectory'))


            

Reported by Pylint.

Instance of 'ResourceTests' has no 'assertFalse' member
Error

Line: 25 Column: 9

              
    def test_is_resource_subresource_directory(self):
        # Directories are not resources.
        self.assertFalse(resources.is_resource(self.data, 'subdirectory'))

    def test_contents(self):
        contents = set(resources.contents(self.data))
        # There may be cruft in the directory listing of the data directory.
        # It could have a __pycache__ directory,

            

Reported by Pylint.

pipenv/vendor/requests/utils.py
55 issues
Attempted relative import beyond top-level package
Error

Line: 25 Column: 1

              from collections import OrderedDict
from urllib3.util import make_headers

from .__version__ import __version__
from . import certs
# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              from urllib3.util import make_headers

from .__version__ import __version__
from . import certs
# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (
    quote, urlparse, bytes, str, unquote, getproxies,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              from .__version__ import __version__
from . import certs
# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (
    quote, urlparse, bytes, str, unquote, getproxies,
    proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              from . import certs
# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (
    quote, urlparse, bytes, str, unquote, getproxies,
    proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)
from .cookies import cookiejar_from_dict

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              # to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (
    quote, urlparse, bytes, str, unquote, getproxies,
    proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)
from .cookies import cookiejar_from_dict
from .structures import CaseInsensitiveDict

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 34 Column: 1

                  quote, urlparse, bytes, str, unquote, getproxies,
    proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)
from .cookies import cookiejar_from_dict
from .structures import CaseInsensitiveDict
from .exceptions import (
    InvalidURL, InvalidHeader, FileModeWarning, UnrewindableBodyError)

NETRC_FILES = ('.netrc', '_netrc')

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 35 Column: 1

                  proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)
from .cookies import cookiejar_from_dict
from .structures import CaseInsensitiveDict
from .exceptions import (
    InvalidURL, InvalidHeader, FileModeWarning, UnrewindableBodyError)

NETRC_FILES = ('.netrc', '_netrc')


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 36 Column: 1

                  proxy_bypass_environment, getproxies_environment, Mapping)
from .cookies import cookiejar_from_dict
from .structures import CaseInsensitiveDict
from .exceptions import (
    InvalidURL, InvalidHeader, FileModeWarning, UnrewindableBodyError)

NETRC_FILES = ('.netrc', '_netrc')

DEFAULT_CA_BUNDLE_PATH = certs.where()

            

Reported by Pylint.

function already defined line 30
Error

Line: 93 Column: 5

                              return True
        return False

    def proxy_bypass(host):  # noqa
        """Return True, if the host should be bypassed.

        Checks proxy settings gathered from the environment, if specified,
        or the registry.
        """

            

Reported by Pylint.

Unused to_native_string imported from _internal_utils
Error

Line: 28 Column: 1

              from .__version__ import __version__
from . import certs
# to_native_string is unused here, but imported here for backwards compatibility
from ._internal_utils import to_native_string
from .compat import parse_http_list as _parse_list_header
from .compat import (
    quote, urlparse, bytes, str, unquote, getproxies,
    proxy_bypass, urlunparse, basestring, integer_types, is_py3,
    proxy_bypass_environment, getproxies_environment, Mapping)

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/retrying.py
55 issues
TODO add chaining of stop behaviors
Error

Line: 84 Column: 3

                      self._wait_exponential_max = MAX_WAIT if wait_exponential_max is None else wait_exponential_max
        self._wait_jitter_max = 0 if wait_jitter_max is None else wait_jitter_max

        # TODO add chaining of stop behaviors
        # stop behavior
        stop_funcs = []
        if stop_max_attempt_number is not None:
            stop_funcs.append(self.stop_after_attempt)


            

Reported by Pylint.

TODO add chaining of wait behaviors
Error

Line: 102 Column: 3

                      else:
            self.stop = getattr(self, stop)

        # TODO add chaining of wait behaviors
        # wait behavior
        wait_funcs = [lambda *args, **kwargs: 0]
        if wait_fixed is not None:
            wait_funcs.append(self.fixed_sleep)


            

Reported by Pylint.

TODO simplify retrying by Exception types
Error

Line: 132 Column: 3

                      else:
            self._retry_on_exception = retry_on_exception

        # TODO simplify retrying by Exception types
        # retry on result filter
        if retry_on_result is None:
            self._retry_on_result = self.never_reject
        else:
            self._retry_on_result = retry_on_result

            

Reported by Pylint.

Unused argument 'delay_since_first_attempt_ms'
Error

Line: 141 Column: 59

              
        self._wrap_exception = wrap_exception

    def stop_after_attempt(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Stop after the previous attempt >= stop_max_attempt_number."""
        return previous_attempt_number >= self._stop_max_attempt_number

    def stop_after_delay(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Stop after the time from the first attempt >= stop_max_delay."""

            

Reported by Pylint.

Unused argument 'previous_attempt_number'
Error

Line: 145 Column: 32

                      """Stop after the previous attempt >= stop_max_attempt_number."""
        return previous_attempt_number >= self._stop_max_attempt_number

    def stop_after_delay(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Stop after the time from the first attempt >= stop_max_delay."""
        return delay_since_first_attempt_ms >= self._stop_max_delay

    def no_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Don't sleep at all before retrying."""

            

Reported by Pylint.

Unused argument 'previous_attempt_number'
Error

Line: 149 Column: 24

                      """Stop after the time from the first attempt >= stop_max_delay."""
        return delay_since_first_attempt_ms >= self._stop_max_delay

    def no_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Don't sleep at all before retrying."""
        return 0

    def fixed_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a fixed amount of time between each retry."""

            

Reported by Pylint.

Unused argument 'delay_since_first_attempt_ms'
Error

Line: 149 Column: 49

                      """Stop after the time from the first attempt >= stop_max_delay."""
        return delay_since_first_attempt_ms >= self._stop_max_delay

    def no_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Don't sleep at all before retrying."""
        return 0

    def fixed_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a fixed amount of time between each retry."""

            

Reported by Pylint.

Unused argument 'delay_since_first_attempt_ms'
Error

Line: 153 Column: 52

                      """Don't sleep at all before retrying."""
        return 0

    def fixed_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a fixed amount of time between each retry."""
        return self._wait_fixed

    def random_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a random amount of time between wait_random_min and wait_random_max"""

            

Reported by Pylint.

Unused argument 'previous_attempt_number'
Error

Line: 153 Column: 27

                      """Don't sleep at all before retrying."""
        return 0

    def fixed_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a fixed amount of time between each retry."""
        return self._wait_fixed

    def random_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a random amount of time between wait_random_min and wait_random_max"""

            

Reported by Pylint.

Unused argument 'delay_since_first_attempt_ms'
Error

Line: 157 Column: 53

                      """Sleep a fixed amount of time between each retry."""
        return self._wait_fixed

    def random_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """Sleep a random amount of time between wait_random_min and wait_random_max"""
        return random.randint(self._wait_random_min, self._wait_random_max)

    def incrementing_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
        """

            

Reported by Pylint.

pipenv/patched/piptools/repositories/pypi.py
54 issues
Unable to import 'pip_shims.shims'
Error

Line: 11 Column: 1

              from contextlib import contextmanager
from shutil import rmtree

from pip_shims.shims import (
    TempDirectory,
    global_tempdir_manager,
    get_requirement_tracker,
    InstallCommand
)

            

Reported by Pylint.

Unable to import 'packaging.requirements'
Error

Line: 17 Column: 1

                  get_requirement_tracker,
    InstallCommand
)
from packaging.requirements import Requirement
from packaging.specifiers import Specifier, SpecifierSet

from .._compat import (
    FAVORITE_HASH,
    PIP_VERSION,

            

Reported by Pylint.

Unable to import 'packaging.specifiers'
Error

Line: 18 Column: 1

                  InstallCommand
)
from packaging.requirements import Requirement
from packaging.specifiers import Specifier, SpecifierSet

from .._compat import (
    FAVORITE_HASH,
    PIP_VERSION,
    InstallationError,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from packaging.requirements import Requirement
from packaging.specifiers import Specifier, SpecifierSet

from .._compat import (
    FAVORITE_HASH,
    PIP_VERSION,
    InstallationError,
    InstallRequirement,
    Link,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 40 Column: 1

                  pip_version,
    url_to_path,
)
from ..locations import CACHE_DIR
from ..click import progressbar
from ..exceptions import NoCandidateFound
from ..logging import log
from ..utils import (
    dedup,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 41 Column: 1

                  url_to_path,
)
from ..locations import CACHE_DIR
from ..click import progressbar
from ..exceptions import NoCandidateFound
from ..logging import log
from ..utils import (
    dedup,
    clean_requires_python,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 42 Column: 1

              )
from ..locations import CACHE_DIR
from ..click import progressbar
from ..exceptions import NoCandidateFound
from ..logging import log
from ..utils import (
    dedup,
    clean_requires_python,
    fs_str,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 43 Column: 1

              from ..locations import CACHE_DIR
from ..click import progressbar
from ..exceptions import NoCandidateFound
from ..logging import log
from ..utils import (
    dedup,
    clean_requires_python,
    fs_str,
    is_pinned_requirement,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 44 Column: 1

              from ..click import progressbar
from ..exceptions import NoCandidateFound
from ..logging import log
from ..utils import (
    dedup,
    clean_requires_python,
    fs_str,
    is_pinned_requirement,
    is_url_requirement,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 53 Column: 1

                  lookup_table,
    make_install_requirement,
)
from .base import BaseRepository

os.environ["PIP_SHIMS_BASE_MODULE"] = str("pipenv.patched.notpip")
FILE_CHUNK_SIZE = 4096
FileStream = collections.namedtuple("FileStream", "stream size")


            

Reported by Pylint.

pipenv/vendor/urllib3/connection.py
53 issues
Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

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

from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401
from .util.proxy import create_proxy_ssl_context

try:  # Compiled with SSL?

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              from socket import timeout as SocketTimeout

from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401
from .util.proxy import create_proxy_ssl_context

try:  # Compiled with SSL?
    import ssl

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 14 Column: 1

              
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401
from .util.proxy import create_proxy_ssl_context

try:  # Compiled with SSL?
    import ssl


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401
from .util.proxy import create_proxy_ssl_context

try:  # Compiled with SSL?
    import ssl

    BaseSSLError = ssl.SSLError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 46 Column: 1

                      pass


from ._collections import HTTPHeaderDict  # noqa (historical, removed in v2)
from ._version import __version__
from .exceptions import (
    ConnectTimeoutError,
    NewConnectionError,
    SubjectAltNameWarning,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 47 Column: 1

              

from ._collections import HTTPHeaderDict  # noqa (historical, removed in v2)
from ._version import __version__
from .exceptions import (
    ConnectTimeoutError,
    NewConnectionError,
    SubjectAltNameWarning,
    SystemTimeWarning,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 48 Column: 1

              
from ._collections import HTTPHeaderDict  # noqa (historical, removed in v2)
from ._version import __version__
from .exceptions import (
    ConnectTimeoutError,
    NewConnectionError,
    SubjectAltNameWarning,
    SystemTimeWarning,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 54 Column: 1

                  SubjectAltNameWarning,
    SystemTimeWarning,
)
from .packages.ssl_match_hostname import CertificateError, match_hostname
from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection
from .util.ssl_ import (
    assert_fingerprint,
    create_urllib3_context,
    resolve_cert_reqs,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 55 Column: 1

                  SystemTimeWarning,
)
from .packages.ssl_match_hostname import CertificateError, match_hostname
from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection
from .util.ssl_ import (
    assert_fingerprint,
    create_urllib3_context,
    resolve_cert_reqs,
    resolve_ssl_version,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 56 Column: 1

              )
from .packages.ssl_match_hostname import CertificateError, match_hostname
from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection
from .util.ssl_ import (
    assert_fingerprint,
    create_urllib3_context,
    resolve_cert_reqs,
    resolve_ssl_version,
    ssl_wrap_socket,

            

Reported by Pylint.