The following issues were found

pipenv/patched/notpip/_internal/index/collector.py
19 issues
No name 'urllib' in module '_MovedItems'
Error

Line: 15 Column: 1

              from pipenv.patched.notpip._vendor import html5lib, requests
from pipenv.patched.notpip._vendor.distlib.compat import unescape
from pipenv.patched.notpip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.six.moves.urllib import request as urllib_request

from pipenv.patched.notpip._internal.models.link import Link
from pipenv.patched.notpip._internal.utils.filetypes import ARCHIVE_EXTENSIONS
from pipenv.patched.notpip._internal.utils.misc import redact_auth_from_url

            

Reported by Pylint.

Unable to import 'pipenv.patched.notpip._vendor.six.moves.urllib'
Error

Line: 15 Column: 1

              from pipenv.patched.notpip._vendor import html5lib, requests
from pipenv.patched.notpip._vendor.distlib.compat import unescape
from pipenv.patched.notpip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.six.moves.urllib import request as urllib_request

from pipenv.patched.notpip._internal.models.link import Link
from pipenv.patched.notpip._internal.utils.filetypes import ARCHIVE_EXTENSIONS
from pipenv.patched.notpip._internal.utils.misc import redact_auth_from_url

            

Reported by Pylint.

No name 'urllib' in module '_MovedItems'
Error

Line: 16 Column: 1

              from pipenv.patched.notpip._vendor.distlib.compat import unescape
from pipenv.patched.notpip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.six.moves.urllib import request as urllib_request

from pipenv.patched.notpip._internal.models.link import Link
from pipenv.patched.notpip._internal.utils.filetypes import ARCHIVE_EXTENSIONS
from pipenv.patched.notpip._internal.utils.misc import redact_auth_from_url
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING

            

Reported by Pylint.

Unable to import 'pipenv.patched.notpip._vendor.six.moves.urllib'
Error

Line: 16 Column: 1

              from pipenv.patched.notpip._vendor.distlib.compat import unescape
from pipenv.patched.notpip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.six.moves.urllib import request as urllib_request

from pipenv.patched.notpip._internal.models.link import Link
from pipenv.patched.notpip._internal.utils.filetypes import ARCHIVE_EXTENSIONS
from pipenv.patched.notpip._internal.utils.misc import redact_auth_from_url
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING

            

Reported by Pylint.

Unused variable 'netloc'
Error

Line: 97 Column: 13

                  Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotHTML` if the content type is not text/html.
    """
    scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
    if scheme not in {'http', 'https'}:
        raise _NotHTTP()

    resp = session.head(url, allow_redirects=True)
    resp.raise_for_status()

            

Reported by Pylint.

Unused variable 'fragment'
Error

Line: 97 Column: 34

                  Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotHTML` if the content type is not text/html.
    """
    scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
    if scheme not in {'http', 'https'}:
        raise _NotHTTP()

    resp = session.head(url, allow_redirects=True)
    resp.raise_for_status()

            

Reported by Pylint.

Unused variable 'path'
Error

Line: 97 Column: 21

                  Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotHTML` if the content type is not text/html.
    """
    scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
    if scheme not in {'http', 'https'}:
        raise _NotHTTP()

    resp = session.head(url, allow_redirects=True)
    resp.raise_for_status()

            

Reported by Pylint.

Unused variable 'query'
Error

