The following issues were found

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.

pipenv/vendor/importlib_resources/tests/test_path.py
18 issues
Unable to import 'importlib_resources'
Error

Line: 4 Column: 1

              import io
import unittest

import importlib_resources as resources
from . import data01
from . import util


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

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              import unittest

import importlib_resources as resources
from . import data01
from . import util


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

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import importlib_resources as resources
from . import data01
from . import util


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

            

Reported by Pylint.

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

Line: 20 Column: 29

                      # Path should be readable.
        # Test also implicitly verifies the returned object is a pathlib.Path
        # instance.
        with resources.path(self.data, 'utf-8.file') as path:
            self.assertTrue(path.name.endswith("utf-8.file"), repr(path))
            # pathlib.Path.read_text() was introduced in Python 3.5.
            with path.open('r', encoding='utf-8') as file:
                text = file.read()
            self.assertEqual('Hello, UTF-8 world!\n', text)

            

Reported by Pylint.

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

Line: 21 Column: 13

                      # Test also implicitly verifies the returned object is a pathlib.Path
        # instance.
        with resources.path(self.data, 'utf-8.file') as path:
            self.assertTrue(path.name.endswith("utf-8.file"), repr(path))
            # pathlib.Path.read_text() was introduced in Python 3.5.
            with path.open('r', encoding='utf-8') as file:
                text = file.read()
            self.assertEqual('Hello, UTF-8 world!\n', text)


            

Reported by Pylint.

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

Line: 25 Column: 13

                          # pathlib.Path.read_text() was introduced in Python 3.5.
            with path.open('r', encoding='utf-8') as file:
                text = file.read()
            self.assertEqual('Hello, UTF-8 world!\n', text)


class PathDiskTests(PathTests, unittest.TestCase):
    data = data01


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import io
import unittest

import importlib_resources as resources
from . import data01
from . import util


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

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              from . import util


class CommonTests(util.CommonTests, unittest.TestCase):
    def execute(self, package, path):
        with resources.path(package, path):
            pass



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 10 Column: 5

              

class CommonTests(util.CommonTests, unittest.TestCase):
    def execute(self, package, path):
        with resources.path(package, path):
            pass


class PathTests:

            

Reported by Pylint.

Method could be a function
Error

Line: 10 Column: 5

              

class CommonTests(util.CommonTests, unittest.TestCase):
    def execute(self, package, path):
        with resources.path(package, path):
            pass


class PathTests:

            

Reported by Pylint.

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

Line: 17 Column: 1

              import re
import sys

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              import sys

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              
from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

logger = logging.getLogger(__name__)

            

Reported by Pylint.

Unused variable 'found'
Error

Line: 157 Column: 17

              
        elif action == 'exclude':
            for pattern in patterns:
                found = self._exclude_pattern(pattern, anchor=True)
                #if not found:
                #    logger.warning('no previously-included files '
                #                   'found matching %r', pattern)

        elif action == 'global-include':

            

Reported by Pylint.

XXX docstring lying about what the special chars are?
Error

Line: 283 Column: 3

              
        Return True if files are found.
        """
        # XXX docstring lying about what the special chars are?
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)

        # delayed loading of allfiles list
        if self.allfiles is None:

            

Reported by Pylint.

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

Line: 37 Column: 1

              #
_PYTHON_VERSION = sys.version_info[:2]

class Manifest(object):
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    """

    def __init__(self, base=None):

            

Reported by Pylint.

Import outside toplevel (stat.S_ISREG, stat.S_ISDIR, stat.S_ISLNK)
Error

Line: 61 Column: 9

                      """Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        """
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop

            

Reported by Pylint.

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

Line: 108 Column: 9

                      Return sorted files in directory order
        """

        def add_dir(dirs, d):
            dirs.add(d)
            logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')

            

Reported by Pylint.

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

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

                          logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')
                add_dir(dirs, parent)

        result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()

            

Reported by Bandit.

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

Line: 119 Column: 17

                      result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()
            for f in result:
                add_dir(dirs, os.path.dirname(f))
            result |= dirs
        return [os.path.join(*path_tuple) for path_tuple in
                sorted(os.path.split(path) for path in result)]


            

Reported by Pylint.

pipenv/patched/notpip/_vendor/distlib/manifest.py
18 issues
Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              import re
import sys

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              import sys

from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              
from . import DistlibException
from .compat import fsdecode
from .util import convert_path


__all__ = ['Manifest']

logger = logging.getLogger(__name__)

            

Reported by Pylint.

Unused variable 'found'
Error

Line: 157 Column: 17

              
        elif action == 'exclude':
            for pattern in patterns:
                found = self._exclude_pattern(pattern, anchor=True)
                #if not found:
                #    logger.warning('no previously-included files '
                #                   'found matching %r', pattern)

        elif action == 'global-include':

            

Reported by Pylint.

XXX docstring lying about what the special chars are?
Error

Line: 283 Column: 3

              
        Return True if files are found.
        """
        # XXX docstring lying about what the special chars are?
        found = False
        pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex)

        # delayed loading of allfiles list
        if self.allfiles is None:

            

