The following issues were found

pipenv/vendor/requests/__init__.py
43 issues
Unable to import '__init__.exceptions'
Error

Line: 45 Column: 1

              
import urllib3
import warnings
from .exceptions import RequestsDependencyWarning

try:
    from charset_normalizer import __version__ as charset_normalizer_version
except ImportError:
    charset_normalizer_version = None

            

Reported by Pylint.

Unable to import '__init__.__version__'
Error

Line: 129 Column: 1

              from urllib3.exceptions import DependencyWarning
warnings.simplefilter('ignore', DependencyWarning)

from .__version__ import __title__, __description__, __url__, __version__
from .__version__ import __build__, __author__, __author_email__, __license__
from .__version__ import __copyright__, __cake__

from . import utils
from . import packages

            

Reported by Pylint.

Unable to import '__init__.__version__'
Error

Line: 130 Column: 1

              warnings.simplefilter('ignore', DependencyWarning)

from .__version__ import __title__, __description__, __url__, __version__
from .__version__ import __build__, __author__, __author_email__, __license__
from .__version__ import __copyright__, __cake__

from . import utils
from . import packages
from .models import Request, Response, PreparedRequest

            

Reported by Pylint.

Unable to import '__init__.__version__'
Error

Line: 131 Column: 1

              
from .__version__ import __title__, __description__, __url__, __version__
from .__version__ import __build__, __author__, __author_email__, __license__
from .__version__ import __copyright__, __cake__

from . import utils
from . import packages
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options

            

Reported by Pylint.

Unable to import '__init__.models'
Error

Line: 135 Column: 1

              
from . import utils
from . import packages
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,

            

Reported by Pylint.

Unable to import '__init__.api'
Error

Line: 136 Column: 1

              from . import utils
from . import packages
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError,

            

Reported by Pylint.

Unable to import '__init__.sessions'
Error

Line: 137 Column: 1

              from . import packages
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError,
    FileModeWarning, ConnectTimeout, ReadTimeout

            

Reported by Pylint.

Unable to import '__init__.status_codes'
Error

Line: 138 Column: 1

              from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError,
    FileModeWarning, ConnectTimeout, ReadTimeout
)

            

Reported by Pylint.

Unable to import '__init__.exceptions'
Error

Line: 139 Column: 1

              from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
    RequestException, Timeout, URLRequired,
    TooManyRedirects, HTTPError, ConnectionError,
    FileModeWarning, ConnectTimeout, ReadTimeout
)


            

Reported by Pylint.

Redefining name 'chardet_version' from outer scope (line 53)
Error

Line: 57 Column: 42

              except ImportError:
    chardet_version = None

def check_compatibility(urllib3_version, chardet_version, charset_normalizer_version):
    urllib3_version = urllib3_version.split('.')
    assert urllib3_version != ['dev']  # Verify urllib3 isn't installed from git.

    # Sometimes, urllib3 only reports its version as 16.1.
    if len(urllib3_version) == 2:

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/requests/sessions.py
43 issues
Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              import time
from datetime import timedelta

from .auth import _basic_auth_str
from .compat import cookielib, is_py3, OrderedDict, urljoin, urlparse, Mapping
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              from datetime import timedelta

from .auth import _basic_auth_str
from .compat import cookielib, is_py3, OrderedDict, urljoin, urlparse, Mapping
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              
from .auth import _basic_auth_str
from .compat import cookielib, is_py3, OrderedDict, urljoin, urlparse, Mapping
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              from .compat import cookielib, is_py3, OrderedDict, urljoin, urlparse, Mapping
from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from .cookies import (
    cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

                  cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)
from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

from .structures import CaseInsensitiveDict

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              from .models import Request, PreparedRequest, DEFAULT_REDIRECT_LIMIT
from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

from .structures import CaseInsensitiveDict
from .adapters import HTTPAdapter

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 23 Column: 1

              from .hooks import default_hooks, dispatch_hook
from ._internal_utils import to_native_string
from .utils import to_key_val_list, default_headers, DEFAULT_PORTS
from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