Line: 97 Column: 27

                  Raises `_NotHTTP` if the URL is not available for a HEAD request, or
    `_NotHTML` if the content type is not text/html.
    """
    scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
    if scheme not in {'http', 'https'}:
        raise _NotHTTP()

    resp = session.head(url, allow_redirects=True)
    resp.raise_for_status()

            

Reported by Pylint.

Unused variable 'content_type'
Error

Line: 163 Column: 9

                  """Determine if we have any encoding information in our headers.
    """
    if headers and "Content-Type" in headers:
        content_type, params = cgi.parse_header(headers["Content-Type"])
        if "charset" in params:
            return params['charset']
    return None



            

Reported by Pylint.

Use lazy % formatting in logging functions
Error

Line: 412 Column: 25

                                  urls.append(url)
                else:
                    logger.warning(
                        "Path '{0}' is ignored: "
                        "it is a directory.".format(path),
                    )
            elif os.path.isfile(path):
                sort_path(path)
            else:

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/chardet/utf8prober.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              # 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              ######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL




            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              
from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



class UTF8Prober(CharSetProber):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 31 Column: 1

              from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



class UTF8Prober(CharSetProber):
    ONE_CHAR_PROB = 0.5

            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 61 Column: 17

                      for c in byte_str:
            coding_state = self.coding_sm.next_state(c)
            if coding_state == MachineState.ERROR:
                self._state = ProbingState.NOT_ME
                break
            elif coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            elif coding_state == MachineState.START:

            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 64 Column: 17

                              self._state = ProbingState.NOT_ME
                break
            elif coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            elif coding_state == MachineState.START:
                if self.coding_sm.get_current_charlen() >= 2:
                    self._num_mb_chars += 1


            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 72 Column: 17

              
        if self.state == ProbingState.DETECTING:
            if self.get_confidence() > self.SHORTCUT_THRESHOLD:
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self):
        unlike = 0.99

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

              


class UTF8Prober(CharSetProber):
    ONE_CHAR_PROB = 0.5

    def __init__(self):
        super(UTF8Prober, self).__init__()
        self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 39 Column: 9

                  ONE_CHAR_PROB = 0.5

    def __init__(self):
        super(UTF8Prober, self).__init__()
        self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)
        self._num_mb_chars = None
        self.reset()

    def reset(self):

            

Reported by Pylint.

pipenv/vendor/chardet/utf8prober.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              # 02110-1301  USA
######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              ######################### END LICENSE BLOCK #########################

from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL




            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              
from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



class UTF8Prober(CharSetProber):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 31 Column: 1

              from .charsetprober import CharSetProber
from .enums import ProbingState, MachineState
from .codingstatemachine import CodingStateMachine
from .mbcssm import UTF8_SM_MODEL



class UTF8Prober(CharSetProber):
    ONE_CHAR_PROB = 0.5

            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 61 Column: 17

                      for c in byte_str:
            coding_state = self.coding_sm.next_state(c)
            if coding_state == MachineState.ERROR:
                self._state = ProbingState.NOT_ME
                break
            elif coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            elif coding_state == MachineState.START:

            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 64 Column: 17

                              self._state = ProbingState.NOT_ME
                break
            elif coding_state == MachineState.ITS_ME:
                self._state = ProbingState.FOUND_IT
                break
            elif coding_state == MachineState.START:
                if self.coding_sm.get_current_charlen() >= 2:
                    self._num_mb_chars += 1


            

Reported by Pylint.

Attribute '_state' defined outside __init__
Error

Line: 72 Column: 17

              
        if self.state == ProbingState.DETECTING:
            if self.get_confidence() > self.SHORTCUT_THRESHOLD:
                self._state = ProbingState.FOUND_IT

        return self.state

    def get_confidence(self):
        unlike = 0.99

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

              


class UTF8Prober(CharSetProber):
    ONE_CHAR_PROB = 0.5

    def __init__(self):
        super(UTF8Prober, self).__init__()
        self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 39 Column: 9

                  ONE_CHAR_PROB = 0.5

    def __init__(self):
        super(UTF8Prober, self).__init__()
        self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)
        self._num_mb_chars = None
        self.reset()

    def reset(self):

            

Reported by Pylint.

pipenv/vendor/dateutil/parser/__init__.py
19 issues
Unable to import '__init__._parser'
Error

Line: 2 Column: 1

              # -*- coding: utf-8 -*-
from ._parser import parse, parser, parserinfo, ParserError
from ._parser import DEFAULTPARSER, DEFAULTTZPARSER
from ._parser import UnknownTimezoneWarning

from ._parser import __doc__

from .isoparser import isoparser, isoparse


            

Reported by Pylint.

Unable to import '__init__._parser'
Error

Line: 3 Column: 1

              # -*- coding: utf-8 -*-
from ._parser import parse, parser, parserinfo, ParserError
from ._parser import DEFAULTPARSER, DEFAULTTZPARSER
from ._parser import UnknownTimezoneWarning

from ._parser import __doc__

from .isoparser import isoparser, isoparse


            

Reported by Pylint.

Unable to import '__init__._parser'
Error

Line: 4 Column: 1

              # -*- coding: utf-8 -*-
from ._parser import parse, parser, parserinfo, ParserError
from ._parser import DEFAULTPARSER, DEFAULTTZPARSER
from ._parser import UnknownTimezoneWarning

from ._parser import __doc__

from .isoparser import isoparser, isoparse


            

Reported by Pylint.

Unable to import '__init__._parser'
Error

Line: 6 Column: 1

              from ._parser import DEFAULTPARSER, DEFAULTTZPARSER
from ._parser import UnknownTimezoneWarning

from ._parser import __doc__

from .isoparser import isoparser, isoparse

__all__ = ['parse', 'parser', 'parserinfo',
           'isoparse', 'isoparser',

            

Reported by Pylint.

Unable to import '__init__.isoparser'
Error

Line: 8 Column: 1

              
from ._parser import __doc__

from .isoparser import isoparser, isoparse

__all__ = ['parse', 'parser', 'parserinfo',
           'isoparse', 'isoparser',
           'ParserError',
           'UnknownTimezoneWarning']

            

Reported by Pylint.

Unable to import '__init__._parser'
Error

Line: 55 Column: 1

                  return private_class


from ._parser import _timelex, _resultbase
from ._parser import _tzparser, _parsetz

_timelex = __deprecate_private_class(_timelex)
_tzparser = __deprecate_private_class(_tzparser)
_resultbase = __deprecate_private_class(_resultbase)

            

Reported by Pylint.

Unable to import '__init__._parser'
Error

Line: 56 Column: 1

              

from ._parser import _timelex, _resultbase
from ._parser import _tzparser, _parsetz

_timelex = __deprecate_private_class(_timelex)
_tzparser = __deprecate_private_class(_tzparser)
_resultbase = __deprecate_private_class(_resultbase)
_parsetz = __deprecated_private_func(_parsetz)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding: utf-8 -*-
from ._parser import parse, parser, parserinfo, ParserError
from ._parser import DEFAULTPARSER, DEFAULTTZPARSER
from ._parser import UnknownTimezoneWarning

from ._parser import __doc__

from .isoparser import isoparser, isoparse


            

Reported by Pylint.

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

Line: 21 Column: 1

              # is improperly relying on it is given *some* notice.


def __deprecated_private_func(f):
    from functools import wraps
    import warnings

    msg = ('{name} is a private function and may break without warning, '
           'it will be moved and or renamed in future versions.')

            

Reported by Pylint.

Import outside toplevel (functools.wraps)
Error

Line: 22 Column: 5

              

def __deprecated_private_func(f):
    from functools import wraps
    import warnings

    msg = ('{name} is a private function and may break without warning, '
           'it will be moved and or renamed in future versions.')
    msg = msg.format(name=f.__name__)

            

Reported by Pylint.

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

Line: 6 Column: 1

              from itertools import chain
from itertools import islice

from . import nodes
from .compiler import CodeGenerator
from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              from itertools import islice

from . import nodes
from .compiler import CodeGenerator
from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              
from . import nodes
from .compiler import CodeGenerator
from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              from . import nodes
from .compiler import CodeGenerator
from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template


def native_concat(values: t.Iterable[t.Any]) -> t.Optional[t.Any]:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              from .compiler import CodeGenerator
from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template


def native_concat(values: t.Iterable[t.Any]) -> t.Optional[t.Any]:
    """Return a native Python type from the list of compiled nodes. If

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from .compiler import Frame
from .compiler import has_safe_repr
from .environment import Environment
from .environment import Template