Reported by Pylint.

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

Line: 37 Column: 1

              #
_PYTHON_VERSION = sys.version_info[:2]

class Manifest(object):
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    """

    def __init__(self, base=None):

            

Reported by Pylint.

Import outside toplevel (stat.S_ISREG, stat.S_ISDIR, stat.S_ISLNK)
Error

Line: 61 Column: 9

                      """Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        """
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop

            

Reported by Pylint.

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

Line: 108 Column: 9

                      Return sorted files in directory order
        """

        def add_dir(dirs, d):
            dirs.add(d)
            logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')

            

Reported by Pylint.

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

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

                          logger.debug('add_dir added %s', d)
            if d != self.base:
                parent, _ = os.path.split(d)
                assert parent not in ('', '/')
                add_dir(dirs, parent)

        result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()

            

Reported by Bandit.

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

Line: 119 Column: 17

                      result = set(self.files)    # make a copy!
        if wantdirs:
            dirs = set()
            for f in result:
                add_dir(dirs, os.path.dirname(f))
            result |= dirs
        return [os.path.join(*path_tuple) for path_tuple in
                sorted(os.path.split(path) for path in result)]


            

Reported by Pylint.

pipenv/vendor/dateutil/tz/__init__.py
18 issues
Unable to import '__init__.tz'
Error

Line: 2 Column: 1

              # -*- coding: utf-8 -*-
from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]


            

Reported by Pylint.

Unable to import '__init__.tz'
Error

Line: 3 Column: 1

              # -*- coding: utf-8 -*-
from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]


            

Reported by Pylint.

Undefined variable name 'tzutc' in __all__
Error

Line: 5 Column: 12

              from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]



            

Reported by Pylint.

Undefined variable name 'tzrange' in __all__
Error

Line: 5 Column: 54

              from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]



            

Reported by Pylint.

Undefined variable name 'tzfile' in __all__
Error

Line: 5 Column: 44

              from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]



            

Reported by Pylint.

Undefined variable name 'tzlocal' in __all__
Error

Line: 5 Column: 33

              from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]



            

Reported by Pylint.

Undefined variable name 'tzoffset' in __all__
Error

Line: 5 Column: 21

              from .tz import *
from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]



            

Reported by Pylint.

Undefined variable name 'tzwin' in __all__
Error

Line: 6 Column: 31

              from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]


class DeprecatedTzFormatWarning(Warning):

            

Reported by Pylint.

Undefined variable name 'tzical' in __all__
Error

Line: 6 Column: 21

              from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]


class DeprecatedTzFormatWarning(Warning):

            

Reported by Pylint.

Undefined variable name 'tzstr' in __all__
Error

Line: 6 Column: 12

              from .tz import __doc__

__all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange",
           "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz",
           "enfold", "datetime_ambiguous", "datetime_exists",
           "resolve_imaginary", "UTC", "DeprecatedTzFormatWarning"]


class DeprecatedTzFormatWarning(Warning):

            

Reported by Pylint.

pipenv/vendor/dparse/dependencies.py
18 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import json

from . import filetypes, errors


class Dependency(object):
    """


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 119 Column: 13

                      if parser:
            self.parser = parser
        else:
            from . import parser as parser_class
            if file_type is not None:
                if file_type == filetypes.requirements_txt:
                    self.parser = parser_class.RequirementsTXTParser
                elif file_type == filetypes.tox_ini:
                    self.parser = parser_class.ToxINIParser

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 14 Column: 5

              
    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):
        """

        :param name:
        :param specs:
        :param line:

            

Reported by Pylint.

Dangerous default value {} as argument
Error

Line: 14 Column: 5

              
    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):
        """

        :param name:
        :param specs:
        :param line:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import

import json

from . import filetypes, errors


class Dependency(object):

            

Reported by Pylint.

Empty class docstring
Error

Line: 9 Column: 1

              from . import filetypes, errors


class Dependency(object):
    """

    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):

            

