The following issues were found
pipenv/vendor/chardet/cli/chardetect.py
3 issues
Line: 35
Column: 5
:param name: Name of file or collection of lines
:type name: str
"""
u = UniversalDetector()
for line in lines:
line = bytearray(line)
u.feed(line)
# shortcut out of the loop to save reading further - particularly useful if we read a BOM.
if u.done:
Reported by Pylint.
Line: 46
Column: 5
result = u.result
if PY2:
name = name.decode(sys.getfilesystemencoding(), 'ignore')
if result['encoding']:
return '{}: {} with confidence {}'.format(name, result['encoding'],
result['confidence'])
else:
return '{}: no result'.format(name)
Reported by Pylint.
Line: 74
Column: 9
version='%(prog)s {}'.format(__version__))
args = parser.parse_args(argv)
for f in args.input:
if f.isatty():
print("You are running chardetect interactively. Press " +
"CTRL-D twice at the start of a blank line to signal the " +
"end of your input. If you want help, run chardetect " +
"--help\n", file=sys.stderr)
Reported by Pylint.
pipenv/vendor/wheel/cli/unpack.py
3 issues
Line: 6
Column: 1
import os.path
import sys
from ..wheelfile import WheelFile
def unpack(path, dest='.'):
"""Unpack a wheel.
Reported by Pylint.
Line: 1
Column: 1
from __future__ import print_function
import os.path
import sys
from ..wheelfile import WheelFile
def unpack(path, dest='.'):
Reported by Pylint.
Line: 18
Column: 29
:param path: The path to the wheel.
:param dest: Destination directory (default to current directory).
"""
with WheelFile(path) as wf:
namever = wf.parsed_filename.group('namever')
destination = os.path.join(dest, namever)
print("Unpacking to: {}...".format(destination), end='')
sys.stdout.flush()
wf.extractall(destination)
Reported by Pylint.
pipenv/patched/notpip/_vendor/html5lib/filters/base.py
3 issues
Line: 1
Column: 1
from __future__ import absolute_import, division, unicode_literals
class Filter(object):
def __init__(self, source):
self.source = source
def __iter__(self):
return iter(self.source)
Reported by Pylint.
Line: 4
Column: 1
from __future__ import absolute_import, division, unicode_literals
class Filter(object):
def __init__(self, source):
self.source = source
def __iter__(self):
return iter(self.source)
Reported by Pylint.
Line: 4
Column: 1
from __future__ import absolute_import, division, unicode_literals
class Filter(object):
def __init__(self, source):
self.source = source
def __iter__(self):
return iter(self.source)
Reported by Pylint.
pipenv/vendor/tomlkit/toml_document.py
3 issues
Line: 1
Column: 1
from .container import Container
class TOMLDocument(Container):
"""
A TOML document.
"""
Reported by Pylint.
Line: 1
Column: 1
from .container import Container
class TOMLDocument(Container):
"""
A TOML document.
"""
Reported by Pylint.
Line: 4
Column: 1
from .container import Container
class TOMLDocument(Container):
"""
A TOML document.
"""
Reported by Pylint.
pipenv/vendor/wheel/metadata.py
3 issues
Line: 10
Column: 1
import pkg_resources
from .pkginfo import read_pkg_info
def requires_to_requires_dist(requirement):
"""Return the version specifier for a requirement in PEP 345/566 fashion."""
if getattr(requirement, 'url', None):
Reported by Pylint.
Line: 19
Column: 9
return " @ " + requirement.url
requires_dist = []
for op, ver in requirement.specs:
requires_dist.append(op + ver)
if not requires_dist:
return ''
return " (%s)" % ','.join(sorted(requires_dist))
Reported by Pylint.
Line: 34
Column: 1
extras = ",".join(sorted(parsed_requirement.extras))
if extras:
extras = "[%s]" % extras
yield (parsed_requirement.project_name + extras + spec)
def generate_requirements(extras_require):
"""
Convert requirements from a setup()-style dictionary to ('Requires-Dist', 'requirement')
Reported by Pylint.
pipenv/vendor/cerberus/__init__.py
3 issues
Line: 15
Column: 1
from pkg_resources import get_distribution, DistributionNotFound
from cerberus.validator import DocumentError, Validator
from cerberus.schema import rules_set_registry, schema_registry, SchemaError
from cerberus.utils import TypeDefinition
try:
Reported by Pylint.
Line: 16
Column: 1
from pkg_resources import get_distribution, DistributionNotFound
from cerberus.validator import DocumentError, Validator
from cerberus.schema import rules_set_registry, schema_registry, SchemaError
from cerberus.utils import TypeDefinition
try:
__version__ = get_distribution("Cerberus").version
Reported by Pylint.
Line: 17
Column: 1
from cerberus.validator import DocumentError, Validator
from cerberus.schema import rules_set_registry, schema_registry, SchemaError
from cerberus.utils import TypeDefinition
try:
__version__ = get_distribution("Cerberus").version
except DistributionNotFound:
Reported by Pylint.
pipenv/patched/notpip/_internal/utils/inject_securetransport.py
3 issues
Line: 13
Column: 1
import sys
def inject_securetransport():
# type: () -> None
# Only relevant on macOS
if sys.platform != "darwin":
return
Reported by Pylint.
Line: 20
Column: 9
return
try:
import ssl
except ImportError:
return
# Checks for OpenSSL 1.0.1
if ssl.OPENSSL_VERSION_NUMBER >= 0x1000100f:
Reported by Pylint.
Line: 29
Column: 9
return
try:
from pipenv.patched.notpip._vendor.urllib3.contrib import securetransport
except (ImportError, OSError):
return
securetransport.inject_into_urllib3()
Reported by Pylint.
pipenv/patched/notpip/_internal/utils/glibc.py
3 issues
Line: 1
Column: 1
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
from __future__ import absolute_import
import os
import sys
from pipenv.patched.notpip._internal.utils.typing import MYPY_CHECK_RUNNING
Reported by Pylint.
Line: 44
Column: 9
"Fallback implementation of glibc_version_string using ctypes."
try:
import ctypes
except ImportError:
return None
# ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
# manpage says, "If filename is NULL, then the returned handle is for the
Reported by Pylint.
Line: 95
Column: 5
in case the lookup fails.
"""
glibc_version = glibc_version_string()
if glibc_version is None:
return ("", "")
else:
return ("glibc", glibc_version)
Reported by Pylint.
pipenv/vendor/wheel/__main__.py
3 issues
Line: 8
Column: 1
import sys
def main(): # needed for console script
if __package__ == '':
# To be able to run 'python wheel-0.9.whl/wheel':
import os.path
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
Reported by Pylint.
Line: 11
Column: 9
def main(): # needed for console script
if __package__ == '':
# To be able to run 'python wheel-0.9.whl/wheel':
import os.path
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
import wheel.cli
sys.exit(wheel.cli.main())
Reported by Pylint.
Line: 14
Column: 5
import os.path
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
import wheel.cli
sys.exit(wheel.cli.main())
if __name__ == "__main__":
sys.exit(main())
Reported by Pylint.
pipenv/vendor/requests/structures.py
3 issues
Line: 12
Column: 1
from collections import OrderedDict
from .compat import Mapping, MutableMapping
class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.
Reported by Pylint.
Line: 82
Column: 5
return dict(self.lower_items()) == dict(other.lower_items())
# Copy is required
def copy(self):
return CaseInsensitiveDict(self._store.values())
def __repr__(self):
return str(dict(self.items()))
Reported by Pylint.
Line: 94
Column: 9
def __init__(self, name=None):
self.name = name
super(LookupDict, self).__init__()
def __repr__(self):
return '<lookup \'%s\'>' % (self.name)
def __getitem__(self, key):
Reported by Pylint.