def native_concat(values: t.Iterable[t.Any]) -> t.Optional[t.Any]:
    """Return a native Python type from the list of compiled nodes. If
    the result is a single node, its value is returned. Otherwise, the

            

Reported by Pylint.

Unused argument 'frame'
Error

Line: 67 Column: 33

                      return finalize.const(const)  # type: ignore

    def _output_child_pre(
        self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo
    ) -> None:
        if finalize.src is not None:
            self.write(finalize.src)

    def _output_child_post(

            

Reported by Pylint.

Unused argument 'node'
Error

Line: 67 Column: 15

                      return finalize.const(const)  # type: ignore

    def _output_child_pre(
        self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo
    ) -> None:
        if finalize.src is not None:
            self.write(finalize.src)

    def _output_child_post(

            

Reported by Pylint.

Unused argument 'frame'
Error

Line: 73 Column: 33

                          self.write(finalize.src)

    def _output_child_post(
        self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo
    ) -> None:
        if finalize.src is not None:
            self.write(")")



            

Reported by Pylint.

Unused argument 'node'
Error

Line: 73 Column: 15

                          self.write(finalize.src)

    def _output_child_post(
        self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo
    ) -> None:
        if finalize.src is not None:
            self.write(")")



            

Reported by Pylint.

pipenv/patched/notpip/_vendor/pytoml/writer.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              from __future__ import unicode_literals
import io, datetime, math, string, sys

from .utils import format_rfc3339

try:
    from pathlib import PurePath as _path_types
except ImportError:
    _path_types = ()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import unicode_literals
import io, datetime, math, string, sys

from .utils import format_rfc3339

try:
    from pathlib import PurePath as _path_types
except ImportError:
    _path_types = ()

            

Reported by Pylint.

Multiple imports on one line (io, datetime, math, string, sys)
Error

Line: 2 Column: 1

              from __future__ import unicode_literals
import io, datetime, math, string, sys

from .utils import format_rfc3339

try:
    from pathlib import PurePath as _path_types
except ImportError:
    _path_types = ()

            

Reported by Pylint.

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

Line: 13 Column: 5

              

if sys.version_info[0] == 3:
    long = int
    unicode = str


def dumps(obj, sort_keys=False):
    fout = io.StringIO()

            

Reported by Pylint.

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

Line: 14 Column: 5

              
if sys.version_info[0] == 3:
    long = int
    unicode = str


def dumps(obj, sort_keys=False):
    fout = io.StringIO()
    dump(obj, fout, sort_keys=sort_keys)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 17 Column: 1

                  unicode = str


def dumps(obj, sort_keys=False):
    fout = io.StringIO()
    dump(obj, fout, sort_keys=sort_keys)
    return fout.getvalue()



            

Reported by Pylint.

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

Line: 26 Column: 1

              _escapes = {'\n': 'n', '\r': 'r', '\\': '\\', '\t': 't', '\b': 'b', '\f': 'f', '"': '"'}


def _escape_string(s):
    res = []
    start = 0

    def flush():
        if start != i:

            

Reported by Pylint.

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

Line: 37 Column: 9

              
    i = 0
    while i < len(s):
        c = s[i]
        if c in '"\\\n\r\t\b\f':
            start = flush()
            res.append('\\' + _escapes[c])
        elif ord(c) < 0x20:
            start = flush()

            

Reported by Pylint.

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

Line: 51 Column: 1

              

_key_chars = string.digits + string.ascii_letters + '-_'
def _escape_id(s):
    if any(c not in _key_chars for c in s):
        return _escape_string(s)
    return s



            

Reported by Pylint.

Too many return statements (8/6)
Error

Line: 57 Column: 1

                  return s


def _format_value(v):
    if isinstance(v, bool):
        return 'true' if v else 'false'
    if isinstance(v, int) or isinstance(v, long):
        return unicode(v)
    if isinstance(v, float):

            

Reported by Pylint.

pipenv/vendor/importlib_resources/simple.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              import itertools
from typing import BinaryIO, List

from .abc import Traversable, TraversableResources


class SimpleReader(abc.ABC):
    """
    The minimum, low-level interface required from a resource

            

