The following issues were found

tests/fixtures/cython-import-package/setup.py
6 issues
Unable to import 'Cython.Build'
Error

Line: 9 Column: 1

              
# ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100
import Cython.Distutils



ROOT = os.path.dirname(__file__)

            

Reported by Pylint.

Unable to import 'Cython.Distutils'
Error

Line: 10 Column: 1

              # ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100
import Cython.Distutils



ROOT = os.path.dirname(__file__)


            

Reported by Pylint.

Unused test imported from setuptools.command.test as TestCommand
Error

Line: 5 Column: 1

              import os

from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

# ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100
import Cython.Distutils

            

Reported by Pylint.

Unused cythonize imported from Cython.Build
Error

Line: 9 Column: 1

              
# ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100
import Cython.Distutils



ROOT = os.path.dirname(__file__)

            

Reported by Pylint.

Unused import Cython.Distutils
Error

Line: 10 Column: 1

              # ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100
import Cython.Distutils



ROOT = os.path.dirname(__file__)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import ast
import os

from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

# ORDER MATTERS
# Import this after setuptools or it will fail
from Cython.Build import cythonize  # noqa: I100

            

Reported by Pylint.

pipenv/vendor/dotenv/variables.py
6 issues
Missing module docstring
Error

Line: 1 Column: 1

              import re
from abc import ABCMeta
from typing import Iterator, Mapping, Optional, Pattern

