The following issues were found
pipenv/patched/notpip/_internal/operations/build/wheel.py
4 issues
Line: 29
Column: 9
assert metadata_directory is not None
if build_options:
# PEP 517 does not support --build-options
logger.error('Cannot build wheel for %s using PEP 517 when '
'--build-option is present' % (name,))
return None
try:
logger.debug('Destination directory: %s', tempd)
Reported by Pylint.
Line: 43
Column: 12
tempd,
metadata_directory=metadata_directory,
)
except Exception:
logger.error('Failed building wheel for %s', name)
return None
return os.path.join(tempd, wheel_name)
Reported by Pylint.
Line: 1
Column: 1
import logging
import os
from pipenv.patched.notpip._internal.utils.subprocess import runner_with_spinner_message
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from typing import List, Optional
from pipenv.patched.notpip._vendor.pep517.wrappers import Pep517HookCaller
Reported by Pylint.
Line: 26
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
Returns path to wheel if successfully built. Otherwise, returns None.
"""
assert metadata_directory is not None
if build_options:
# PEP 517 does not support --build-options
logger.error('Cannot build wheel for %s using PEP 517 when '
'--build-option is present' % (name,))
return None
Reported by Bandit.
pipenv/vendor/yarg/__init__.py
4 issues
Line: 49
Column: 1
"""
from .client import get
from .exceptions import HTTPError
from .package import json2package
from .parse import (newest_packages, latest_updated_packages)
Reported by Pylint.
Line: 50
Column: 1
from .client import get
from .exceptions import HTTPError
from .package import json2package
from .parse import (newest_packages, latest_updated_packages)
__all__ = ['get', 'HTTPError', 'json2package', 'newest_packages',
Reported by Pylint.
Line: 51
Column: 1
from .client import get
from .exceptions import HTTPError
from .package import json2package
from .parse import (newest_packages, latest_updated_packages)
__all__ = ['get', 'HTTPError', 'json2package', 'newest_packages',
'latest_updated_packages', ]
Reported by Pylint.
Line: 52
Column: 1
from .client import get
from .exceptions import HTTPError
from .package import json2package
from .parse import (newest_packages, latest_updated_packages)
__all__ = ['get', 'HTTPError', 'json2package', 'newest_packages',
'latest_updated_packages', ]
Reported by Pylint.
pipenv/vendor/yarg/client.py
4 issues
Line: 28
Column: 1
import requests
from .exceptions import HTTPError
from .package import json2package
def get(package_name, pypi_server="https://pypi.python.org/pypi/"):
"""
Reported by Pylint.
Line: 29
Column: 1
import requests
from .exceptions import HTTPError
from .package import json2package
def get(package_name, pypi_server="https://pypi.python.org/pypi/"):
"""
Constructs a request to the PyPI server and returns a
Reported by Pylint.
Line: 1
Column: 1
# -*- coding: utf-8 -*-
# (The MIT License)
#
# Copyright (c) 2014 Kura
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
Reported by Pylint.
Line: 51
Column: 5
if response.status_code >= 300:
raise HTTPError(status_code=response.status_code,
reason=response.reason)
if hasattr(response.content, 'decode'):
return json2package(response.content.decode())
else:
return json2package(response.content)
Reported by Pylint.
pipenv/vendor/yaspin/api.py
4 issues
Line: 13
Column: 1
import signal
from .core import Yaspin
from .signal_handlers import default_handler
def yaspin(*args, **kwargs):
"""Display spinner in stdout.
Reported by Pylint.
Line: 14
Column: 1
import signal
from .core import Yaspin
from .signal_handlers import default_handler
def yaspin(*args, **kwargs):
"""Display spinner in stdout.
Reported by Pylint.
Line: 81
Column: 1
return Yaspin(*args, **kwargs)
def kbi_safe_yaspin(*args, **kwargs):
kwargs["sigmap"] = {signal.SIGINT: default_handler}
return Yaspin(*args, **kwargs)
# Handle PYTHONOPTIMIZE=2 case, when docstrings are set to None.
Reported by Pylint.
Line: 88
Column: 5
# Handle PYTHONOPTIMIZE=2 case, when docstrings are set to None.
if yaspin.__doc__:
_kbi_safe_doc = yaspin.__doc__.replace("yaspin", "kbi_safe_yaspin")
kbi_safe_yaspin.__doc__ = _kbi_safe_doc
Reported by Pylint.
pipenv/vendor/importlib_resources/_legacy.py
4 issues
Line: 6
Column: 1
import types
from typing import Union, Iterable, ContextManager
from typing.io import BinaryIO, TextIO
from . import _common
Package = Union[types.ModuleType, str]
Resource = Union[str, os.PathLike]
Reported by Pylint.
Line: 8
Column: 1
from typing import Union, Iterable, ContextManager
from typing.io import BinaryIO, TextIO
from . import _common
Package = Union[types.ModuleType, str]
Resource = Union[str, os.PathLike]
Reported by Pylint.
Line: 1
Column: 1
import os
import pathlib
import types
from typing import Union, Iterable, ContextManager
from typing.io import BinaryIO, TextIO
from . import _common
Reported by Pylint.
Line: 47
Column: 60
The decoding-related arguments have the same semantics as those of
bytes.decode().
"""
with open_text(package, resource, encoding, errors) as fp:
return fp.read()
def contents(package: Package) -> Iterable[str]:
"""Return an iterable of entries in `package`.
Reported by Pylint.
pipenv/vendor/importlib_resources/__init__.py
4 issues
Line: 3
Column: 1
"""Read resources contained within a package."""
from ._common import (
as_file,
files,
Package,
Resource,
)
Reported by Pylint.
Line: 10
Column: 1
Resource,
)
from ._legacy import (
contents,
open_binary,
read_binary,
open_text,
read_text,
Reported by Pylint.
Line: 20
Column: 1
path,
)
from importlib_resources.abc import ResourceReader
__all__ = [
'Package',
'Resource',
Reported by Pylint.
Line: 20
Column: 1
path,
)
from importlib_resources.abc import ResourceReader
__all__ = [
'Package',
'Resource',
Reported by Pylint.
tests/conftest.py
4 issues
Line: 1
Column: 1
import pytest
@pytest.fixture()
def project():
from pipenv.project import Project
return Project()
Reported by Pylint.
Line: 1
Column: 1
import pytest
@pytest.fixture()
def project():
from pipenv.project import Project
return Project()
Reported by Pylint.
Line: 5
Column: 1
@pytest.fixture()
def project():
from pipenv.project import Project
return Project()
Reported by Pylint.
Line: 6
Column: 5
@pytest.fixture()
def project():
from pipenv.project import Project
return Project()
Reported by Pylint.
pipenv/vendor/idna/__init__.py
4 issues
Line: 1
Column: 1
from .package_data import __version__
from .core import (
IDNABidiError,
IDNAError,
InvalidCodepoint,
InvalidCodepointContext,
alabel,
check_bidi,
check_hyphen_ok,
Reported by Pylint.
Line: 2
Column: 1
from .package_data import __version__
from .core import (
IDNABidiError,
IDNAError,
InvalidCodepoint,
InvalidCodepointContext,
alabel,
check_bidi,
check_hyphen_ok,
Reported by Pylint.
Line: 22
Column: 1
valid_label_length,
valid_string_length,
)
from .intranges import intranges_contain
__all__ = [
"IDNABidiError",
"IDNAError",
"InvalidCodepoint",
Reported by Pylint.
Line: 1
Column: 1
from .package_data import __version__
from .core import (
IDNABidiError,
IDNAError,
InvalidCodepoint,
InvalidCodepointContext,
alabel,
check_bidi,
check_hyphen_ok,
Reported by Pylint.
pipenv/vendor/dparse/__init__.py
4 issues
Line: 9
Column: 1
__email__ = 'support@pyup.io'
__version__ = '0.5.1'
from .parser import parse # noqa
Reported by Pylint.
Line: 3
Column: 1
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
"""Top-level package for Dependency Parser."""
__author__ = """Jannis Gebauer"""
__email__ = 'support@pyup.io'
__version__ = '0.5.1'
from .parser import parse # noqa
Reported by Pylint.
Line: 1
Column: 1
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
"""Top-level package for Dependency Parser."""
__author__ = """Jannis Gebauer"""
__email__ = 'support@pyup.io'
__version__ = '0.5.1'
from .parser import parse # noqa
Reported by Pylint.
Line: 9
Column: 1
__email__ = 'support@pyup.io'
__version__ = '0.5.1'
from .parser import parse # noqa
Reported by Pylint.
pipenv/patched/notpip/_vendor/pep517/dirtools.py
4 issues
Line: 1
Column: 1
import os
import io
import contextlib
import tempfile
import shutil
import errno
import zipfile
Reported by Pylint.
Line: 13
Column: 5
@contextlib.contextmanager
def tempdir():
"""Create a temporary directory in a context manager."""
td = tempfile.mkdtemp()
try:
yield td
finally:
shutil.rmtree(td)
Reported by Pylint.
Line: 20
Column: 1
shutil.rmtree(td)
def mkdir_p(*args, **kwargs):
"""Like `mkdir`, but does not raise an exception if the
directory already exists.
"""
try:
return os.mkdir(*args, **kwargs)
Reported by Pylint.
Line: 35
Column: 9
"""Construct an in-memory zip file for a directory."""
buffer = io.BytesIO()
zip_file = zipfile.ZipFile(buffer, 'w')
for root, dirs, files in os.walk(root):
for path in dirs:
fs_path = os.path.join(root, path)
rel_path = os.path.relpath(fs_path, root)
zip_file.writestr(rel_path + '/', '')
for path in files:
Reported by Pylint.