Reported by Pylint.

Keyword argument before variable positional arguments list in the definition of open function
Error

Line: 69 Column: 5

                  def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:
            stream = io.TextIOWrapper(*args, **kwargs)
        return stream


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 49 Column: 5

                      """

    @property
    def name(self):
        return self.package.split('.')[-1]


class ResourceHandle(Traversable):
    """

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 63 Column: 5

                      self.parent = parent
        self.name = name  # type: ignore

    def is_file(self):
        return True

    def is_dir(self):
        return False


            

Reported by Pylint.

Method could be a function
Error

Line: 63 Column: 5

                      self.parent = parent
        self.name = name  # type: ignore

    def is_file(self):
        return True

    def is_dir(self):
        return False


            

Reported by Pylint.

Method could be a function
Error

Line: 66 Column: 5

                  def is_file(self):
        return True

    def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 66 Column: 5

                  def is_file(self):
        return True

    def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 69 Column: 5

                  def is_dir(self):
        return False

    def open(self, mode='r', *args, **kwargs):
        stream = self.parent.reader.open_binary(self.name)
        if 'b' not in mode:
            stream = io.TextIOWrapper(*args, **kwargs)
        return stream


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 75 Column: 5

                          stream = io.TextIOWrapper(*args, **kwargs)
        return stream

    def joinpath(self, name):
        raise RuntimeError("Cannot traverse into a resource")


