The following issues were found

pipenv/patched/notpip/_vendor/html5lib/_trie/py.py
10 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
from bisect import bisect_left

from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        if not all(isinstance(x, text_type) for x in data.keys()):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import, division, unicode_literals
from pipenv.patched.notpip._vendor.six import text_type

from bisect import bisect_left

from ._base import Trie as ABCTrie


class Trie(ABCTrie):

            

Reported by Pylint.

standard import "from bisect import bisect_left" should be placed before "from pipenv.patched.notpip._vendor.six import text_type"
Error

Line: 4 Column: 1

              from __future__ import absolute_import, division, unicode_literals
from pipenv.patched.notpip._vendor.six import text_type

from bisect import bisect_left

from ._base import Trie as ABCTrie


class Trie(ABCTrie):

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              from ._base import Trie as ABCTrie


class Trie(ABCTrie):
    def __init__(self, data):
        if not all(isinstance(x, text_type) for x in data.keys()):
            raise TypeError("All keys must be strings")

        self._data = data

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 31 Column: 5

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

    def keys(self, prefix=None):
        if prefix is None or prefix == "" or not self._keys:
            return set(self._keys)

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints

            

Reported by Pylint.

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

Line: 36 Column: 13

                          return set(self._keys)

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            start = i = bisect_left(self._keys, prefix, lo, hi)
        else:
            start = i = bisect_left(self._keys, prefix)

        keys = set()

            

Reported by Pylint.

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

Line: 36 Column: 17

                          return set(self._keys)

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            start = i = bisect_left(self._keys, prefix, lo, hi)
        else:
            start = i = bisect_left(self._keys, prefix)

        keys = set()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 54 Column: 5

              
        return keys

    def has_keys_with_prefix(self, prefix):
        if prefix in self._data:
            return True

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints

            

Reported by Pylint.

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

Line: 59 Column: 17

                          return True

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            i = bisect_left(self._keys, prefix, lo, hi)
        else:
            i = bisect_left(self._keys, prefix)

        if i == len(self._keys):

            

Reported by Pylint.

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

Line: 59 Column: 13

                          return True

        if prefix.startswith(self._cachestr):
            lo, hi = self._cachepoints
            i = bisect_left(self._keys, prefix, lo, hi)
        else:
            i = bisect_left(self._keys, prefix)

        if i == len(self._keys):

            

Reported by Pylint.

pipenv/vendor/distlib/markers.py
10 issues
Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              import sys
import platform

from .compat import string_types
from .util import in_venv, parse_marker

__all__ = ['interpret']

def _is_literal(o):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              import platform

from .compat import string_types
from .util import in_venv, parse_marker

__all__ = ['interpret']

def _is_literal(o):
    if not isinstance(o, string_types) or not o:

            

Reported by Pylint.

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

Line: 124 Column: 9

                  try:
        expr, rest = parse_marker(marker)
    except Exception as e:
        raise SyntaxError('Unable to interpret marker syntax: %s: %s' % (marker, e))
    if rest and rest[0] != '#':
        raise SyntaxError('unexpected trailing data in marker: %s: %s' % (marker, rest))
    context = dict(DEFAULT_CONTEXT)
    if execution_context:
        context.update(execution_context)

            

Reported by Pylint.

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

Line: 24 Column: 1

              
__all__ = ['interpret']

def _is_literal(o):
    if not isinstance(o, string_types) or not o:
        return False
    return o[0] in '\'"'

class Evaluator(object):

            

Reported by Pylint.

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

Line: 29 Column: 1

                      return False
    return o[0] in '\'"'