Reported by Pylint.

Too many instance attributes (12/7)
Error

Line: 9 Column: 1

              from . import filetypes, errors


class Dependency(object):
    """

    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):

            

Reported by Pylint.

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

Line: 9 Column: 1

              from . import filetypes, errors


class Dependency(object):
    """

    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):

            

Reported by Pylint.

Too many arguments (12/5)
Error

Line: 14 Column: 5

              
    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):
        """

        :param name:
        :param specs:
        :param line:

            

Reported by Pylint.

Line too long (162/100)
Error

Line: 14 Column: 1

              
    """

    def __init__(self, name, specs, line, source="pypi", meta={}, extras=[], line_numbers=None, index_server=None, hashes=(), dependency_type=None, section=None):
        """

        :param name:
        :param specs:
        :param line:

            

Reported by Pylint.

pipenv/patched/piptools/resolver.py
18 issues
Unable to import 'pip_shims.shims'
Error

Line: 9 Column: 1

              from functools import partial
from itertools import chain, count

from pip_shims.shims import install_req_from_line
from pipenv.vendor.requirementslib.models.markers import normalize_marker_str
from packaging.markers import Marker

from . import click
from .logging import log

            

Reported by Pylint.

Unable to import 'packaging.markers'
Error

Line: 11 Column: 1

              
from pip_shims.shims import install_req_from_line
from pipenv.vendor.requirementslib.models.markers import normalize_marker_str
from packaging.markers import Marker

from . import click
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              from pipenv.vendor.requirementslib.models.markers import normalize_marker_str
from packaging.markers import Marker

from . import click
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    format_requirement,
    format_specifier,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 14 Column: 1

              from packaging.markers import Marker

from . import click
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    format_requirement,
    format_specifier,
    full_groupby,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              
from . import click
from .logging import log
from .utils import (
    UNSAFE_PACKAGES,
    format_requirement,
    format_specifier,
    full_groupby,
    is_pinned_requirement,

            

Reported by Pylint.

Access to a protected member _source_ireqs of a client class
Error

Line: 103 Column: 9

                              (ireq.comes_from for ireq in source_ireqs),
                key=lambda x: (len(str(x)), str(x)),
            )
        combined_ireq._source_ireqs = source_ireqs
    return combined_ireq


class Resolver(object):
    def __init__(

            

Reported by Pylint.

Access to a protected member _source_ireqs of a client class
Error

Line: 331 Column: 13

                      )
        best_match.comes_from = ireq.comes_from
        if hasattr(ireq, "_source_ireqs"):
            best_match._source_ireqs = ireq._source_ireqs
        return best_match

    def _iter_dependencies(self, ireq):
        """
        Given a pinned, url, or editable InstallRequirement, collects all the

            

Reported by Pylint.

Access to a protected member _source_ireqs of a client class
Error