class ResourceContainer(Traversable):
    """

            

Reported by Pylint.

Method could be a function
Error

Line: 75 Column: 5

                          stream = io.TextIOWrapper(*args, **kwargs)
        return stream

    def joinpath(self, name):
        raise RuntimeError("Cannot traverse into a resource")


class ResourceContainer(Traversable):
    """

            

Reported by Pylint.

pipenv/vendor/importlib_resources/abc.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              import abc
from typing import BinaryIO, Iterable, Text

from ._compat import runtime_checkable, Protocol


class ResourceReader(metaclass=abc.ABCMeta):
    """Abstract base class for loaders to provide resource reading support."""


            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 10 Column: 6

              class ResourceReader(metaclass=abc.ABCMeta):
    """Abstract base class for loaders to provide resource reading support."""

    @abc.abstractmethod
    def open_resource(self, resource: Text) -> BinaryIO:
        """Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.

            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 22 Column: 6

                      # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def resource_path(self, resource: Text) -> Text:
        """Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise

            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 35 Column: 6

                      # it'll still do the right thing.
        raise FileNotFoundError

    @abc.abstractmethod
    def is_resource(self, path: Text) -> bool:
        """Return True if the named 'path' is a resource.

        Files are resources, directories are not.
        """

            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 43 Column: 6

                      """
        raise FileNotFoundError

    @abc.abstractmethod
    def contents(self) -> Iterable[str]:
        """Return an iterable of entries in `package`."""
        raise FileNotFoundError



            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 56 Column: 6

                  traversing directories and opening files.
    """

    @abc.abstractmethod
    def iterdir(self):
        """
        Yield Traversable objects in self
        """


            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 76 Column: 6

                      with self.open(encoding=encoding) as strm:
            return strm.read()

    @abc.abstractmethod
    def is_dir(self) -> bool:
        """
        Return True if self is a dir
        """


            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 82 Column: 6

                      Return True if self is a dir
        """

    @abc.abstractmethod
    def is_file(self) -> bool:
        """
        Return True if self is a file
        """


            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 88 Column: 6

                      Return True if self is a file
        """

    @abc.abstractmethod
    def joinpath(self, child):
        """
        Return Traversable child in self
        """


            

Reported by Pylint.

Module 'abc' has no 'abstractmethod' member
Error

Line: 100 Column: 6

                      """
        return self.joinpath(child)

    @abc.abstractmethod
    def open(self, mode='r', *args, **kwargs):
        """
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).


            

Reported by Pylint.

pipenv/vendor/plette/models/base.py
19 issues
self.item_class is not callable
Error

Line: 105 Column: 16

                      return len(self._data)

    def __getitem__(self, key):
        return self.item_class(self._data[key])

    def __setitem__(self, key, value):
        if isinstance(value, DataView):
            value = value._data
        self._data[key] = value

            

Reported by Pylint.

self.item_class is not callable
Error

Line: 152 Column: 17

                          cls.item_class.validate(d)

    def __iter__(self):
        return (self.item_class(d) for d in self._data)

    def __getitem__(self, key):
        if isinstance(key, slice):
            return type(self)(self._data[key])
        return super(DataViewSequence, self).__getitem__(key)

            

Reported by Pylint.

Access to a protected member _data of a client class
Error

Line: 161 Column: 21

              
    def append(self, value):
        if isinstance(value, DataView):
            value = value._data
        self._data.append(value)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              try:
    import cerberus
except ImportError:
    cerberus = None