from .structures import CaseInsensitiveDict
from .adapters import HTTPAdapter


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              from .exceptions import (
    TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

from .structures import CaseInsensitiveDict
from .adapters import HTTPAdapter

from .utils import (
    requote_uri, get_environ_proxies, get_netrc_auth, should_bypass_proxies,
    get_auth_from_url, rewind_body

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

                  TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)

from .structures import CaseInsensitiveDict
from .adapters import HTTPAdapter

from .utils import (
    requote_uri, get_environ_proxies, get_netrc_auth, should_bypass_proxies,
    get_auth_from_url, rewind_body
)

            

Reported by Pylint.

pipenv/vendor/wheel/bdist_wheel.py
43 issues
Attempted relative import beyond top-level package
Error

Line: 25 Column: 1

              
import pkg_resources

from .pkginfo import write_pkg_info
from .macosx_libfile import calculate_macosx_platform_tag
from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              import pkg_resources

from .pkginfo import write_pkg_info
from .macosx_libfile import calculate_macosx_platform_tag
from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

              
from .pkginfo import write_pkg_info
from .macosx_libfile import calculate_macosx_platform_tag
from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version

if sys.version_info < (3,):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              from .pkginfo import write_pkg_info
from .macosx_libfile import calculate_macosx_platform_tag
from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version

if sys.version_info < (3,):
    from email.generator import Generator as BytesGenerator

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              from .macosx_libfile import calculate_macosx_platform_tag
from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version

if sys.version_info < (3,):
    from email.generator import Generator as BytesGenerator
else:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              from .metadata import pkginfo_to_metadata
from .vendored.packaging import tags
from .wheelfile import WheelFile
from . import __version__ as wheel_version

if sys.version_info < (3,):
    from email.generator import Generator as BytesGenerator
else:
    from email.generator import BytesGenerator

            

Reported by Pylint.

Value 'self.build_number' is unsubscriptable
Error

Line: 230 Column: 50

                          if val.lower() in ('1', 'true', 'yes'):
                self.universal = True

        if self.build_number is not None and not self.build_number[:1].isdigit():
            raise ValueError("Build tag (build-number) must start with a digit.")

    @property
    def wheel_dist_name(self):
        """Return distribution full name with - replaced with _"""

            

Reported by Pylint.

XXX remove distutils dependency
Error

Line: 49 Column: 3

              
def get_platform(archive_root):
    """Return our platform name 'win32', 'linux_x86_64'"""
    # XXX remove distutils dependency
    result = distutils.util.get_platform()
    if result.startswith("macosx") and archive_root is not None:
        result = calculate_macosx_platform_tag(archive_root, result)
    if result == "linux_x86_64" and sys.maxsize == 2147483647:
        # pip pull request #3497

            

Reported by Pylint.

Attribute 'bdist_dir' defined outside __init__
Error

Line: 200 Column: 13

                  def finalize_options(self):
        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'wheel')

        self.data_dir = self.wheel_dist_name + '.data'
        self.plat_name_supplied = self.plat_name is not None

        try:

            

Reported by Pylint.

Attribute 'data_dir' defined outside __init__
Error

Line: 202 Column: 9

                          bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'wheel')

        self.data_dir = self.wheel_dist_name + '.data'
        self.plat_name_supplied = self.plat_name is not None

        try:
            self.compression = self.supported_compressions[self.compression]
        except KeyError:

            

Reported by Pylint.

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

Line: 8 Column: 1

              import socket
from socket import error as SocketError, timeout as SocketTimeout
import warnings
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401

try:  # Compiled with SSL?
    import ssl

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              from socket import error as SocketError, timeout as SocketTimeout
import warnings
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401

try:  # Compiled with SSL?
    import ssl


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              import warnings
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401

try:  # Compiled with SSL?
    import ssl

    BaseSSLError = ssl.SSLError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 32 Column: 1

                      pass


from .exceptions import (
    NewConnectionError,
    ConnectTimeoutError,
    SubjectAltNameWarning,
    SystemTimeWarning,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 38 Column: 1

                  SubjectAltNameWarning,
    SystemTimeWarning,
)
from .packages.ssl_match_hostname import match_hostname, CertificateError

from .util.ssl_ import (
    resolve_cert_reqs,
    resolve_ssl_version,
    assert_fingerprint,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 40 Column: 1

              )
from .packages.ssl_match_hostname import match_hostname, CertificateError

from .util.ssl_ import (
    resolve_cert_reqs,
    resolve_ssl_version,
    assert_fingerprint,
    create_urllib3_context,
    ssl_wrap_socket,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 49 Column: 1

              )


from .util import connection

from ._collections import HTTPHeaderDict

