The following issues were found
pipenv/patched/notpip/_vendor/progress/spinner.py
13 issues
Line: 18
Column: 1
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from __future__ import unicode_literals
from . import Infinite
class Spinner(Infinite):
phases = ('-', '\\', '|', '/')
hide_cursor = True
Reported by Pylint.
Line: 1
Column: 1
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
Reported by Pylint.
Line: 21
Column: 1
from . import Infinite
class Spinner(Infinite):
phases = ('-', '\\', '|', '/')
hide_cursor = True
def update(self):
i = self.index % len(self.phases)
Reported by Pylint.
Line: 21
Column: 1
from . import Infinite
class Spinner(Infinite):
phases = ('-', '\\', '|', '/')
hide_cursor = True
def update(self):
i = self.index % len(self.phases)
Reported by Pylint.
Line: 25
Column: 5
phases = ('-', '\\', '|', '/')
hide_cursor = True
def update(self):
i = self.index % len(self.phases)
self.write(self.phases[i])
class PieSpinner(Spinner):
Reported by Pylint.
Line: 30
Column: 1
self.write(self.phases[i])
class PieSpinner(Spinner):
phases = ['◷', '◶', '◵', '◴']
class MoonSpinner(Spinner):
phases = ['◑', '◒', '◐', '◓']
Reported by Pylint.
Line: 30
Column: 1
self.write(self.phases[i])
class PieSpinner(Spinner):
phases = ['◷', '◶', '◵', '◴']
class MoonSpinner(Spinner):
phases = ['◑', '◒', '◐', '◓']
Reported by Pylint.
Line: 34
Column: 1
phases = ['◷', '◶', '◵', '◴']
class MoonSpinner(Spinner):
phases = ['◑', '◒', '◐', '◓']
class LineSpinner(Spinner):
phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
Reported by Pylint.
Line: 34
Column: 1
phases = ['◷', '◶', '◵', '◴']
class MoonSpinner(Spinner):
phases = ['◑', '◒', '◐', '◓']
class LineSpinner(Spinner):
phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
Reported by Pylint.
Line: 38
Column: 1
phases = ['◑', '◒', '◐', '◓']
class LineSpinner(Spinner):
phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
class PixelSpinner(Spinner):
phases = ['⣾', '⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽']
Reported by Pylint.
pipenv/patched/notpip/_vendor/progress/counter.py
13 issues
Line: 18
Column: 1
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from __future__ import unicode_literals
from . import Infinite, Progress
class Counter(Infinite):
def update(self):
self.write(str(self.index))
Reported by Pylint.
Line: 1
Column: 1
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
Reported by Pylint.
Line: 21
Column: 1
from . import Infinite, Progress
class Counter(Infinite):
def update(self):
self.write(str(self.index))
class Countdown(Progress):
Reported by Pylint.
Line: 21
Column: 1
from . import Infinite, Progress
class Counter(Infinite):
def update(self):
self.write(str(self.index))
class Countdown(Progress):
Reported by Pylint.
Line: 22
Column: 5
class Counter(Infinite):
def update(self):
self.write(str(self.index))
class Countdown(Progress):
def update(self):
Reported by Pylint.
Line: 26
Column: 1
self.write(str(self.index))
class Countdown(Progress):
def update(self):
self.write(str(self.remaining))
class Stack(Progress):
Reported by Pylint.
Line: 26
Column: 1
self.write(str(self.index))
class Countdown(Progress):
def update(self):
self.write(str(self.remaining))
class Stack(Progress):
Reported by Pylint.
Line: 27
Column: 5
class Countdown(Progress):
def update(self):
self.write(str(self.remaining))
class Stack(Progress):
phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')
Reported by Pylint.
Line: 31
Column: 1
self.write(str(self.remaining))
class Stack(Progress):
phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')
def update(self):
nphases = len(self.phases)
i = min(nphases - 1, int(self.progress * nphases))
Reported by Pylint.
Line: 31
Column: 1
self.write(str(self.remaining))
class Stack(Progress):
phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')
def update(self):
nphases = len(self.phases)
i = min(nphases - 1, int(self.progress * nphases))
Reported by Pylint.
pipenv/vendor/chardet/mbcsgroupprober.py
13 issues
Line: 30
Column: 1
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
Reported by Pylint.
Line: 31
Column: 1
######################### END LICENSE BLOCK #########################
from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
Reported by Pylint.
Line: 32
Column: 1
from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
Reported by Pylint.
Line: 33
Column: 1
from .charsetgroupprober import CharSetGroupProber
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
Reported by Pylint.
Line: 34
Column: 1
from .utf8prober import UTF8Prober
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
Reported by Pylint.
Line: 35
Column: 1
from .sjisprober import SJISProber
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
Reported by Pylint.
Line: 36
Column: 1
from .eucjpprober import EUCJPProber
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
class MBCSGroupProber(CharSetGroupProber):
Reported by Pylint.
Line: 37
Column: 1
from .gb2312prober import GB2312Prober
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
class MBCSGroupProber(CharSetGroupProber):
def __init__(self, lang_filter=None):
Reported by Pylint.
Line: 38
Column: 1
from .euckrprober import EUCKRProber
from .cp949prober import CP949Prober
from .big5prober import Big5Prober
from .euctwprober import EUCTWProber
class MBCSGroupProber(CharSetGroupProber):
def __init__(self, lang_filter=None):
super(MBCSGroupProber, self).__init__(lang_filter=lang_filter)
Reported by Pylint.
Line: 1
Column: 1
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
Reported by Pylint.
pipenv/vendor/click/formatting.py
12 issues
Line: 5
Column: 1
from contextlib import contextmanager
from gettext import gettext as _
from ._compat import term_len
from .parser import split_opt
# Can force a width. This is used by the test system
FORCED_WIDTH: t.Optional[int] = None
Reported by Pylint.
Line: 6
Column: 1
from gettext import gettext as _
from ._compat import term_len
from .parser import split_opt
# Can force a width. This is used by the test system
FORCED_WIDTH: t.Optional[int] = None
Reported by Pylint.
Line: 54
Column: 5
:param preserve_paragraphs: if this flag is set then the wrapping will
intelligently handle paragraphs.
"""
from ._textwrap import TextWrapper
text = text.expandtabs()
wrapper = TextWrapper(
width,
initial_indent=initial_indent,
Reported by Pylint.
Line: 1
Column: 1
import typing as t
from contextlib import contextmanager
from gettext import gettext as _
from ._compat import term_len
from .parser import split_opt
# Can force a width. This is used by the test system
FORCED_WIDTH: t.Optional[int] = None
Reported by Pylint.
Line: 12
Column: 1
FORCED_WIDTH: t.Optional[int] = None
def measure_table(rows: t.Iterable[t.Tuple[str, str]]) -> t.Tuple[int, ...]:
widths: t.Dict[int, int] = {}
for row in rows:
for idx, col in enumerate(row):
widths[idx] = max(widths.get(idx, 0), term_len(col))
Reported by Pylint.
Line: 22
Column: 1
return tuple(y for x, y in sorted(widths.items()))
def iter_rows(
rows: t.Iterable[t.Tuple[str, str]], col_count: int
) -> t.Iterator[t.Tuple[str, ...]]:
for row in rows:
yield row + ("",) * (col_count - len(row))
Reported by Pylint.
Line: 54
Column: 5
:param preserve_paragraphs: if this flag is set then the wrapping will
intelligently handle paragraphs.
"""
from ._textwrap import TextWrapper
text = text.expandtabs()
wrapper = TextWrapper(
width,
initial_indent=initial_indent,
Reported by Pylint.
Line: 66
Column: 5
if not preserve_paragraphs:
return wrapper.fill(text)
p: t.List[t.Tuple[int, bool, str]] = []
buf: t.List[str] = []
indent = None
def _flush_par() -> None:
if not buf:
Reported by Pylint.
Line: 91
Column: 5
buf.append(line)
_flush_par()
rv = []
for indent, raw, text in p:
with wrapper.extra_indent(" " * indent):
if raw:
rv.append(wrapper.indent_only(text))
else:
Reported by Pylint.
Line: 92
Column: 22
_flush_par()
rv = []
for indent, raw, text in p:
with wrapper.extra_indent(" " * indent):
if raw:
rv.append(wrapper.indent_only(text))
else:
rv.append(wrapper.fill(text))
Reported by Pylint.
pipenv/vendor/packaging/requirements.py
12 issues
Line: 23
Column: 1
stringStart,
)
from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet
class InvalidRequirement(ValueError):
"""
Reported by Pylint.
Line: 24
Column: 1
)
from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet
class InvalidRequirement(ValueError):
"""
An invalid requirement was found, users should refer to PEP 508.
Reported by Pylint.
Line: 56
Column: 24
EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")
VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
Reported by Pylint.
Line: 57
Column: 24
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")
VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
Reported by Pylint.
Line: 64
Column: 46
VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
_VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")
VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
Reported by Pylint.
Line: 71
Column: 50
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR
VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
Reported by Pylint.
Line: 71
Column: 30
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR
VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
Reported by Pylint.
Line: 95
Column: 3
string.
"""
# TODO: Can we test whether something is contained within a requirement?
# If so how do we do that? Do we need to test against the _name_ of
# the thing as well as the version? What about the markers?
# TODO: Can we normalize the name and extra name?
def __init__(self, requirement_string: str) -> None:
Reported by Pylint.
Line: 98
Column: 3
# TODO: Can we test whether something is contained within a requirement?
# If so how do we do that? Do we need to test against the _name_ of
# the thing as well as the version? What about the markers?
# TODO: Can we normalize the name and extra name?
def __init__(self, requirement_string: str) -> None:
try:
req = REQUIREMENT.parseString(requirement_string)
except ParseException as e:
Reported by Pylint.
Line: 104
Column: 13
try:
req = REQUIREMENT.parseString(requirement_string)
except ParseException as e:
raise InvalidRequirement(
f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
)
self.name: str = req.name
if req.url:
Reported by Pylint.
pipenv/vendor/chardet/latin1prober.py
12 issues
Line: 29
Column: 1
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .enums import ProbingState
FREQ_CAT_NUM = 4
UDF = 0 # undefined
Reported by Pylint.
Line: 30
Column: 1
######################### END LICENSE BLOCK #########################
from .charsetprober import CharSetProber
from .enums import ProbingState
FREQ_CAT_NUM = 4
UDF = 0 # undefined
OTH = 1 # other
Reported by Pylint.
Line: 123
Column: 17
freq = Latin1ClassModel[(self._last_char_class * CLASS_NUM)
+ char_class]
if freq == 0:
self._state = ProbingState.NOT_ME
break
self._freq_counter[freq] += 1
self._last_char_class = char_class
return self.state
Reported by Pylint.
Line: 1
Column: 1
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
Reported by Pylint.
Line: 96
Column: 1
)
class Latin1Prober(CharSetProber):
def __init__(self):
super(Latin1Prober, self).__init__()
self._last_char_class = None
self._freq_counter = None
self.reset()
Reported by Pylint.
Line: 98
Column: 9
class Latin1Prober(CharSetProber):
def __init__(self):
super(Latin1Prober, self).__init__()
self._last_char_class = None
self._freq_counter = None
self.reset()
def reset(self):
Reported by Pylint.
Line: 103
Column: 5
self._freq_counter = None
self.reset()
def reset(self):
self._last_char_class = OTH
self._freq_counter = [0] * FREQ_CAT_NUM
CharSetProber.reset(self)
@property
Reported by Pylint.
Line: 109
Column: 5
CharSetProber.reset(self)
@property
def charset_name(self):
return "ISO-8859-1"
@property
def language(self):
return ""
Reported by Pylint.
Line: 113
Column: 5
return "ISO-8859-1"
@property
def language(self):
return ""
def feed(self, byte_str):
byte_str = self.filter_with_english_letters(byte_str)
for c in byte_str:
Reported by Pylint.
Line: 116
Column: 5
def language(self):
return ""
def feed(self, byte_str):
byte_str = self.filter_with_english_letters(byte_str)
for c in byte_str:
char_class = Latin1_CharToClass[c]
freq = Latin1ClassModel[(self._last_char_class * CLASS_NUM)
+ char_class]
Reported by Pylint.
pipenv/vendor/pythonfinder/cli.py
12 issues
Line: 6
Column: 1
import click
from . import __version__
from .pythonfinder import Finder
@click.command()
@click.option("--find", default=False, nargs=1, help="Find a specific python version.")
Reported by Pylint.
Line: 7
Column: 1
import click
from . import __version__
from .pythonfinder import Finder
@click.command()
@click.option("--find", default=False, nargs=1, help="Find a specific python version.")
@click.option("--which", default=False, nargs=1, help="Run the which command.")
Reported by Pylint.
Line: 98
Column: 5
if __name__ == "__main__":
cli()
Reported by Pylint.
Line: 71
Column: 13
comes_from_path = getattr(comes_from, "path", found.path)
else:
comes_from_path = found.path
arch = getattr(py, "architecture", None)
click.secho("Found python at the following locations:", fg="green")
click.secho(
"{py.name!s}: {py.version!s} ({py.architecture!s}) @ {comes_from!s}".format(
py=py, comes_from=comes_from_path
),
Reported by Pylint.
Line: 1
Column: 1
# -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import click
from . import __version__
from .pythonfinder import Finder
Reported by Pylint.
Line: 24
Column: 1
envvar="PYTHONFINDER_IGNORE_UNSUPPORTED",
help="Ignore unsupported python versions.",
)
@click.version_option(prog_name="pyfinder", version=__version__)
@click.pass_context
def cli(
ctx, find=False, which=False, findall=False, version=False, ignore_unsupported=True
):
if version:
Reported by Pylint.
Line: 24
Column: 1
envvar="PYTHONFINDER_IGNORE_UNSUPPORTED",
help="Ignore unsupported python versions.",
)
@click.version_option(prog_name="pyfinder", version=__version__)
@click.pass_context
def cli(
ctx, find=False, which=False, findall=False, version=False, ignore_unsupported=True
):
if version:
Reported by Pylint.
Line: 24
Column: 1
envvar="PYTHONFINDER_IGNORE_UNSUPPORTED",
help="Ignore unsupported python versions.",
)
@click.version_option(prog_name="pyfinder", version=__version__)
@click.pass_context
def cli(
ctx, find=False, which=False, findall=False, version=False, ignore_unsupported=True
):
if version:
Reported by Pylint.
Line: 39
Column: 1
ctx.exit()
finder = Finder(ignore_unsupported=ignore_unsupported)
if findall:
versions = [v for v in finder.find_all_python_versions()]
if versions:
click.secho("Found python at the following locations:", fg="green")
for v in versions:
py = v.py_version
comes_from = getattr(py, "comes_from", None)
Reported by Pylint.
Line: 42
Column: 17
versions = [v for v in finder.find_all_python_versions()]
if versions:
click.secho("Found python at the following locations:", fg="green")
for v in versions:
py = v.py_version
comes_from = getattr(py, "comes_from", None)
if comes_from is not None:
comes_from_path = getattr(comes_from, "path", v.path)
else:
Reported by Pylint.
pipenv/vendor/click/exceptions.py
12 issues
Line: 6
Column: 1
from gettext import gettext as _
from gettext import ngettext
from ._compat import get_text_stderr
from .utils import echo
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
Reported by Pylint.
Line: 7
Column: 1
from gettext import ngettext
from ._compat import get_text_stderr
from .utils import echo
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
Reported by Pylint.
Line: 10
Column: 5
from .utils import echo
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
def _join_param_hints(
param_hint: t.Optional[t.Union[t.Sequence[str], str]]
Reported by Pylint.
Line: 11
Column: 5
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
def _join_param_hints(
param_hint: t.Optional[t.Union[t.Sequence[str], str]]
) -> t.Optional[str]:
Reported by Pylint.
Line: 10
Column: 5
from .utils import echo
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
def _join_param_hints(
param_hint: t.Optional[t.Union[t.Sequence[str], str]]
Reported by Pylint.
Line: 11
Column: 5
if t.TYPE_CHECKING:
from .core import Context
from .core import Parameter
def _join_param_hints(
param_hint: t.Optional[t.Union[t.Sequence[str], str]]
) -> t.Optional[str]:
Reported by Pylint.
Line: 286
Column: 5
__slots__ = ("exit_code",)
def __init__(self, code: int = 0) -> None:
self.exit_code = code
Reported by Pylint.
Line: 1
Column: 1
import os
import typing as t
from gettext import gettext as _
from gettext import ngettext
from ._compat import get_text_stderr
from .utils import echo
if t.TYPE_CHECKING:
Reported by Pylint.
Line: 33
Column: 5
super().__init__(message)
self.message = message
def format_message(self) -> str:
return self.message
def __str__(self) -> str:
return self.message
Reported by Pylint.
Line: 39
Column: 5
def __str__(self) -> str:
return self.message
def show(self, file: t.Optional[t.IO] = None) -> None:
if file is None:
file = get_text_stderr()
echo(_("Error: {message}").format(message=self.format_message()), file=file)
Reported by Pylint.
pipenv/vendor/chardet/enums.py
12 issues
Line: 8
Column: 1
"""
class InputState(object):
"""
This enum represents the different states a universal detector can be in.
"""
PURE_ASCII = 0
ESC_ASCII = 1
Reported by Pylint.
Line: 8
Column: 1
"""
class InputState(object):
"""
This enum represents the different states a universal detector can be in.
"""
PURE_ASCII = 0
ESC_ASCII = 1
Reported by Pylint.
Line: 17
Column: 1
HIGH_BYTE = 2
class LanguageFilter(object):
"""
This enum represents the different language filters we can apply to a
``UniversalDetector``.
"""
CHINESE_SIMPLIFIED = 0x01
Reported by Pylint.
Line: 17
Column: 1
HIGH_BYTE = 2
class LanguageFilter(object):
"""
This enum represents the different language filters we can apply to a
``UniversalDetector``.
"""
CHINESE_SIMPLIFIED = 0x01
Reported by Pylint.
Line: 32
Column: 1
CJK = CHINESE | JAPANESE | KOREAN
class ProbingState(object):
"""
This enum represents the different states a prober can be in.
"""
DETECTING = 0
FOUND_IT = 1
Reported by Pylint.
Line: 32
Column: 1
CJK = CHINESE | JAPANESE | KOREAN
class ProbingState(object):
"""
This enum represents the different states a prober can be in.
"""
DETECTING = 0
FOUND_IT = 1
Reported by Pylint.
Line: 41
Column: 1
NOT_ME = 2
class MachineState(object):
"""
This enum represents the different states a state machine can be in.
"""
START = 0
ERROR = 1
Reported by Pylint.
Line: 41
Column: 1
NOT_ME = 2
class MachineState(object):
"""
This enum represents the different states a state machine can be in.
"""
START = 0
ERROR = 1
Reported by Pylint.
Line: 50
Column: 1
ITS_ME = 2
class SequenceLikelihood(object):
"""
This enum represents the likelihood of a character following the previous one.
"""
NEGATIVE = 0
UNLIKELY = 1
Reported by Pylint.
Line: 50
Column: 1
ITS_ME = 2
class SequenceLikelihood(object):
"""
This enum represents the likelihood of a character following the previous one.
"""
NEGATIVE = 0
UNLIKELY = 1
Reported by Pylint.
pipenv/patched/notpip/_internal/locations.py
12 issues
Line: 48
Column: 3
if running_under_virtualenv():
src_prefix = os.path.join(sys.prefix, 'src')
else:
# FIXME: keep src in cwd for now (it is not a temporary folder)
try:
src_prefix = os.path.join(os.getcwd(), 'src')
except OSError:
# In case the current working directory has been renamed or deleted
sys.exit(
Reported by Pylint.
Line: 62
Column: 3
return os.path.abspath(src_prefix)
# FIXME doesn't account for venv linked to global site-packages
site_packages = sysconfig.get_path("purelib") # type: Optional[str]
# This is because of a bug in PyPy's sysconfig module, see
# https://bitbucket.org/pypy/pypy/issues/2506/sysconfig-returns-incorrect-paths
Reported by Pylint.
Line: 27
Column: 5
if MYPY_CHECK_RUNNING:
from typing import Dict, List, Optional, Union
from distutils.cmd import Command as DistutilsCommand
# Application Directories
USER_CACHE_DIR = appdirs.user_cache_dir("pip")
Reported by Pylint.
Line: 43
Column: 1
return '{}.{}'.format(*sys.version_info)
def get_src_prefix():
# type: () -> str
if running_under_virtualenv():
src_prefix = os.path.join(sys.prefix, 'src')
else:
# FIXME: keep src in cwd for now (it is not a temporary folder)
Reported by Pylint.
Line: 92
Column: 9
# Forcing to use /usr/local/bin for standard macOS framework installs
# Also log to ~/Library/Logs/ for use with the Console.app log viewer
if sys.platform[:6] == 'darwin' and sys.prefix[:16] == '/System/Library/':
bin_py = '/usr/local/bin'
def distutils_scheme(
dist_name, user=False, home=None, root=None, isolated=False, prefix=None
):
Reported by Pylint.
Line: 95
Column: 1
bin_py = '/usr/local/bin'
def distutils_scheme(
dist_name, user=False, home=None, root=None, isolated=False, prefix=None
):
# type:(str, bool, str, str, bool, str) -> Dict[str, str]
"""
Return a distutils install scheme
Reported by Pylint.
Line: 102
Column: 5
"""
Return a distutils install scheme
"""
from distutils.dist import Distribution
dist_args = {'name': dist_name} # type: Dict[str, Union[str, List[str]]]
if isolated:
dist_args["script_args"] = ["--no-user-cfg"]
Reported by Pylint.
Line: 108
Column: 5
if isolated:
dist_args["script_args"] = ["--no-user-cfg"]
d = Distribution(dist_args)
d.parse_config_files()
obj = None # type: Optional[DistutilsCommand]
obj = d.get_command_obj('install', create=True)
assert obj is not None
i = cast(distutils_install_command, obj)
Reported by Pylint.
Line: 112
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
d.parse_config_files()
obj = None # type: Optional[DistutilsCommand]
obj = d.get_command_obj('install', create=True)
assert obj is not None
i = cast(distutils_install_command, obj)
# NOTE: setting user or home has the side-effect of creating the home dir
# or user base for installations during finalize_options()
# ideally, we'd prefer a scheme class that has no side-effects.
assert not (user and prefix), "user={} prefix={}".format(user, prefix)
Reported by Bandit.
Line: 117
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
# NOTE: setting user or home has the side-effect of creating the home dir
# or user base for installations during finalize_options()
# ideally, we'd prefer a scheme class that has no side-effects.
assert not (user and prefix), "user={} prefix={}".format(user, prefix)
assert not (home and prefix), "home={} prefix={}".format(home, prefix)
i.user = user or i.user
if user or home:
i.prefix = ""
i.prefix = prefix or i.prefix
Reported by Bandit.