Line: 331 Column: 40

                      )
        best_match.comes_from = ireq.comes_from
        if hasattr(ireq, "_source_ireqs"):
            best_match._source_ireqs = ireq._source_ireqs
        return best_match

    def _iter_dependencies(self, ireq):
        """
        Given a pinned, url, or editable InstallRequirement, collects all the

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals

import copy
import os
from functools import partial
from itertools import chain, count

from pip_shims.shims import install_req_from_line

            

Reported by Pylint.

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

Line: 29 Column: 1

              magenta = partial(click.style, fg="magenta")


class RequirementSummary(object):
    """
    Summary of a requirement's properties for comparison purposes.
    """

    def __init__(self, ireq):

            

Reported by Pylint.

pipenv/vendor/packaging/_manylinux.py
18 issues
Module '_manylinux' has no 'manylinux_compatible' member
Error

Line: 241 Column: 18

                  except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:
            return bool(result)
        return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):

            

Reported by Pylint.

Module '_manylinux' has no 'manylinux1_compatible' member
Error

Line: 247 Column: 25

                      return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):
            return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):

            

Reported by Pylint.

Module '_manylinux' has no 'manylinux2010_compatible' member
Error

Line: 250 Column: 25

                          return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


            

Reported by Pylint.

Module '_manylinux' has no 'manylinux2014_compatible' member
Error

Line: 253 Column: 25

                          return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


_LEGACY_MANYLINUX_MAP = {
    # CentOS 7 w/ glibc 2.17 (PEP 599)

            

Reported by Pylint.

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

Line: 41 Column: 17

                              data = file.read(struct.calcsize(fmt))
                result: Tuple[int, ...] = struct.unpack(fmt, data)
            except struct.error:
                raise _ELFFileHeader._InvalidELFFileHeader()
            return result[0]

        self.e_ident_magic = unpack(">I")
        if self.e_ident_magic != self.ELF_MAGIC_NUMBER:
            raise _ELFFileHeader._InvalidELFFileHeader()

            

Reported by Pylint.

Access to a protected member _InvalidELFFileHeader of a client class
Error

Line: 80 Column: 33

                  try:
        with open(sys.executable, "rb") as f:
            elf_header = _ELFFileHeader(f)
    except (OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader):
        return None
    return elf_header


def _is_linux_armhf() -> bool:

            

Reported by Pylint.

Unused argument 'name'
Error

Line: 231 Column: 20

              

# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
    sys_glibc = _get_glibc_version()
    if sys_glibc < version:
        return False
    # Check for presence of _manylinux module.
    try:

            

Reported by Pylint.

Module import itself
Error

Line: 237 Column: 9

                      return False
    # Check for presence of _manylinux module.
    try:
        import _manylinux  # noqa
    except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import collections
import functools
import os
import re
import struct
import sys
import warnings
from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple


            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 15 Column: 1

              # identify the architecture of the running executable in some cases, so we
# determine it dynamically by reading the information from the running
# process. This only applies on Linux, which uses the ELF format.
class _ELFFileHeader:
    # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
    class _InvalidELFFileHeader(ValueError):
        """
        An invalid ELF file header was found.
        """

            

Reported by Pylint.

pipenv/patched/notpip/_internal/network/session.py
18 issues
Unable to import 'pipenv.patched.notpip._vendor.six.moves.urllib'
Error

Line: 22 Column: 1

              from pipenv.patched.notpip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
from pipenv.patched.notpip._vendor.requests.models import Response
from pipenv.patched.notpip._vendor.requests.structures import CaseInsensitiveDict
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.urllib3.exceptions import InsecureRequestWarning

from pipenv.patched.notpip import __version__
from pipenv.patched.notpip._internal.network.auth import MultiDomainBasicAuth
from pipenv.patched.notpip._internal.network.cache import SafeFileCache

            

Reported by Pylint.

No name 'urllib' in module '_MovedItems'
Error

Line: 22 Column: 1

              from pipenv.patched.notpip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
from pipenv.patched.notpip._vendor.requests.models import Response
from pipenv.patched.notpip._vendor.requests.structures import CaseInsensitiveDict
from pipenv.patched.notpip._vendor.six.moves.urllib import parse as urllib_parse
from pipenv.patched.notpip._vendor.urllib3.exceptions import InsecureRequestWarning

from pipenv.patched.notpip import __version__
from pipenv.patched.notpip._internal.network.auth import MultiDomainBasicAuth
from pipenv.patched.notpip._internal.network.cache import SafeFileCache

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 114 Column: 12

                  if data["implementation"]["name"] == 'CPython':
        data["implementation"]["version"] = platform.python_version()
    elif data["implementation"]["name"] == 'PyPy':
        if sys.pypy_version_info.releaselevel == 'final':
            pypy_version_info = sys.pypy_version_info[:3]
        else:
            pypy_version_info = sys.pypy_version_info
        data["implementation"]["version"] = ".".join(
            [str(x) for x in pypy_version_info]

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 115 Column: 33

                      data["implementation"]["version"] = platform.python_version()
    elif data["implementation"]["name"] == 'PyPy':
        if sys.pypy_version_info.releaselevel == 'final':
            pypy_version_info = sys.pypy_version_info[:3]
        else:
            pypy_version_info = sys.pypy_version_info
        data["implementation"]["version"] = ".".join(
            [str(x) for x in pypy_version_info]
        )

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 117 Column: 33

                      if sys.pypy_version_info.releaselevel == 'final':
            pypy_version_info = sys.pypy_version_info[:3]
        else:
            pypy_version_info = sys.pypy_version_info
        data["implementation"]["version"] = ".".join(
            [str(x) for x in pypy_version_info]
        )
    elif data["implementation"]["name"] == 'Jython':
        # Complete Guess

            

Reported by Pylint.

Too many branches (16/12)
Error

Line: 99 Column: 1

                  return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES)


def user_agent():
    """
    Return a string representing the user agent.
    """
    data = {
        "installer": {"name": "pip", "version": __version__},

            

Reported by Pylint.

Import outside toplevel (pipenv.patched.notpip._vendor.distro)
Error

Line: 129 Column: 9

                      data["implementation"]["version"] = platform.python_version()

    if sys.platform.startswith("linux"):
        from pipenv.patched.notpip._vendor import distro
        distro_infos = dict(filter(
            lambda x: x[1],
            zip(["name", "version", "id"], distro.linux_distribution()),
        ))
        libc = dict(filter(

            

Reported by Pylint.

Import outside toplevel (_ssl)
Error

Line: 156 Column: 9

                      data["cpu"] = platform.machine()

    if has_tls():
        import _ssl as ssl
        data["openssl_version"] = ssl.OPENSSL_VERSION

    setuptools_version = get_installed_version("setuptools")
    if setuptools_version is not None:
        data["setuptools_version"] = setuptools_version

            

Reported by Pylint.

Missing class docstring
Error

Line: 179 Column: 1

                  )


class LocalFSAdapter(BaseAdapter):

    def send(self, request, stream=None, timeout=None, verify=None, cert=None,
             proxies=None):
        pathname = url_to_path(request.url)


            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 181 Column: 5

              
class LocalFSAdapter(BaseAdapter):

    def send(self, request, stream=None, timeout=None, verify=None, cert=None,
             proxies=None):
        pathname = url_to_path(request.url)

        resp = Response()
        resp.status_code = 200

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/cachecontrol/adapter.py
18 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              
from pipenv.patched.notpip._vendor.requests.adapters import HTTPAdapter

from .controller import CacheController
from .cache import DictCache
from .filewrapper import CallbackFileWrapper


class CacheControlAdapter(HTTPAdapter):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              from pipenv.patched.notpip._vendor.requests.adapters import HTTPAdapter

from .controller import CacheController
from .cache import DictCache
from .filewrapper import CallbackFileWrapper


class CacheControlAdapter(HTTPAdapter):
    invalidating_methods = {"PUT", "DELETE"}

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from .controller import CacheController
from .cache import DictCache
from .filewrapper import CallbackFileWrapper


class CacheControlAdapter(HTTPAdapter):
    invalidating_methods = {"PUT", "DELETE"}


            

Reported by Pylint.

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

Line: 15 Column: 5

              class CacheControlAdapter(HTTPAdapter):
    invalidating_methods = {"PUT", "DELETE"}

    def __init__(
        self,
        cache=None,
        cache_etags=True,
        controller_class=None,
        serializer=None,

            

Reported by Pylint.

Parameters differ from overridden 'send' method
Error

Line: 36 Column: 5

                          self.cache, cache_etags=cache_etags, serializer=serializer
        )

    def send(self, request, cacheable_methods=None, **kw):
        """
        Send a request. Use the request information to see if it
        exists in the cache and cache the response if we need to and can.
        """
        cacheable = cacheable_methods or self.cacheable_methods

            

Reported by Pylint.

Parameters differ from overridden 'build_response' method
Error

Line: 57 Column: 5

              
        return resp

    def build_response(
        self, request, response, from_cache=False, cacheable_methods=None
    ):
        """
        Build a response by making a request or using the cache.


            

