The following issues were found

tests/integration/test_cli.py
172 issues
Unable to import 'pytest'
Error

Line: 7 Column: 1

              import os
import re

import pytest

from flaky import flaky

from pipenv.utils import normalize_drive, subprocess_run


            

Reported by Pylint.

Unable to import 'flaky'
Error

Line: 9 Column: 1

              
import pytest

from flaky import flaky

from pipenv.utils import normalize_drive, subprocess_run


@pytest.mark.cli

            

Reported by Pylint.

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

Line: 15 Column: 1

              

@pytest.mark.cli
def test_pipenv_where(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 15 Column: 1

              

@pytest.mark.cli
def test_pipenv_where(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout


            

Reported by Pylint.

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

Line: 16 Column: 30

              
@pytest.mark.cli
def test_pipenv_where(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout



            

Reported by Pylint.

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

Line: 17 Column: 9

              @pytest.mark.cli
def test_pipenv_where(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout


@pytest.mark.cli

            

Reported by Pylint.

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

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

              def test_pipenv_where(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout


@pytest.mark.cli
def test_pipenv_venv(PipenvInstance):

            

Reported by Bandit.

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

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

                  with PipenvInstance() as p:
        c = p.pipenv("--where")
        assert c.returncode == 0
        assert normalize_drive(p.path) in c.stdout


@pytest.mark.cli
def test_pipenv_venv(PipenvInstance):
    with PipenvInstance() as p:

            

Reported by Bandit.

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

Line: 23 Column: 1

              

@pytest.mark.cli
def test_pipenv_venv(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv('--python python')
        assert c.returncode == 0
        c = p.pipenv('--venv')
        assert c.returncode == 0

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 23 Column: 1

              

@pytest.mark.cli
def test_pipenv_venv(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv('--python python')
        assert c.returncode == 0
        c = p.pipenv('--venv')
        assert c.returncode == 0

            

Reported by Pylint.

pipenv/vendor/tomlkit/items.py
170 issues
Attempted relative import beyond top-level package
Error

Line: 17 Column: 1

              from typing import Optional
from typing import Union

from ._compat import PY2
from ._compat import PY38
from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              from typing import Union

from ._compat import PY2
from ._compat import PY38
from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              
from ._compat import PY2
from ._compat import PY38
from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from ._compat import PY2
from ._compat import PY38
from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              from ._compat import PY38
from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string


if PY2:

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              from ._compat import MutableMapping
from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string


if PY2:
    from pipenv.vendor.backports.functools_lru_cache import lru_cache

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 23 Column: 1

              from ._compat import decode
from ._compat import long
from ._compat import unicode
from ._utils import escape_string


if PY2:
    from pipenv.vendor.backports.functools_lru_cache import lru_cache
else:

            

Reported by Pylint.

Unable to import 'pipenv.vendor.backports.functools_lru_cache'
Error

Line: 27 Column: 5

              

if PY2:
    from pipenv.vendor.backports.functools_lru_cache import lru_cache
else:
    from functools import lru_cache


def item(value, _parent=None, _sort_keys=False):

            

Reported by Pylint.

No name 'backports' in module 'pipenv.vendor'
Error

Line: 27 Column: 5

              

if PY2:
    from pipenv.vendor.backports.functools_lru_cache import lru_cache
else:
    from functools import lru_cache


def item(value, _parent=None, _sort_keys=False):

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 33 Column: 5

              

def item(value, _parent=None, _sort_keys=False):
    from .container import Container

    if isinstance(value, Item):
        return value

    if isinstance(value, bool):

            

Reported by Pylint.

pipenv/vendor/requirementslib/models/metadata.py
167 issues
Unable to import 'distlib.metadata'
Error

Line: 14 Column: 1

              
import attr
import dateutil.parser
import distlib.metadata
import distlib.wheel
import packaging.version
import requests
import six
import vistir

            

Reported by Pylint.

Unable to import 'distlib.wheel'
Error

Line: 15 Column: 1

              import attr
import dateutil.parser
import distlib.metadata
import distlib.wheel
import packaging.version
import requests
import six
import vistir
from packaging.markers import Marker

            

Reported by Pylint.

Unable to import 'packaging.version'
Error

Line: 16 Column: 1

              import dateutil.parser
import distlib.metadata
import distlib.wheel
import packaging.version
import requests
import six
import vistir
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement

            

Reported by Pylint.

Unable to import 'vistir'
Error

Line: 19 Column: 1

              import packaging.version
import requests
import six
import vistir
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag


            

Reported by Pylint.

Unable to import 'packaging.markers'
Error

Line: 20 Column: 1

              import requests
import six
import vistir
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag

from ..environment import MYPY_RUNNING

            

Reported by Pylint.

Unable to import 'packaging.requirements'
Error

Line: 21 Column: 1

              import six
import vistir
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag

from ..environment import MYPY_RUNNING
from .markers import (

            

Reported by Pylint.

Unable to import 'packaging.specifiers'
Error

Line: 22 Column: 1

              import vistir
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag

from ..environment import MYPY_RUNNING
from .markers import (
    get_contained_extras,

            

Reported by Pylint.

Unable to import 'packaging.tags'
Error

Line: 23 Column: 1

              from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag

from ..environment import MYPY_RUNNING
from .markers import (
    get_contained_extras,
    get_contained_pyversions,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 25 Column: 1

              from packaging.specifiers import Specifier, SpecifierSet
from packaging.tags import Tag

from ..environment import MYPY_RUNNING
from .markers import (
    get_contained_extras,
    get_contained_pyversions,
    get_without_extra,
    get_without_pyversion,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              from packaging.tags import Tag

from ..environment import MYPY_RUNNING
from .markers import (
    get_contained_extras,
    get_contained_pyversions,
    get_without_extra,
    get_without_pyversion,
    marker_from_specifier,

            

Reported by Pylint.

pipenv/vendor/more_itertools/more.py
163 issues
Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              from sys import hexversion, maxsize
from time import monotonic

from .recipes import (
    consume,
    flatten,
    pairwise,
    powerset,
    take,

            

Reported by Pylint.

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

Line: 210 Column: 13

                          return deque(iterable, maxlen=1)[-1]
    except (IndexError, TypeError, StopIteration):
        if default is _marker:
            raise ValueError(
                'last() was called on an empty iterable, and no default was '
                'provided.'
            )
        return default


            

Reported by Pylint.

Using possibly undefined loop variable 'i'
Error

Line: 1540 Column: 58

                          return zip(*iterables)

        # If we did break out, there was a mismatch.
        raise UnequalIterablesError(details=(first_size, i, size))
    # If any one of the iterables didn't have a length, start reading
    # them until one runs out.
    except TypeError:
        return _zip_equal_generator(iterables)


            

Reported by Pylint.

Redefining name 'itemgetter' from outer scope (line 25)
Error

Line: 1680 Column: 5

                  head = head[0]
    iterables = tee(iterable, len(head))

    def itemgetter(i):
        def getter(obj):
            try:
                return obj[i]
            except IndexError:
                # basically if we have an iterable like

            

Reported by Pylint.

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

Line: 1694 Column: 17

                              # we create a custom itemgetter
                # which just stops the unzipped iterables
                # at first length mismatch
                raise StopIteration

        return getter

    return tuple(map(itemgetter(i), it) for i, it in enumerate(iterables))


            

Reported by Pylint.

Parameters differ from overridden 'index' method
Error

Line: 2084 Column: 5

                  def count(self, value):
        return int(value in self)

    def index(self, value):
        if self._growing:
            if self._start <= value < self._stop:
                q, r = divmod(value - self._start, self._step)
                if r == self._zero:
                    return int(q)

            

Reported by Pylint.

Unused variable 'k'
Error

Line: 2470 Column: 9

                      [[1, 2], [11, 12], [21, 22]]

    """
    for k, g in groupby(
        enumerate(iterable), key=lambda x: x[0] - ordering(x[1])
    ):
        yield map(itemgetter(1), g)



            

Reported by Pylint.

Redefining name 'first' from outer scope (line 160)
Error

Line: 2508 Column: 9

                  """
    a, b = tee(iterable)
    try:
        first = [next(b)]
    except StopIteration:
        return iter([])

    if initial is not None:
        first = []

            

Reported by Pylint.

Redefining name 'count' from outer scope (line 8)
Error

Line: 2935 Column: 42

                  return reversed(list(locate(iterable, pred, window_size)))


def replace(iterable, pred, substitutes, count=None, window_size=1):
    """Yield the items from *iterable*, replacing the items for which *pred*
    returns ``True`` with the items from the iterable *substitutes*.

        >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
        >>> pred = lambda x: x == 0

            

Reported by Pylint.

Using possibly undefined loop variable 'n'
Error

Line: 3760 Column: 32

                  else:
        raise ValueError('element is not a combination of iterable')

    n, _ = last(pool, default=(n, None))

    # Python versiosn below 3.8 don't have math.comb
    index = 1
    for i, j in enumerate(reversed(indexes), start=1):
        j = n - j

            

Reported by Pylint.

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

Line: 25 Column: 1

              import tempfile
import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

              
from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)
from .version import NormalizedVersion, UnsupportedVersionError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 33 Column: 1

              from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

cache = None    # created when needed


            

Reported by Pylint.

Redefining built-in 'filter'
Error

Line: 26 Column: 1

              import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,

            

Reported by Pylint.

Unused METADATA_FILENAME imported from metadata
Error

Line: 28 Column: 1

              from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME,
                       LEGACY_METADATA_FILENAME)
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir,
                   get_platform)
from .version import NormalizedVersion, UnsupportedVersionError

            

Reported by Pylint.

Unused variable 'v'
Error

Line: 113 Column: 16

              
    def remove(self, pathname):
        extensions = self.impure_wheels.pop(pathname)
        for k, v in extensions:
            if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:

            

Reported by Pylint.

Unused argument 'path'
Error

Line: 117 Column: 37

                          if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:
            result = self
        else:
            result = None
        return result

            

Reported by Pylint.

pipenv/vendor/dateutil/parser/_parser.py
162 issues
Attempted relative import beyond top-level package
Error

Line: 49 Column: 1

              
from warnings import warn

from .. import relativedelta
from .. import tz

__all__ = ["parse", "parserinfo", "ParserError"]



            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 50 Column: 1

              from warnings import warn

from .. import relativedelta
from .. import tz

__all__ = ["parse", "parserinfo", "ParserError"]


# TODO: pandas.core.tools.datetimes imports this explicitly.  Might be worth

            

Reported by Pylint.

Instance of '_resultbase' has no '__slots__' member
Error

Line: 222 Column: 21

              class _resultbase(object):

    def __init__(self):
        for attr in self.__slots__:
            setattr(self, attr, None)

    def _repr(self, classname):
        l = []
        for attr in self.__slots__:

            

Reported by Pylint.

Instance of '_resultbase' has no '__slots__' member
Error

Line: 227 Column: 21

              
    def _repr(self, classname):
        l = []
        for attr in self.__slots__:
            value = getattr(self, attr)
            if value is not None:
                l.append("%s=%s" % (attr, repr(value)))
        return "%s(%s)" % (classname, ", ".join(l))


            

Reported by Pylint.

Instance of '_resultbase' has no '__slots__' member
Error

Line: 235 Column: 33

              
    def __len__(self):
        return (sum(getattr(self, attr) is not None
                    for attr in self.__slots__))

    def __repr__(self):
        return self._repr(self.__class__.__name__)



            

Reported by Pylint.

Bad first argument 'self.__class__' given to super()
Error

Line: 396 Column: 9

              
class _ymd(list):
    def __init__(self, *args, **kwargs):
        super(self.__class__, self).__init__(*args, **kwargs)
        self.century_specified = False
        self.dstridx = None
        self.mstridx = None
        self.ystridx = None


            

Reported by Pylint.

Bad first argument 'self.__class__' given to super()
Error

Line: 441 Column: 9

                              raise ValueError(label)
            label = 'Y'

        super(self.__class__, self).append(int(val))

        if label == 'M':
            if self.has_month:
                raise ValueError('Month is already set')
            self.mstridx = len(self) - 1

            

Reported by Pylint.

Instance of '_result' has no 'stdoffset' member
Error

Line: 1497 Column: 38

                                  else:
                        signal = 1
                    used_idxs.append(i)
                    res.dstoffset = (res.stdoffset + int(l[i]) * signal)

                # This was a made-up format that is not in normal use
                warn(('Parsed time zone "%s"' % tzstr) +
                     'is in a non-standard dateutil-specific format, which ' +
                     'is now deprecated; support for parsing this format ' +

            

Reported by Pylint.

TODO: pandas.core.tools.datetimes imports this explicitly. Might be worth
Error

Line: 55 Column: 3

              __all__ = ["parse", "parserinfo", "ParserError"]


# TODO: pandas.core.tools.datetimes imports this explicitly.  Might be worth
# making public and/or figuring out if there is something we can
# take off their plate.
class _timelex(object):
    # Fractional seconds are sometimes split by a comma
    _split_decimal = re.compile("([.,])")

            

Reported by Pylint.

TODO: "Tues"
Error

Line: 265 Column: 3

                          "st", "nd", "rd", "th"]

    WEEKDAYS = [("Mon", "Monday"),
                ("Tue", "Tuesday"),     # TODO: "Tues"
                ("Wed", "Wednesday"),
                ("Thu", "Thursday"),    # TODO: "Thurs"
                ("Fri", "Friday"),
                ("Sat", "Saturday"),
                ("Sun", "Sunday")]

            

Reported by Pylint.

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

Line: 17 Column: 1

              
from markupsafe import Markup

from . import nodes
from .compiler import CodeGenerator
from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 18 Column: 1

              from markupsafe import Markup

from . import nodes
from .compiler import CodeGenerator
from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 19 Column: 1

              
from . import nodes
from .compiler import CodeGenerator
from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 20 Column: 1

              from . import nodes
from .compiler import CodeGenerator
from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 21 Column: 1

              from .compiler import CodeGenerator
from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 22 Column: 1

              from .compiler import generate
from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES
from .defaults import DEFAULT_TESTS

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 23 Column: 1

              from .defaults import BLOCK_END_STRING
from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES
from .defaults import DEFAULT_TESTS
from .defaults import KEEP_TRAILING_NEWLINE

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 24 Column: 1

              from .defaults import BLOCK_START_STRING
from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES
from .defaults import DEFAULT_TESTS
from .defaults import KEEP_TRAILING_NEWLINE
from .defaults import LINE_COMMENT_PREFIX

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 25 Column: 1

              from .defaults import COMMENT_END_STRING
from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES
from .defaults import DEFAULT_TESTS
from .defaults import KEEP_TRAILING_NEWLINE
from .defaults import LINE_COMMENT_PREFIX
from .defaults import LINE_STATEMENT_PREFIX

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 26 Column: 1

              from .defaults import COMMENT_START_STRING
from .defaults import DEFAULT_FILTERS
from .defaults import DEFAULT_NAMESPACE
from .defaults import DEFAULT_POLICIES
from .defaults import DEFAULT_TESTS
from .defaults import KEEP_TRAILING_NEWLINE
from .defaults import LINE_COMMENT_PREFIX
from .defaults import LINE_STATEMENT_PREFIX
from .defaults import LSTRIP_BLOCKS

            

Reported by Pylint.

pipenv/vendor/parse.py
155 issues
Value 'format' is unsubscriptable
Error

Line: 766 Column: 30

                  if format[0] in '<>=^':
        align = format[0]
        format = format[1:]
    elif len(format) > 1 and format[1] in '<>=^':
        fill = format[0]
        align = format[1]
        format = format[2:]

    zero = False

            

Reported by Pylint.

Unused argument 'match'
Error

Line: 581 Column: 24

                      return self.converter(string)


def percentage(string, match):
    return float(string[:-1]) / 100.0


class FixedTzOffset(tzinfo):
    """Fixed offset in minutes east from UTC."""

            

Reported by Pylint.

Unused argument 'string'
Error

Line: 646 Column: 5

              

def date_convert(
    string,
    match,
    ymd=None,
    mdy=None,
    dmy=None,
    d_m_y=None,

            

Reported by Pylint.

TODO use the awesome python TZ module?
Error

Line: 715 Column: 3

                  elif tz:
        tz = tz.strip()
        if tz.isupper():
            # TODO use the awesome python TZ module?
            pass
        else:
            sign = tz[0]
            if ':' in tz:
                tzh, tzm = tz[1:].split(':')

            

Reported by Pylint.

Redefining built-in 'format'
Error

Line: 760 Column: 20

              ALLOWED_TYPES = set(list('nbox%fFegwWdDsSl') + ['t' + c for c in 'ieahgcts'])


def extract_format(format, extra_types):
    """Pull apart the format [[fill]align][0][width][.precision][type]"""
    fill = align = None
    if format[0] in '<>=^':
        align = format[0]
        format = format[1:]

            

Reported by Pylint.

Possibly unused variable 'align'
Error

Line: 762 Column: 12

              
def extract_format(format, extra_types):
    """Pull apart the format [[fill]align][0][width][.precision][type]"""
    fill = align = None
    if format[0] in '<>=^':
        align = format[0]
        format = format[1:]
    elif len(format) > 1 and format[1] in '<>=^':
        fill = format[0]

            

Reported by Pylint.

Possibly unused variable 'fill'
Error

Line: 762 Column: 5

              
def extract_format(format, extra_types):
    """Pull apart the format [[fill]align][0][width][.precision][type]"""
    fill = align = None
    if format[0] in '<>=^':
        align = format[0]
        format = format[1:]
    elif len(format) > 1 and format[1] in '<>=^':
        fill = format[0]

            

Reported by Pylint.

Possibly unused variable 'zero'
Error

Line: 771 Column: 5

                      align = format[1]
        format = format[2:]

    zero = False
    if format and format[0] == '0':
        zero = True
        format = format[1:]

    width = ''

            

Reported by Pylint.

Redefining built-in 'type'
Error

Line: 795 Column: 5

                          format = format[1:]

    # the rest is the type, if present
    type = format
    if type and type not in ALLOWED_TYPES and type not in extra_types:
        raise ValueError('format spec %r not recognised' % type)

    return locals()


            

Reported by Pylint.

Redefining built-in 'format'
Error

Line: 808 Column: 24

              class Parser(object):
    """Encapsulate a format string that may be used to parse other strings."""

    def __init__(self, format, extra_types=None, case_sensitive=False):
        # a mapping of a name as in {hello.world} to a regex-group compatible
        # name, like hello__world Its used to prevent the transformation of
        # name-to-group and group to name to fail subtly, such as in:
        # hello_.world-> hello___world->hello._world
        self._group_to_name_map = {}

            

Reported by Pylint.

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

Line: 26 Column: 1

              import tempfile
import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 27 Column: 1

              import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 28 Column: 1

              
from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 29 Column: 1

              from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 30 Column: 1

              from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 32 Column: 1

              from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

logger = logging.getLogger(__name__)

cache = None    # created when needed


            

Reported by Pylint.

Redefining built-in 'filter'
Error

Line: 27 Column: 1

              import zipfile

from . import __version__, DistlibException
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
from .database import InstalledDistribution
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache,
                   cached_property, get_cache_base, read_exports, tempdir)
from .version import NormalizedVersion, UnsupportedVersionError

            

Reported by Pylint.

Unused variable 'v'
Error

Line: 109 Column: 16

              
    def remove(self, pathname):
        extensions = self.impure_wheels.pop(pathname)
        for k, v in extensions:
            if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:

            

Reported by Pylint.

Unused argument 'path'
Error

Line: 113 Column: 37

                          if k in self.libs:
                del self.libs[k]

    def find_module(self, fullname, path=None):
        if fullname in self.libs:
            result = self
        else:
            result = None
        return result

            

Reported by Pylint.

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

Line: 296 Column: 13

                      try:
            hasher = getattr(hashlib, hash_kind)
        except AttributeError:
            raise DistlibException('Unsupported hash algorithm: %r' % hash_kind)
        result = hasher(data).digest()
        result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii')
        return hash_kind, result

    def write_record(self, records, record_path, base):

            

Reported by Pylint.

pipenv/patched/yaml3/emitter.py
150 issues
Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              
__all__ = ['Emitter', 'EmitterError']

from .error import YAMLError
from .events import *

class EmitterError(YAMLError):
    pass


            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              __all__ = ['Emitter', 'EmitterError']

from .error import YAMLError
from .events import *

class EmitterError(YAMLError):
    pass

class ScalarAnalysis:

            

Reported by Pylint.

Undefined variable 'DocumentStartEvent'
Error

Line: 124 Column: 30

                      if not self.events:
            return True
        event = self.events[0]
        if isinstance(event, DocumentStartEvent):
            return self.need_events(1)
        elif isinstance(event, SequenceStartEvent):
            return self.need_events(2)
        elif isinstance(event, MappingStartEvent):
            return self.need_events(3)

            

Reported by Pylint.

Undefined variable 'SequenceStartEvent'
Error

Line: 126 Column: 32

                      event = self.events[0]
        if isinstance(event, DocumentStartEvent):
            return self.need_events(1)
        elif isinstance(event, SequenceStartEvent):
            return self.need_events(2)
        elif isinstance(event, MappingStartEvent):
            return self.need_events(3)
        else:
            return False

            

Reported by Pylint.

Undefined variable 'MappingStartEvent'
Error

Line: 128 Column: 32

                          return self.need_events(1)
        elif isinstance(event, SequenceStartEvent):
            return self.need_events(2)
        elif isinstance(event, MappingStartEvent):
            return self.need_events(3)
        else:
            return False

    def need_events(self, count):

            

Reported by Pylint.

Undefined variable 'DocumentStartEvent'
Error

Line: 136 Column: 35

                  def need_events(self, count):
        level = 0
        for event in self.events[1:]:
            if isinstance(event, (DocumentStartEvent, CollectionStartEvent)):
                level += 1
            elif isinstance(event, (DocumentEndEvent, CollectionEndEvent)):
                level -= 1
            elif isinstance(event, StreamEndEvent):
                level = -1

            

Reported by Pylint.

Undefined variable 'CollectionStartEvent'
Error

Line: 136 Column: 55

                  def need_events(self, count):
        level = 0
        for event in self.events[1:]:
            if isinstance(event, (DocumentStartEvent, CollectionStartEvent)):
                level += 1
            elif isinstance(event, (DocumentEndEvent, CollectionEndEvent)):
                level -= 1
            elif isinstance(event, StreamEndEvent):
                level = -1

            

Reported by Pylint.

Undefined variable 'CollectionEndEvent'
Error

Line: 138 Column: 55

                      for event in self.events[1:]:
            if isinstance(event, (DocumentStartEvent, CollectionStartEvent)):
                level += 1
            elif isinstance(event, (DocumentEndEvent, CollectionEndEvent)):
                level -= 1
            elif isinstance(event, StreamEndEvent):
                level = -1
            if level < 0:
                return False

            

Reported by Pylint.

Undefined variable 'DocumentEndEvent'
Error

Line: 138 Column: 37

                      for event in self.events[1:]:
            if isinstance(event, (DocumentStartEvent, CollectionStartEvent)):
                level += 1
            elif isinstance(event, (DocumentEndEvent, CollectionEndEvent)):
                level -= 1
            elif isinstance(event, StreamEndEvent):
                level = -1
            if level < 0:
                return False

            

Reported by Pylint.

Undefined variable 'StreamEndEvent'
Error

Line: 140 Column: 36

                              level += 1
            elif isinstance(event, (DocumentEndEvent, CollectionEndEvent)):
                level -= 1
            elif isinstance(event, StreamEndEvent):
                level = -1
            if level < 0:
                return False
        return (len(self.events) < count+1)


            

Reported by Pylint.