class Evaluator(object):
    """
    This class is used to evaluate marker expessions.
    """

    operations = {

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 29 Column: 1

                      return False
    return o[0] in '\'"'

class Evaluator(object):
    """
    This class is used to evaluate marker expessions.
    """

    operations = {

            

Reported by Pylint.

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

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

                                  raise SyntaxError('unknown variable: %s' % expr)
                result = context[expr]
        else:
            assert isinstance(expr, dict)
            op = expr['op']
            if op not in self.operations:
                raise NotImplementedError('op not implemented: %s' % op)
            elhs = expr['lhs']
            erhs = expr['rhs']

            

Reported by Bandit.

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

Line: 63 Column: 13

                              result = context[expr]
        else:
            assert isinstance(expr, dict)
            op = expr['op']
            if op not in self.operations:
                raise NotImplementedError('op not implemented: %s' % op)
            elhs = expr['lhs']
            erhs = expr['rhs']
            if _is_literal(expr['lhs']) and _is_literal(expr['rhs']):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 76 Column: 1

                          result = self.operations[op](lhs, rhs)
        return result

def default_context():
    def format_full_version(info):
        version = '%s.%s.%s' % (info.major, info.minor, info.micro)
        kind = info.releaselevel
        if kind != 'final':
            version += kind[0] + str(info.serial)

            

Reported by Pylint.

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

Line: 123 Column: 5

                  """
    try:
        expr, rest = parse_marker(marker)
    except Exception as e:
        raise SyntaxError('Unable to interpret marker syntax: %s: %s' % (marker, e))
    if rest and rest[0] != '#':
        raise SyntaxError('unexpected trailing data in marker: %s: %s' % (marker, rest))
    context = dict(DEFAULT_CONTEXT)
    if execution_context:

            

Reported by Pylint.

pipenv/patched/yaml3/error.py
10 issues
__init__ method from base class 'YAMLError' is not called
Error

Line: 50 Column: 5

              
class MarkedYAMLError(YAMLError):

    def __init__(self, context=None, context_mark=None,
            problem=None, problem_mark=None, note=None):
        self.context = context
        self.context_mark = context_mark
        self.problem = problem
        self.problem_mark = problem_mark

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError']

class Mark:

    def __init__(self, name, index, line, column, buffer, pointer):
        self.name = name
        self.index = index
        self.line = line

            

Reported by Pylint.

Missing class docstring
Error

Line: 4 Column: 1

              
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError']

class Mark:

    def __init__(self, name, index, line, column, buffer, pointer):
        self.name = name
        self.index = index
        self.line = line

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 6 Column: 5

              
class Mark:

    def __init__(self, name, index, line, column, buffer, pointer):
        self.name = name
        self.index = index
        self.line = line
        self.column = column
        self.buffer = buffer

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 5

                      self.buffer = buffer
        self.pointer = pointer

    def get_snippet(self, indent=4, max_length=75):
        if self.buffer is None:
            return None
        head = ''
        start = self.pointer
        while start > 0 and self.buffer[start-1] not in '\0\r\n\x85\u2028\u2029':

            

Reported by Pylint.

Missing class docstring
Error

Line: 45 Column: 1

                          where += ":\n"+snippet
        return where

class YAMLError(Exception):
    pass

class MarkedYAMLError(YAMLError):

    def __init__(self, context=None, context_mark=None,

            

Reported by Pylint.

Missing class docstring
Error

Line: 48 Column: 1

              class YAMLError(Exception):
    pass

class MarkedYAMLError(YAMLError):

    def __init__(self, context=None, context_mark=None,
            problem=None, problem_mark=None, note=None):
        self.context = context
        self.context_mark = context_mark

            

Reported by Pylint.

Too many arguments (6/5)
Error

Line: 50 Column: 5

              
class MarkedYAMLError(YAMLError):

    def __init__(self, context=None, context_mark=None,
            problem=None, problem_mark=None, note=None):
        self.context = context
        self.context_mark = context_mark
        self.problem = problem
        self.problem_mark = problem_mark

            

Reported by Pylint.

Too many boolean expressions in if statement (6/5)
Error

Line: 62 Column: 12

                      lines = []
        if self.context is not None:
            lines.append(self.context)
        if self.context_mark is not None  \
            and (self.problem is None or self.problem_mark is None
                    or self.context_mark.name != self.problem_mark.name
                    or self.context_mark.line != self.problem_mark.line
                    or self.context_mark.column != self.problem_mark.column):
            lines.append(str(self.context_mark))

            

Reported by Pylint.

Trailing newlines
Error

Line: 75 Column: 1

                      if self.note is not None:
            lines.append(self.note)
        return '\n'.join(lines)


            

Reported by Pylint.

pipenv/patched/notpip/_vendor/webencodings/x_user_defined.py
10 issues
Redefining built-in 'input'
Error

Line: 23 Column: 22

              
class Codec(codecs.Codec):

    def encode(self, input, errors='strict'):
        return codecs.charmap_encode(input, errors, encoding_table)

    def decode(self, input, errors='strict'):
        return codecs.charmap_decode(input, errors, decoding_table)


            

Reported by Pylint.

Redefining built-in 'input'
Error

Line: 26 Column: 22

                  def encode(self, input, errors='strict'):
        return codecs.charmap_encode(input, errors, encoding_table)

    def decode(self, input, errors='strict'):
        return codecs.charmap_decode(input, errors, decoding_table)


class IncrementalEncoder(codecs.IncrementalEncoder):
    def encode(self, input, final=False):

            

Reported by Pylint.

Redefining built-in 'input'
Error

Line: 31 Column: 22

              

class IncrementalEncoder(codecs.IncrementalEncoder):
    def encode(self, input, final=False):
        return codecs.charmap_encode(input, self.errors, encoding_table)[0]


class IncrementalDecoder(codecs.IncrementalDecoder):
    def decode(self, input, final=False):

            

Reported by Pylint.

Redefining built-in 'input'
Error

Line: 36 Column: 22

              

class IncrementalDecoder(codecs.IncrementalDecoder):
    def decode(self, input, final=False):
        return codecs.charmap_decode(input, self.errors, decoding_table)[0]


class StreamWriter(Codec, codecs.StreamWriter):
    pass

            

Reported by Pylint.

Missing class docstring
Error

Line: 21 Column: 1

              
### Codec APIs

class Codec(codecs.Codec):

    def encode(self, input, errors='strict'):
        return codecs.charmap_encode(input, errors, encoding_table)

    def decode(self, input, errors='strict'):

            

Reported by Pylint.

Missing class docstring
Error

Line: 30 Column: 1

                      return codecs.charmap_decode(input, errors, decoding_table)


class IncrementalEncoder(codecs.IncrementalEncoder):
    def encode(self, input, final=False):
        return codecs.charmap_encode(input, self.errors, encoding_table)[0]


class IncrementalDecoder(codecs.IncrementalDecoder):

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

                      return codecs.charmap_encode(input, self.errors, encoding_table)[0]


class IncrementalDecoder(codecs.IncrementalDecoder):
    def decode(self, input, final=False):
        return codecs.charmap_decode(input, self.errors, decoding_table)[0]


class StreamWriter(Codec, codecs.StreamWriter):

            

Reported by Pylint.

Missing class docstring
Error

Line: 40 Column: 1

                      return codecs.charmap_decode(input, self.errors, decoding_table)[0]


class StreamWriter(Codec, codecs.StreamWriter):
    pass


class StreamReader(Codec, codecs.StreamReader):
    pass

            

Reported by Pylint.

Missing class docstring
Error

Line: 44 Column: 1

                  pass


class StreamReader(Codec, codecs.StreamReader):
    pass


### encodings module API


            

Reported by Pylint.

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

Line: 65 Column: 1

              
# Python 3:
# for c in range(256): print('    %r' % chr(c if c < 128 else c + 0xF700))
decoding_table = (
    '\x00'
    '\x01'
    '\x02'
    '\x03'
    '\x04'

            

Reported by Pylint.

pipenv/patched/notpip/_internal/operations/freeze.py
10 issues
Missing module docstring
Error

Line: 1 Column: 1

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

from __future__ import absolute_import

import collections
import logging
import os

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 43 Column: 1

              logger = logging.getLogger(__name__)


def freeze(
    requirement=None,  # type: Optional[List[str]]
    find_links=None,  # type: Optional[List[str]]
    local_only=None,  # type: Optional[bool]
    user_only=None,  # type: Optional[bool]
    paths=None,  # type: Optional[List[str]]

            

Reported by Pylint.

Too many arguments (10/5)
Error

Line: 43 Column: 1

              logger = logging.getLogger(__name__)


def freeze(
    requirement=None,  # type: Optional[List[str]]
    find_links=None,  # type: Optional[List[str]]
    local_only=None,  # type: Optional[bool]
    user_only=None,  # type: Optional[bool]
    paths=None,  # type: Optional[List[str]]

            

Reported by Pylint.

Too many local variables (26/15)
Error

Line: 43 Column: 1

              logger = logging.getLogger(__name__)


def freeze(
    requirement=None,  # type: Optional[List[str]]
    find_links=None,  # type: Optional[List[str]]
    local_only=None,  # type: Optional[bool]
    user_only=None,  # type: Optional[bool]
    paths=None,  # type: Optional[List[str]]

            

Reported by Pylint.

Too many branches (24/12)
Error

Line: 43 Column: 1

              logger = logging.getLogger(__name__)


def freeze(
    requirement=None,  # type: Optional[List[str]]
    find_links=None,  # type: Optional[List[str]]
    local_only=None,  # type: Optional[bool]
    user_only=None,  # type: Optional[bool]
    paths=None,  # type: Optional[List[str]]

            

Reported by Pylint.

Too many statements (52/50)
Error

Line: 43 Column: 1

              logger = logging.getLogger(__name__)


def freeze(
    requirement=None,  # type: Optional[List[str]]
    find_links=None,  # type: Optional[List[str]]
    local_only=None,  # type: Optional[bool]
    user_only=None,  # type: Optional[bool]
    paths=None,  # type: Optional[List[str]]

            

Reported by Pylint.

Import outside toplevel (pipenv.patched.notpip._internal.vcs.vcs, pipenv.patched.notpip._internal.vcs.RemoteNotFoundError)
Error

Line: 192 Column: 5

              
    location = os.path.normcase(os.path.abspath(dist.location))

    from pipenv.patched.notpip._internal.vcs import vcs, RemoteNotFoundError
    vcs_backend = vcs.get_backend_for_dir(location)

    if vcs_backend is None:
        req = dist.as_requirement()
        logger.debug(

            

Reported by Pylint.

Missing class docstring
Error

Line: 243 Column: 1

                  return (None, False, comments)


class FrozenRequirement(object):
    def __init__(self, name, req, editable, comments=()):
        # type: (str, Union[str, Requirement], bool, Iterable[str]) -> None
        self.name = name
        self.canonical_name = canonicalize_name(name)
        self.req = req

            

Reported by Pylint.

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

Line: 243 Column: 1

                  return (None, False, comments)


class FrozenRequirement(object):
    def __init__(self, name, req, editable, comments=()):
        # type: (str, Union[str, Requirement], bool, Iterable[str]) -> None
        self.name = name
        self.canonical_name = canonicalize_name(name)
        self.req = req

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 253 Column: 5

                      self.comments = comments

    @classmethod
    def from_dist(cls, dist):
        # type: (Distribution) -> FrozenRequirement
        req, editable, comments = get_requirement_info(dist)
        if req is None:
            req = dist.as_requirement()


            

Reported by Pylint.

pipenv/patched/notpip/_vendor/urllib3/_collections.py
10 issues
Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              

from collections import OrderedDict
from .exceptions import InvalidHeader
from .packages.six import iterkeys, itervalues, PY3


__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              
from collections import OrderedDict
from .exceptions import InvalidHeader
from .packages.six import iterkeys, itervalues, PY3


__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]



            

Reported by Pylint.

Access to a protected member _copy_from of a client class
Error

Line: 291 Column: 9

              
    def copy(self):
        clone = type(self)()
        clone._copy_from(self)
        return clone

    def iteritems(self):
        """Iterate over all header lines, including duplicate ones."""
        for key in self:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import

try:
    from collections.abc import Mapping, MutableMapping
except ImportError:
    from collections import Mapping, MutableMapping
try:
    from threading import RLock
except ImportError:  # Platform-specific: No threads available

            

Reported by Pylint.

Missing class docstring
Error

Line: 11 Column: 5

                  from threading import RLock
except ImportError:  # Platform-specific: No threads available

    class RLock:
        def __enter__(self):
            pass

        def __exit__(self, exc_type, exc_value, traceback):
            pass

            

Reported by Pylint.

Imports from package collections are not grouped
Error

Line: 19 Column: 1

                          pass


from collections import OrderedDict
from .exceptions import InvalidHeader
from .packages.six import iterkeys, itervalues, PY3


__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 141 Column: 9

                  """

    def __init__(self, headers=None, **kwargs):
        super(HTTPHeaderDict, self).__init__()
        self._container = OrderedDict()
        if headers is not None:
            if isinstance(headers, HTTPHeaderDict):
                self._copy_from(headers)
            else:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 208 Column: 5

                          del self[key]
            return value

    def discard(self, key):
        try:
            del self[key]
        except KeyError:
            pass


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 289 Column: 5

                              val = list(val)
            self._container[key.lower()] = [key] + val

    def copy(self):
        clone = type(self)()
        clone._copy_from(self)
        return clone

    def iteritems(self):

            

Reported by Pylint.

Unnecessary "else" after "raise"
Error

Line: 321 Column: 17

              
        for line in message.headers:
            if line.startswith(obs_fold_continued_leaders):
                if not headers:
                    # We received a header line that starts with OWS as described
                    # in RFC-7230 S3.2.4. This indicates a multiline header, but
                    # there exists no previous header to which we can attach it.
                    raise InvalidHeader(
                        "Header continuation with no previous header: %s" % line

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/pep517/compat.py
10 issues
Assigning the same variable 'FileNotFoundError' to itself
Error

Line: 32 Column: 5

              # FileNotFoundError

try:
    FileNotFoundError = FileNotFoundError
except NameError:
    FileNotFoundError = IOError

            

Reported by Pylint.

Redefining built-in 'FileNotFoundError'
Error

Line: 32 Column: 5

              # FileNotFoundError

try:
    FileNotFoundError = FileNotFoundError
except NameError:
    FileNotFoundError = IOError

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 10 Column: 5

              
if sys.version_info[0] >= 3:
    # Python 3
    def write_json(obj, path, **kwargs):
        with open(path, 'w', encoding='utf-8') as f:
            json.dump(obj, f, **kwargs)

    def read_json(path):
        with open(path, 'r', encoding='utf-8') as f:

            

Reported by Pylint.

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

Line: 11 Column: 51

              if sys.version_info[0] >= 3:
    # Python 3
    def write_json(obj, path, **kwargs):
        with open(path, 'w', encoding='utf-8') as f:
            json.dump(obj, f, **kwargs)

    def read_json(path):
        with open(path, 'r', encoding='utf-8') as f:
            return json.load(f)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 5

                      with open(path, 'w', encoding='utf-8') as f:
            json.dump(obj, f, **kwargs)

    def read_json(path):
        with open(path, 'r', encoding='utf-8') as f:
            return json.load(f)

else:
    # Python 2

            

Reported by Pylint.

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

Line: 15 Column: 51

                          json.dump(obj, f, **kwargs)

    def read_json(path):
        with open(path, 'r', encoding='utf-8') as f:
            return json.load(f)

else:
    # Python 2
    def write_json(obj, path, **kwargs):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 20 Column: 5

              
else:
    # Python 2
    def write_json(obj, path, **kwargs):
        with open(path, 'wb') as f:
            json.dump(obj, f, encoding='utf-8', **kwargs)

    def read_json(path):
        with open(path, 'rb') as f:

            

Reported by Pylint.

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

Line: 21 Column: 34

              else:
    # Python 2
    def write_json(obj, path, **kwargs):
        with open(path, 'wb') as f:
            json.dump(obj, f, encoding='utf-8', **kwargs)

    def read_json(path):
        with open(path, 'rb') as f:
            return json.load(f)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 24 Column: 5

                      with open(path, 'wb') as f:
            json.dump(obj, f, encoding='utf-8', **kwargs)

    def read_json(path):
        with open(path, 'rb') as f:
            return json.load(f)


# FileNotFoundError

            

Reported by Pylint.

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

Line: 25 Column: 34

                          json.dump(obj, f, encoding='utf-8', **kwargs)

    def read_json(path):
        with open(path, 'rb') as f:
            return json.load(f)


# FileNotFoundError


            

Reported by Pylint.

pipenv/vendor/dateutil/_common.py
10 issues
Redefining name 'weekday' from outer scope (line 6)
Error

Line: 9 Column: 24

              class weekday(object):
    __slots__ = ["weekday", "n"]

    def __init__(self, weekday, n=None):
        self.weekday = weekday
        self.n = n

    def __call__(self, n):
        if n == self.n:

            

Reported by Pylint.

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

Line: 6 Column: 1

              """


class weekday(object):
    __slots__ = ["weekday", "n"]

    def __init__(self, weekday, n=None):
        self.weekday = weekday
        self.n = n

            

Reported by Pylint.

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

Line: 6 Column: 1

              """


class weekday(object):
    __slots__ = ["weekday", "n"]

    def __init__(self, weekday, n=None):
        self.weekday = weekday
        self.n = n

            

Reported by Pylint.

Missing class docstring
Error

Line: 6 Column: 1

              """


class weekday(object):
    __slots__ = ["weekday", "n"]

    def __init__(self, weekday, n=None):
        self.weekday = weekday
        self.n = n

            

Reported by Pylint.

Attribute name "n" doesn't conform to snake_case naming style
Error

Line: 11 Column: 9

              
    def __init__(self, weekday, n=None):
        self.weekday = weekday
        self.n = n

    def __call__(self, n):
        if n == self.n:
            return self
        else:

            

Reported by Pylint.

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

Line: 13 Column: 5

                      self.weekday = weekday
        self.n = n

    def __call__(self, n):
        if n == self.n:
            return self
        else:
            return self.__class__(self.weekday, n)


            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 14 Column: 9

                      self.n = n

    def __call__(self, n):
        if n == self.n:
            return self
        else:
            return self.__class__(self.weekday, n)

    def __eq__(self, other):

            

Reported by Pylint.

Unnecessary parens after 'not' keyword
Error

Line: 34 Column: 1

                      ))

    def __ne__(self, other):
        return not (self == other)

    def __repr__(self):
        s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday]
        if not self.n:
            return s

            

Reported by Pylint.

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

Line: 37 Column: 9

                      return not (self == other)

    def __repr__(self):
        s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday]
        if not self.n:
            return s
        else:
            return "%s(%+d)" % (s, self.n)


            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 38 Column: 9

              
    def __repr__(self):
        s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday]
        if not self.n:
            return s
        else:
            return "%s(%+d)" % (s, self.n)

# vim:ts=4:sw=4:et

            

Reported by Pylint.

pipenv/vendor/pip_shims/environment.py
9 issues
Missing function or method docstring
Error

Line: 11 Column: 1

              import os


def get_base_import_path():
    base_import_path = os.environ.get("PIP_SHIMS_BASE_MODULE", "pip")
    return base_import_path


BASE_IMPORT_PATH = get_base_import_path()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 19 Column: 1

              BASE_IMPORT_PATH = get_base_import_path()


def get_pip_version(import_path=BASE_IMPORT_PATH):
    try:
        pip = importlib.import_module(import_path)
    except ImportError:
        if import_path != "pip":
            return get_pip_version(import_path="pip")

            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 23 Column: 9

                  try:
        pip = importlib.import_module(import_path)
    except ImportError:
        if import_path != "pip":
            return get_pip_version(import_path="pip")
        else:
            import subprocess

            version = subprocess.check_output(["pip", "--version"])

            

Reported by Pylint.

Consider possible security implications associated with subprocess module.
Security blacklist

Line: 26
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess

                      if import_path != "pip":
            return get_pip_version(import_path="pip")
        else:
            import subprocess

            version = subprocess.check_output(["pip", "--version"])
            if version:
                version = version.decode("utf-8").split()[1]
                return version

            

Reported by Bandit.

Import outside toplevel (subprocess)
Error

Line: 26 Column: 13

                      if import_path != "pip":
            return get_pip_version(import_path="pip")
        else:
            import subprocess

            version = subprocess.check_output(["pip", "--version"])
            if version:
                version = version.decode("utf-8").split()[1]
                return version

            

Reported by Pylint.

Starting a process with a partial executable path
Security injection

Line: 28
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b607_start_process_with_partial_path.html

                      else:
            import subprocess

            version = subprocess.check_output(["pip", "--version"])
            if version:
                version = version.decode("utf-8").split()[1]
                return version
            return "0.0.0"
    version = getattr(pip, "__version__", None)

            

Reported by Bandit.

subprocess call - check for execution of untrusted input.
Security injection

Line: 28
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b603_subprocess_without_shell_equals_true.html

                      else:
            import subprocess

            version = subprocess.check_output(["pip", "--version"])
            if version:
                version = version.decode("utf-8").split()[1]
                return version
            return "0.0.0"
    version = getattr(pip, "__version__", None)

            

Reported by Bandit.

Missing function or method docstring
Error

Line: 37 Column: 1

                  return version


def is_type_checking():
    try:
        from typing import TYPE_CHECKING
    except ImportError:
        return False
    return TYPE_CHECKING

            

Reported by Pylint.

Import outside toplevel (typing.TYPE_CHECKING)
Error

Line: 39 Column: 9

              
def is_type_checking():
    try:
        from typing import TYPE_CHECKING
    except ImportError:
        return False
    return TYPE_CHECKING



            

Reported by Pylint.

pipenv/patched/notpip/_vendor/msgpack/__init__.py
9 issues
Unable to import '__init__._version'
Error

Line: 2 Column: 1

              # coding: utf-8
from ._version import version
from .exceptions import *

from collections import namedtuple


class ExtType(namedtuple('ExtType', 'code data')):
    """ExtType represents ext type in msgpack."""

            

Reported by Pylint.

Unable to import '__init__.exceptions'
Error

Line: 3 Column: 1

              # coding: utf-8
from ._version import version
from .exceptions import *

from collections import namedtuple


class ExtType(namedtuple('ExtType', 'code data')):
    """ExtType represents ext type in msgpack."""

            

Reported by Pylint.

Unable to import '__init__.fallback'
Error

Line: 22 Column: 5

              
import os
if os.environ.get('MSGPACK_PUREPYTHON'):
    from .fallback import Packer, unpackb, Unpacker
else:
    try:
        from ._cmsgpack import Packer, unpackb, Unpacker
    except ImportError:
        from .fallback import Packer, unpackb, Unpacker

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from ._version import version
from .exceptions import *

from collections import namedtuple


class ExtType(namedtuple('ExtType', 'code data')):
    """ExtType represents ext type in msgpack."""

            

Reported by Pylint.

standard import "from collections import namedtuple" should be placed before "from ._version import version"
Error

Line: 5 Column: 1

              from ._version import version
from .exceptions import *

from collections import namedtuple


class ExtType(namedtuple('ExtType', 'code data')):
    """ExtType represents ext type in msgpack."""
    def __new__(cls, code, data):

            

Reported by Pylint.

standard import "import os" should be placed before "from ._version import version"
Error

Line: 20 Column: 1

                      return super(ExtType, cls).__new__(cls, code, data)


import os
if os.environ.get('MSGPACK_PUREPYTHON'):
    from .fallback import Packer, unpackb, Unpacker
else:
    try:
        from ._cmsgpack import Packer, unpackb, Unpacker

            

Reported by Pylint.

Import "import os" should be placed at the top of the module
Error

Line: 20 Column: 1

                      return super(ExtType, cls).__new__(cls, code, data)


import os
if os.environ.get('MSGPACK_PUREPYTHON'):
    from .fallback import Packer, unpackb, Unpacker
else:
    try:
        from ._cmsgpack import Packer, unpackb, Unpacker

            

Reported by Pylint.

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

Line: 30 Column: 1

                      from .fallback import Packer, unpackb, Unpacker


def pack(o, stream, **kwargs):
    """
    Pack object `o` and write it to `stream`

    See :class:`Packer` for options.
    """

            

Reported by Pylint.

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

Line: 40 Column: 1

                  stream.write(packer.pack(o))


def packb(o, **kwargs):
    """
    Pack object `o` and return packed bytes

    See :class:`Packer` for options.
    """

            

Reported by Pylint.