log = logging.getLogger(__name__)


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 51 Column: 1

              
from .util import connection

from ._collections import HTTPHeaderDict

log = logging.getLogger(__name__)

port_by_scheme = {"http": 80, "https": 443}


            

Reported by Pylint.

Unused HTTPException imported from packages.six.moves.http_client
Error

Line: 10 Column: 1

              import warnings
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client import HTTPException  # noqa: F401

try:  # Compiled with SSL?
    import ssl

    BaseSSLError = ssl.SSLError

            

Reported by Pylint.

Assigning the same variable 'ConnectionError' to itself
Error

Line: 25 Column: 5

              
try:
    # Python 3: not a no-op, we're adding this to the namespace so it can be imported.
    ConnectionError = ConnectionError
except NameError:
    # Python 2
    class ConnectionError(Exception):
        pass


            

Reported by Pylint.

pipenv/vendor/vistir/spin.py
43 issues
Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              import colorama
import six

from .compat import IS_TYPE_CHECKING, to_native_string
from .cursor import hide_cursor, show_cursor
from .misc import decode_for_output, to_text
from .termcolors import COLOR_MAP, COLORS, DISABLE_COLORS, colored

if IS_TYPE_CHECKING:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              import six

from .compat import IS_TYPE_CHECKING, to_native_string
from .cursor import hide_cursor, show_cursor
from .misc import decode_for_output, to_text
from .termcolors import COLOR_MAP, COLORS, DISABLE_COLORS, colored