Reported by Pylint.

Access to a protected member _fp of a client class
Error

Line: 101 Column: 17

                          else:
                # Wrap the response file with a wrapper that will cache the
                #   response when the stream has been consumed.
                response._fp = CallbackFileWrapper(
                    response._fp,
                    functools.partial(
                        self.controller.cache_response, request, response
                    ),
                )

            

Reported by Pylint.

Access to a protected member _fp of a client class
Error

Line: 102 Column: 21

                              # Wrap the response file with a wrapper that will cache the
                #   response when the stream has been consumed.
                response._fp = CallbackFileWrapper(
                    response._fp,
                    functools.partial(
                        self.controller.cache_response, request, response
                    ),
                )
                if response.chunked:

            

Reported by Pylint.

Access to a protected member _update_chunk_length of a client class
Error

Line: 108 Column: 49

                                  ),
                )
                if response.chunked:
                    super_update_chunk_length = response._update_chunk_length

                    def _update_chunk_length(self):
                        super_update_chunk_length()
                        if self.chunk_left == 0:
                            self._fp._close()

            

Reported by Pylint.

Access to a protected member _close of a client class
Error

Line: 113 Column: 29

                                  def _update_chunk_length(self):
                        super_update_chunk_length()
                        if self.chunk_left == 0:
                            self._fp._close()

                    response._update_chunk_length = types.MethodType(
                        _update_chunk_length, response
                    )


            

Reported by Pylint.