class ValidationError(ValueError):
    def __init__(self, value, validator):
        super(ValidationError, self).__init__(value)

            

Reported by Pylint.

Missing class docstring
Error

Line: 7 Column: 1

                  cerberus = None


class ValidationError(ValueError):
    def __init__(self, value, validator):
        super(ValidationError, self).__init__(value)
        self.validator = validator
        self.value = value


            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 9 Column: 9

              
class ValidationError(ValueError):
    def __init__(self, value, validator):
        super(ValidationError, self).__init__(value)
        self.validator = validator
        self.value = value

    def __str__(self):
        return '{}\n{}'.format(

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 27 Column: 1

              VALIDATORS = {}


def validate(cls, data):
    if not cerberus:  # Skip validation if Cerberus is not available.
        return
    schema = cls.__SCHEMA__
    key = id(schema)
    try:

            

Reported by Pylint.

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

Line: 33 Column: 9

                  schema = cls.__SCHEMA__
    key = id(schema)
    try:
        v = VALIDATORS[key]
    except KeyError:
        v = VALIDATORS[key] = cerberus.Validator(schema, allow_unknown=True)
    if v.validate(data, normalize=False):
        return
    raise ValidationError(data, v)

            

Reported by Pylint.

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

Line: 35 Column: 9

                  try:
        v = VALIDATORS[key]
    except KeyError:
        v = VALIDATORS[key] = cerberus.Validator(schema, allow_unknown=True)
    if v.validate(data, normalize=False):
        return
    raise ValidationError(data, v)



            

Reported by Pylint.

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

Line: 41 Column: 1

                  raise ValidationError(data, v)


class DataView(object):
    """A "view" to a data.

    Validates the input mapping on creation. A subclass is expected to
    provide a `__SCHEMA__` class attribute specifying a validator schema.
    """

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/cachecontrol/caches/file_cache.py
19 issues
Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              import os
from textwrap import dedent

from ..cache import BaseCache
from ..controller import CacheController

try:
    FileNotFoundError
except NameError:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              from textwrap import dedent

from ..cache import BaseCache
from ..controller import CacheController

try:
    FileNotFoundError
except NameError:
    # py2.X

            

Reported by Pylint.

Module 'os' has no 'O_BINARY' member
Error

Line: 32 Column: 18

              
    # On Windows we'll mark this file as binary
    if hasattr(os, "O_BINARY"):
        flags |= os.O_BINARY

    # Before we open our file, we want to delete any existing file that is
    # there
    try:
        os.remove(filename)

            

Reported by Pylint.

Redefining built-in 'FileNotFoundError'
Error

Line: 12 Column: 5

                  FileNotFoundError
except NameError:
    # py2.X
    FileNotFoundError = (IOError, OSError)


def _secure_open_write(filename, fmode):
    # We only want to write to this file, so open it in write only mode
    flags = os.O_WRONLY

            

Reported by Pylint.

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

Line: 82 Column: 13

                            pip install lockfile
            """
            )
            raise ImportError(notice)

        else:
            if use_dir_lock:
                lock_class = MkdirLockFile


            

Reported by Pylint.

Access to a protected member _fn of a client class
Error

Line: 146 Column: 12

                  This does not ensure the file exists!
    """
    key = CacheController.cache_url(url)
    return filecache._fn(key)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import hashlib
import os
from textwrap import dedent

from ..cache import BaseCache
from ..controller import CacheController

try:
    FileNotFoundError

            

Reported by Pylint.

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

Line: 46 Column: 5

                  # race condition happens between the os.remove and this line, that an
    # error will be raised. Because we utilize a lockfile this should only
    # happen if someone is attempting to attack us.
    fd = os.open(filename, flags, fmode)
    try:
        return os.fdopen(fd, "wb")

    except:
        # An error occurred wrapping our FD in a file object

            

Reported by Pylint.

Missing class docstring
Error

Line: 56 Column: 1

                      raise


class FileCache(BaseCache):

    def __init__(
        self,
        directory,
        forever=False,

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 58 Column: 5

              
class FileCache(BaseCache):

    def __init__(
        self,
        directory,
        forever=False,
        filemode=0o0600,
        dirmode=0o0700,

            

Reported by Pylint.