if IS_TYPE_CHECKING:
    from typing import (

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              
from .compat import IS_TYPE_CHECKING, to_native_string
from .cursor import hide_cursor, show_cursor
from .misc import decode_for_output, to_text
from .termcolors import COLOR_MAP, COLORS, DISABLE_COLORS, colored

if IS_TYPE_CHECKING:
    from typing import (
        Any,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              from .compat import IS_TYPE_CHECKING, to_native_string
from .cursor import hide_cursor, show_cursor
from .misc import decode_for_output, to_text
from .termcolors import COLOR_MAP, COLORS, DISABLE_COLORS, colored

if IS_TYPE_CHECKING:
    from typing import (
        Any,
        Callable,

            

Reported by Pylint.

Module 'signal' has no 'SIGBREAK' member
Error

Line: 233 Column: 20

                          sigmap.update({signal.SIGINT: handler, signal.SIGTERM: handler})
        handler_map = kwargs.pop("handler_map", {})
        if os.name == "nt":
            sigmap[signal.SIGBREAK] = handler
        else:
            sigmap[signal.SIGALRM] = handler
        if handler_map:
            sigmap.update(handler_map)
        spinner_name = kwargs.pop("spinner_name", "bouncingBar")

            

Reported by Pylint.

Unused ContextManager imported from typing
Error

Line: 21 Column: 5

              from .termcolors import COLOR_MAP, COLORS, DISABLE_COLORS, colored

if IS_TYPE_CHECKING:
    from typing import (
        Any,
        Callable,
        ContextManager,
        Dict,
        IO,

            

Reported by Pylint.

Unused argument 'signum'
Error

Line: 55 Column: 17

              
if os.name == "nt":  # pragma: no cover

    def handler(signum, frame, spinner):
        """Signal handler, used to gracefully shut down the ``spinner`` instance
        when specified signal is received by the process running the ``spinner``.

        ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
        function for more details.

            

Reported by Pylint.

Unused argument 'frame'
Error

Line: 55 Column: 25

              
if os.name == "nt":  # pragma: no cover

    def handler(signum, frame, spinner):
        """Signal handler, used to gracefully shut down the ``spinner`` instance
        when specified signal is received by the process running the ``spinner``.

        ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
        function for more details.

            

Reported by Pylint.

Unused argument 'frame'
Error

Line: 68 Column: 25

              
else:  # pragma: no cover

    def handler(signum, frame, spinner):
        """Signal handler, used to gracefully shut down the ``spinner`` instance
        when specified signal is received by the process running the ``spinner``.

        ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
        function for more details.

            

Reported by Pylint.

Unused argument 'signum'
Error

Line: 68 Column: 17

              
else:  # pragma: no cover

    def handler(signum, frame, spinner):
        """Signal handler, used to gracefully shut down the ``spinner`` instance
        when specified signal is received by the process running the ``spinner``.

        ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
        function for more details.

            

Reported by Pylint.

pipenv/vendor/importlib_resources/tests/test_open.py
43 issues
Unable to import 'importlib_resources'
Error

Line: 3 Column: 1

              import unittest

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


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

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              import unittest

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


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

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

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


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

            

Reported by Pylint.

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

Line: 22 Column: 36

              
class OpenTests:
    def test_open_binary(self):
        with resources.open_binary(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, b'Hello, UTF-8 world!\n')

    def test_open_text_default_encoding(self):
        with resources.open_text(self.data, 'utf-8.file') as fp:

            

Reported by Pylint.

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

Line: 24 Column: 13

                  def test_open_binary(self):
        with resources.open_binary(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, b'Hello, UTF-8 world!\n')

    def test_open_text_default_encoding(self):
        with resources.open_text(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, 'Hello, UTF-8 world!\n')

            

Reported by Pylint.

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

Line: 27 Column: 34

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

    def test_open_text_default_encoding(self):
        with resources.open_text(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_open_text_given_encoding(self):
        with resources.open_text(self.data, 'utf-16.file', 'utf-16', 'strict') as fp:

            

Reported by Pylint.

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

Line: 29 Column: 13

                  def test_open_text_default_encoding(self):
        with resources.open_text(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_open_text_given_encoding(self):
        with resources.open_text(self.data, 'utf-16.file', 'utf-16', 'strict') as fp:
            result = fp.read()
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

            

Reported by Pylint.

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

Line: 32 Column: 34

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

    def test_open_text_given_encoding(self):
        with resources.open_text(self.data, 'utf-16.file', 'utf-16', 'strict') as fp:
            result = fp.read()
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

    def test_open_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.

            

Reported by Pylint.

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

Line: 34 Column: 9

                  def test_open_text_given_encoding(self):
        with resources.open_text(self.data, 'utf-16.file', 'utf-16', 'strict') as fp:
            result = fp.read()
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

    def test_open_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        with resources.open_text(self.data, 'utf-16.file', 'utf-8', 'strict') as fp:
            self.assertRaises(UnicodeError, fp.read)

            

Reported by Pylint.

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

Line: 38 Column: 34

              
    def test_open_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        with resources.open_text(self.data, 'utf-16.file', 'utf-8', 'strict') as fp:
            self.assertRaises(UnicodeError, fp.read)
        with resources.open_text(self.data, 'utf-16.file', 'utf-8', 'ignore') as fp:
            result = fp.read()
        self.assertEqual(
            result,

            

Reported by Pylint.

pipenv/vendor/pexpect/spawnbase.py
43 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import sys
import re
import errno
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
from .expect import Expecter, searcher_string, searcher_re

PY3 = (sys.version_info[0] >= 3)
text_type = str if PY3 else unicode


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              import re
import errno
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
from .expect import Expecter, searcher_string, searcher_re

PY3 = (sys.version_info[0] >= 3)
text_type = str if PY3 else unicode

class _NullCoder(object):

            

Reported by Pylint.

Undefined variable 'unicode'
Error

Line: 11 Column: 29

              from .expect import Expecter, searcher_string, searcher_re

PY3 = (sys.version_info[0] >= 3)
text_type = str if PY3 else unicode

class _NullCoder(object):
    """Pass bytes through unchanged."""
    @staticmethod
    def encode(b, final=False):

            

Reported by Pylint.

Undefined variable 'basestring'
Error

Line: 102 Column: 46

                                      return sys.stdout.write(b.decode('ascii', 'replace'))
                self.write_to_stdout = write_to_stdout
            else:
                self.allowed_string_types = (basestring,)  # analysis:ignore
                self.linesep = os.linesep
                self.write_to_stdout = sys.stdout.write
        else:
            # unicode mode
            self._encoder = codecs.getincrementalencoder(encoding)(codec_errors)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 369 Column: 13

              
        exp = Expecter(self, searcher_re(pattern_list), searchwindowsize)
        if async_:
            from ._async import expect_async
            return expect_async(exp, timeout)
        else:
            return exp.expect_loop(timeout)

    def expect_exact(self, pattern_list, timeout=-1, searchwindowsize=-1,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 418 Column: 13

              
        exp = Expecter(self, searcher_string(pattern_list), searchwindowsize)
        if async_:
            from ._async import expect_async
            return expect_async(exp, timeout)
        else:
            return exp.expect_loop(timeout)

    def expect_loop(self, searcher, timeout=-1, searchwindowsize=-1):

            

Reported by Pylint.

Instance of 'SpawnBase' has no 'close' member; maybe 'closed'?
Error

Line: 525 Column: 9

                  def __exit__(self, etype, evalue, tb):
        # We rely on subclasses to implement close(). If they don't, it's not
        # clear what a context manager should do.
        self.close()

            

Reported by Pylint.

Unused ExceptionPexpect imported from exceptions
Error

Line: 7 Column: 1

              import sys
import re
import errno
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
from .expect import Expecter, searcher_string, searcher_re

PY3 = (sys.version_info[0] >= 3)
text_type = str if PY3 else unicode


            

Reported by Pylint.

Unused argument 'final'
Error

Line: 16 Column: 19

              class _NullCoder(object):
    """Pass bytes through unchanged."""
    @staticmethod
    def encode(b, final=False):
        return b

    @staticmethod
    def decode(b, final=False):
        return b

            

Reported by Pylint.

Unused argument 'final'
Error

Line: 20 Column: 19

                      return b

    @staticmethod
    def decode(b, final=False):
        return b

class SpawnBase(object):
    """A base class providing the backwards-compatible spawn API for Pexpect.


            

Reported by Pylint.

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

Line: 7 Column: 1

              from functools import update_wrapper
from types import ModuleType

from ._compat import _default_text_stderr
from ._compat import _default_text_stdout
from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              from types import ModuleType

from ._compat import _default_text_stderr
from ._compat import _default_text_stdout
from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              
from ._compat import _default_text_stderr
from ._compat import _default_text_stdout
from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              from ._compat import _default_text_stderr
from ._compat import _default_text_stdout
from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from ._compat import _default_text_stdout
from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              from ._compat import _find_binary_writer
from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams
from ._compat import WIN

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

              from ._compat import auto_wrap_for_ansi
from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams
from ._compat import WIN
from .globals import resolve_color_default

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 14 Column: 1

              from ._compat import binary_streams
from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams
from ._compat import WIN
from .globals import resolve_color_default


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 15 Column: 1

              from ._compat import get_filesystem_encoding
from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams
from ._compat import WIN
from .globals import resolve_color_default

if t.TYPE_CHECKING:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 16 Column: 1

              from ._compat import open_stream
from ._compat import should_strip_ansi
from ._compat import strip_ansi
from ._compat import text_streams
from ._compat import WIN
from .globals import resolve_color_default

if t.TYPE_CHECKING:
    import typing_extensions as te

            

Reported by Pylint.

pipenv/vendor/cerberus/tests/test_assorted.py
42 issues
Unable to import 'pytest'
Error

Line: 6 Column: 1

              from decimal import Decimal
from pkg_resources import Distribution, DistributionNotFound

from pytest import mark

from cerberus import TypeDefinition, Validator
from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator

            

Reported by Pylint.

Unable to import 'cerberus'
Error

Line: 8 Column: 1

              
from pytest import mark

from cerberus import TypeDefinition, Validator
from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator
from cerberus.platform import PYTHON_VERSION


            

Reported by Pylint.

Unable to import 'cerberus.tests'
Error

Line: 9 Column: 1

              from pytest import mark

from cerberus import TypeDefinition, Validator
from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator
from cerberus.platform import PYTHON_VERSION



            

Reported by Pylint.

Unable to import 'cerberus.utils'
Error

Line: 10 Column: 1

              
from cerberus import TypeDefinition, Validator
from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator
from cerberus.platform import PYTHON_VERSION


if PYTHON_VERSION > 3 and PYTHON_VERSION < 3.4:

            

Reported by Pylint.

Unable to import 'cerberus.validator'
Error

Line: 11 Column: 1

              from cerberus import TypeDefinition, Validator
from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator
from cerberus.platform import PYTHON_VERSION


if PYTHON_VERSION > 3 and PYTHON_VERSION < 3.4:
    from imp import reload

            

Reported by Pylint.

Unable to import 'cerberus.platform'
Error

Line: 12 Column: 1

              from cerberus.tests import assert_fail, assert_success
from cerberus.utils import validator_factory
from cerberus.validator import BareValidator
from cerberus.platform import PYTHON_VERSION


if PYTHON_VERSION > 3 and PYTHON_VERSION < 3.4:
    from imp import reload
elif PYTHON_VERSION >= 3.4:

            

Reported by Pylint.

Unused argument 'name'
Error

Line: 24 Column: 34

              

def test_pkgresources_version(monkeypatch):
    def create_fake_distribution(name):
        return Distribution(project_name="cerberus", version="1.2.3")

    with monkeypatch.context() as m:
        cerberus = __import__("cerberus")
        m.setattr("pkg_resources.get_distribution", create_fake_distribution)

            

Reported by Pylint.

Access to a protected member _valid_schemas of a client class
Error

Line: 46 Column: 16

              

def test_clear_cache(validator):
    assert len(validator._valid_schemas) > 0
    validator.clear_caches()
    assert len(validator._valid_schemas) == 0


def test_docstring(validator):

            

Reported by Pylint.

Access to a protected member _valid_schemas of a client class
Error

Line: 48 Column: 16

              def test_clear_cache(validator):
    assert len(validator._valid_schemas) > 0
    validator.clear_caches()
    assert len(validator._valid_schemas) == 0


def test_docstring(validator):
    assert validator.__doc__


            

Reported by Pylint.

Access to a protected member _config of a client class
Error

Line: 101 Column: 12

              
    MyValidator = validator_factory("MyValidator", Mixin)
    validator = MyValidator()
    assert validator._config["test"]


def test_sub_init():
    class MyValidator(Validator):
        def __init__(self, *args, **kwargs):

            

Reported by Pylint.

pipenv/vendor/cerberus/benchmarks/test_overall_performance_1.py
41 issues
Unable to import 'pytest'
Error

Line: 17 Column: 1

              from random import choice, randrange
from typing import Callable, List

from pytest import mark

from cerberus import rules_set_registry, schema_registry, TypeDefinition, Validator
from cerberus.benchmarks import DOCUMENTS_PATH



            

Reported by Pylint.

Unable to import 'cerberus'
Error

Line: 19 Column: 1

              
from pytest import mark

from cerberus import rules_set_registry, schema_registry, TypeDefinition, Validator
from cerberus.benchmarks import DOCUMENTS_PATH


rules_set_registry.add("path_rules", {"coerce": Path, "type": "path"})


            

Reported by Pylint.

Unable to import 'cerberus.benchmarks'
Error

Line: 20 Column: 1

              from pytest import mark

from cerberus import rules_set_registry, schema_registry, TypeDefinition, Validator
from cerberus.benchmarks import DOCUMENTS_PATH


rules_set_registry.add("path_rules", {"coerce": Path, "type": "path"})



            

Reported by Pylint.

Redefining name 'init_validator' from outer scope (line 97)
Error

Line: 113 Column: 24

                  return documents


def validate_documents(init_validator: Callable, documents: List[dict]):
    doc_count = failed_count = 0
    error_paths = Counter()
    validator = init_validator()

    def count_errors(errors):

            

Reported by Pylint.

Access to a protected member _errors of a client class
Error

Line: 130 Column: 26

                  for document in documents:
        if validator.validated(document) is None:
            failed_count += 1
            count_errors(validator._errors)
        doc_count += 1

    print(
        f"{failed_count} out of {doc_count} documents failed with "
        f"{len(error_paths)} different error leafs."

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 44 Column: 1

              )


def schema_1_field_3_allow_unknown_check_with(field, value, error):
    if len(value) > 9:
        error(field, "Requires a smaller list.")


schema_1 = {

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 97 Column: 1

              }


def init_validator():
    class TestValidator(Validator):
        types_mapping = {
            **Validator.types_mapping,
            "path": TypeDefinition("path", (Path,), ()),
        }

            

Reported by Pylint.

Missing class docstring
Error

Line: 98 Column: 5

              

def init_validator():
    class TestValidator(Validator):
        types_mapping = {
            **Validator.types_mapping,
            "path": TypeDefinition("path", (Path,), ()),
        }


            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 98 Column: 5

              

def init_validator():
    class TestValidator(Validator):
        types_mapping = {
            **Validator.types_mapping,
            "path": TypeDefinition("path", (Path,), ()),
        }


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 107 Column: 1

                  return TestValidator(schema_1, purge_unknown=True)


def load_documents():
    with (DOCUMENTS_PATH / "overall_documents_1.json").open() as f:
        documents = json.load(f)
    return documents



            

Reported by Pylint.