_posix_variable = re.compile(
    r"""
    \$\{
        (?P<name>[^\}:]*)
        (?::-

            

Reported by Pylint.

Missing class docstring
Error

Line: 18 Column: 1

              )  # type: Pattern[str]


class Atom():
    __metaclass__ = ABCMeta

    def __ne__(self, other: object) -> bool:
        result = self.__eq__(other)
        if result is NotImplemented:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 27 Column: 5

                          return NotImplemented
        return not result

    def resolve(self, env: Mapping[str, Optional[str]]) -> str:
        raise NotImplementedError


class Literal(Atom):
    def __init__(self, value: str) -> None:

            

Reported by Pylint.

Missing class docstring
Error

Line: 31 Column: 1

                      raise NotImplementedError


class Literal(Atom):
    def __init__(self, value: str) -> None:
        self.value = value

    def __repr__(self) -> str:
        return "Literal(value={})".format(self.value)

            

Reported by Pylint.

Missing class docstring
Error

Line: 50 Column: 1

                      return self.value


class Variable(Atom):
    def __init__(self, name: str, default: Optional[str]) -> None:
        self.name = name
        self.default = default

    def __repr__(self) -> str:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 72 Column: 1

                      return result if result is not None else ""


def parse_variables(value: str) -> Iterator[Atom]:
    cursor = 0

    for match in _posix_variable.finditer(value):
        (start, end) = match.span()
        name = match.groupdict()["name"]

            

Reported by Pylint.

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

Line: 1 Column: 1

              from .adapter import CacheControlAdapter
from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 2 Column: 1

              from .adapter import CacheControlAdapter
from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from .adapter import CacheControlAdapter
from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,

            

Reported by Pylint.

Function name "CacheControl" doesn't conform to snake_case naming style
Error

Line: 5 Column: 1

              from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,
    heuristic=None,

            

Reported by Pylint.

Too many arguments (8/5)
Error

Line: 5 Column: 1

              from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,
    heuristic=None,

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 5 Column: 1

              from .cache import DictCache


def CacheControl(
    sess,
    cache=None,
    cache_etags=True,
    serializer=None,
    heuristic=None,

            

Reported by Pylint.

pipenv/vendor/dotenv/__init__.py
6 issues
Unable to import '__init__.main'
Error

Line: 3 Column: 1

              from typing import Any, Optional

from .main import (dotenv_values, find_dotenv, get_key, load_dotenv, set_key,
                   unset_key)


def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)

            

Reported by Pylint.

Unable to import '__init__.ipython'
Error

Line: 8 Column: 5

              

def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)


def get_cli_string(
    path: Optional[str] = None,

            

Reported by Pylint.

Redefining name 'load_ipython_extension' from outer scope (line 7)
Error

Line: 8 Column: 5

              

def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)


def get_cli_string(
    path: Optional[str] = None,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from typing import Any, Optional

from .main import (dotenv_values, find_dotenv, get_key, load_dotenv, set_key,
                   unset_key)


def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

                                 unset_key)


def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)


def get_cli_string(

            

Reported by Pylint.

Import outside toplevel (ipython.load_ipython_extension)
Error

Line: 8 Column: 5

              

def load_ipython_extension(ipython: Any) -> None:
    from .ipython import load_ipython_extension
    load_ipython_extension(ipython)


def get_cli_string(
    path: Optional[str] = None,

            

Reported by Pylint.

pipenv/patched/notpip/_vendor/cachecontrol/filewrapper.py
6 issues
TODO: Add some logging here...
Error

Line: 47 Column: 3

                          pass

        # We just don't cache it then.
        # TODO: Add some logging here...
        return False

    def _close(self):
        if self.__callback:
            self.__callback(self.__buf.getvalue())

            

Reported by Pylint.

Access to a protected member _safe_read of a client class
Error

Line: 70 Column: 16

                      return data

    def _safe_read(self, amt):
        data = self.__fp._safe_read(amt)
        if amt == 2 and data == b"\r\n":
            # urllib executes this read to toss the CRLF at the end
            # of the chunk.
            return data


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from io import BytesIO


class CallbackFileWrapper(object):
    """
    Small wrapper around a fp object which will tee everything read into a
    buffer, and when that file is closed it will execute a callback with the
    contents of that buffer.


            

Reported by Pylint.

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

Line: 4 Column: 1

              from io import BytesIO


class CallbackFileWrapper(object):
    """
    Small wrapper around a fp object which will tee everything read into a
    buffer, and when that file is closed it will execute a callback with the
    contents of that buffer.


            

Reported by Pylint.

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

Line: 30 Column: 9

                      # self.__fp hasn't been set.
        #
        # [0] https://docs.python.org/2/reference/expressions.html#atom-identifiers
        fp = self.__getattribute__("_CallbackFileWrapper__fp")
        return getattr(fp, name)

    def __is_fp_closed(self):
        try:
            return self.__fp.fp is None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 61 Column: 5

                      # and allows the garbage collector to do it's thing normally.
        self.__callback = None

    def read(self, amt=None):
        data = self.__fp.read(amt)
        self.__buf.write(data)
        if self.__is_fp_closed():
            self._close()


            

Reported by Pylint.

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

Line: 8 Column: 1

              import re
from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

BuildTag = Union[Tuple[()], Tuple[int, str]]
NormalizedName = NewType("NormalizedName", str)



            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
from typing import FrozenSet, NewType, Tuple, Union, cast

from .tags import Tag, parse_tag
from .version import InvalidVersion, Version

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 32 Column: 1

              _build_tag_regex = re.compile(r"(\d+)(.*)")


def canonicalize_name(name: str) -> NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 81 Column: 1

                  return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 117 Column: 1

                  return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:

            

Reported by Pylint.

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

Line: 12 Column: 1

              import idna
import urllib3

from . import __version__ as requests_version

try:
    import charset_normalizer
except ImportError:
    charset_normalizer = None

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 51 Column: 48

                  if implementation == 'CPython':
        implementation_version = platform.python_version()
    elif implementation == 'PyPy':
        implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                               sys.pypy_version_info.minor,
                                               sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            implementation_version = ''.join([
                implementation_version, sys.pypy_version_info.releaselevel

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 52 Column: 48

                      implementation_version = platform.python_version()
    elif implementation == 'PyPy':
        implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                               sys.pypy_version_info.minor,
                                               sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            implementation_version = ''.join([
                implementation_version, sys.pypy_version_info.releaselevel
            ])

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 53 Column: 48

                  elif implementation == 'PyPy':
        implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                               sys.pypy_version_info.minor,
                                               sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            implementation_version = ''.join([
                implementation_version, sys.pypy_version_info.releaselevel
            ])
    elif implementation == 'Jython':

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 54 Column: 12

                      implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                               sys.pypy_version_info.minor,
                                               sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            implementation_version = ''.join([
                implementation_version, sys.pypy_version_info.releaselevel
            ])
    elif implementation == 'Jython':
        implementation_version = platform.python_version()  # Complete Guess

            

Reported by Pylint.

Module 'sys' has no 'pypy_version_info' member
Error

Line: 56 Column: 41

                                                             sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            implementation_version = ''.join([
                implementation_version, sys.pypy_version_info.releaselevel
            ])
    elif implementation == 'Jython':
        implementation_version = platform.python_version()  # Complete Guess
    elif implementation == 'IronPython':
        implementation_version = platform.python_version()  # Complete Guess

            

Reported by Pylint.

pipenv/vendor/distlib/__init__.py
6 issues
Missing module docstring
Error

Line: 1 Column: 1

              # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2019 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging

__version__ = '0.3.2'

            

Reported by Pylint.

Missing class docstring
Error

Line: 11 Column: 1

              
__version__ = '0.3.2'

class DistlibException(Exception):
    pass

try:
    from logging import NullHandler
except ImportError: # pragma: no cover

            

Reported by Pylint.

Missing class docstring
Error

Line: 17 Column: 5

              try:
    from logging import NullHandler
except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)

            

Reported by Pylint.

More than one statement on a single line
Error

Line: 18 Column: 35

                  from logging import NullHandler
except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())

            

Reported by Pylint.

More than one statement on a single line
Error

Line: 19 Column: 33

              except ImportError: # pragma: no cover
    class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())

            

Reported by Pylint.

More than one statement on a single line
Error

Line: 20 Column: 31

                  class NullHandler(logging.Handler):
        def handle(self, record): pass
        def emit(self, record): pass
        def createLock(self): self.lock = None

logger = logging.getLogger(__name__)
logger.addHandler(NullHandler())

            

Reported by Pylint.

pipenv/vendor/shellingham/posix/proc.py
6 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              import re
import sys

from ._core import Process


STAT_PPID = 3
STAT_TTY = 6


            

Reported by Pylint.

XXX: Command line arguments can be arbitrary byte sequences, not
Error

Line: 43 Column: 3

                  path = os.path.join("/proc", str(pid), "cmdline")
    encoding = sys.getfilesystemencoding() or "utf-8"
    with io.open(path, encoding=encoding, errors="replace") as f:
        # XXX: Command line arguments can be arbitrary byte sequences, not
        # necessarily decodable. For Shellingham's purpose, however, we don't
        # care. (pypa/pipenv#2820)
        # cmdline appends an extra NULL at the end, hence the [:-1].
        return tuple(f.read().split("\0")[:-1])


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import io
import os
import re
import sys

from ._core import Process


STAT_PPID = 3

            

Reported by Pylint.

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

Line: 33 Column: 63

              
def _get_stat(pid, name):
    path = os.path.join("/proc", str(pid), name)
    with io.open(path, encoding="ascii", errors="replace") as f:
        # We only care about TTY and PPID -- all numbers.
        parts = STAT_PATTERN.findall(f.read())
        return parts[STAT_TTY], parts[STAT_PPID]



            

Reported by Pylint.

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

Line: 42 Column: 64

              def _get_cmdline(pid):
    path = os.path.join("/proc", str(pid), "cmdline")
    encoding = sys.getfilesystemencoding() or "utf-8"
    with io.open(path, encoding=encoding, errors="replace") as f:
        # XXX: Command line arguments can be arbitrary byte sequences, not
        # necessarily decodable. For Shellingham's purpose, however, we don't
        # care. (pypa/pipenv#2820)
        # cmdline appends an extra NULL at the end, hence the [:-1].
        return tuple(f.read().split("\0")[:-1])

            

Reported by Pylint.

Missing class docstring
Error

Line: 50 Column: 1

                      return tuple(f.read().split("\0")[:-1])


class ProcFormatError(EnvironmentError):
    pass


def get_process_mapping():
    """Try to look up the process tree via the /proc interface."""

            

Reported by Pylint.

pipenv/vendor/urllib3/util/request.py
6 issues
Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              
from base64 import b64encode

from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types

# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.
# The only headers that are supported are ``Accept-Encoding``,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              from base64 import b64encode

from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types

# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.
# The only headers that are supported are ``Accept-Encoding``,
# ``Host``, and ``User-Agent``.

            

Reported by Pylint.

Unused brotli imported as _unused_module_brotli
Error

Line: 17 Column: 5

              
ACCEPT_ENCODING = "gzip,deflate"
try:
    import brotli as _unused_module_brotli  # noqa: F401
except ImportError:
    pass
else:
    ACCEPT_ENCODING += ",br"


            

Reported by Pylint.

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

Line: 132 Column: 13

                      try:
            body_seek(body_pos)
        except (IOError, OSError):
            raise UnrewindableBodyError(
                "An error occurred when rewinding request body for redirect/retry."
            )
    elif body_pos is _FAILEDTELL:
        raise UnrewindableBodyError(
            "Unable to record file position for rewinding "

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import absolute_import

from base64 import b64encode

from ..exceptions import UnrewindableBodyError
from ..packages.six import b, integer_types

# Pass as a value within ``headers`` to skip
# emitting some HTTP headers that are added automatically.

            

Reported by Pylint.

Too many arguments (6/5)
Error

Line: 26 Column: 1

              _FAILEDTELL = object()


def make_headers(
    keep_alive=None,
    accept_encoding=None,
    user_agent=None,
    basic_auth=None,
    proxy_basic_auth=None,

            

Reported by Pylint.