id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15,000 | pypa/pipenv | pypa_pipenv/pipenv/vendor/click/utils.py | pipenv.vendor.click.utils.LazyFile | from types import TracebackType
from ._compat import open_stream
import os
import typing as t
class LazyFile:
"""A lazy file works like a regular file but it does not fully open
the file but it does perform some basic checks early to see if the
filename parameter does make sense. This is useful for safely... |
class LazyFile:
'''A lazy file works like a regular file but it does not fully open
the file but it does perform some basic checks early to see if the
filename parameter does make sense. This is useful for safely opening
files for writing.
'''
def __init__(self, filename: t.Union[str, 'os.Pat... | 10 | 4 | 8 | 0 | 6 | 1 | 2 | 0.31 | 0 | 7 | 1 | 0 | 9 | 7 | 9 | 9 | 86 | 11 | 59 | 31 | 36 | 18 | 44 | 18 | 33 | 3 | 0 | 2 | 16 |
15,001 | pypa/pipenv | pypa_pipenv/pipenv/vendor/click/utils.py | pipenv.vendor.click.utils.PacifyFlushWrapper | import typing as t
class PacifyFlushWrapper:
"""This wrapper is used to catch and suppress BrokenPipeErrors resulting
from ``.flush()`` being called on broken pipe during the shutdown/final-GC
of the Python interpreter. Notably ``.flush()`` is always called on
``sys.stdout`` and ``sys.stderr``. So as t... |
class PacifyFlushWrapper:
'''This wrapper is used to catch and suppress BrokenPipeErrors resulting
from ``.flush()`` being called on broken pipe during the shutdown/final-GC
of the Python interpreter. Notably ``.flush()`` is always called on
``sys.stdout`` and ``sys.stderr``. So as to have minimal impa... | 4 | 1 | 4 | 0 | 4 | 0 | 2 | 0.58 | 0 | 4 | 0 | 0 | 3 | 1 | 3 | 3 | 23 | 4 | 12 | 7 | 7 | 7 | 12 | 6 | 7 | 3 | 0 | 2 | 5 |
15,002 | pypa/pipenv | pypa_pipenv/pipenv/vendor/click_didyoumean/__init__.py | pipenv.vendor.click_didyoumean.DYMCommandCollection | import pipenv.vendor.click as click
class DYMCommandCollection(DYMMixin, click.CommandCollection):
"""
click CommandCollection to provide git-like
*did-you-mean* functionality when a certain
command is not found in the group.
""" |
class DYMCommandCollection(DYMMixin, click.CommandCollection):
'''
click CommandCollection to provide git-like
*did-you-mean* functionality when a certain
command is not found in the group.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 6 | 0 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
15,003 | pypa/pipenv | pypa_pipenv/pipenv/vendor/click_didyoumean/__init__.py | pipenv.vendor.click_didyoumean.DYMGroup | import pipenv.vendor.click as click
class DYMGroup(DYMMixin, click.Group):
"""
click Group to provide git-like
*did-you-mean* functionality when a certain
command is not found in the group.
""" |
class DYMGroup(DYMMixin, click.Group):
'''
click Group to provide git-like
*did-you-mean* functionality when a certain
command is not found in the group.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 6 | 0 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
15,004 | pypa/pipenv | pypa_pipenv/pipenv/vendor/click_didyoumean/__init__.py | pipenv.vendor.click_didyoumean.DYMMixin | import difflib
import typing
import pipenv.vendor.click as click
class DYMMixin:
"""
Mixin class for click MultiCommand inherited classes
to provide git-like *did-you-mean* functionality when
a certain command is not registered.
"""
def __init__(self, *args: typing.Any, **kwargs: typing.Any) -... |
class DYMMixin:
'''
Mixin class for click MultiCommand inherited classes
to provide git-like *did-you-mean* functionality when
a certain command is not registered.
'''
def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
pass
def resolve_command(self, ctx: click.Co... | 3 | 2 | 16 | 1 | 13 | 4 | 2 | 0.5 | 0 | 3 | 0 | 3 | 2 | 2 | 2 | 2 | 39 | 3 | 26 | 14 | 19 | 13 | 17 | 9 | 14 | 3 | 0 | 2 | 4 |
15,005 | pypa/pipenv | pypa_pipenv/pipenv/vendor/colorama/ansitowin32.py | pipenv.vendor.colorama.ansitowin32.AnsiToWin32 | import os
import re
import sys
from .win32 import windll, winapi_test
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL
from .winterm import enable_vt_processing, WinTerm, WinColor, WinStyle
class AnsiToWin32(object):
"""
Implements a 'write()' method which, on Windows, will strip ANSI character
... |
class AnsiToWin32(object):
'''
Implements a 'write()' method which, on Windows, will strip ANSI character
sequences from the text, and if outputting to a tty, will convert them into
win32 function calls.
'''
def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
pass
... | 13 | 3 | 15 | 1 | 12 | 3 | 3 | 0.26 | 1 | 10 | 6 | 0 | 12 | 7 | 12 | 12 | 206 | 28 | 144 | 44 | 131 | 38 | 97 | 44 | 84 | 8 | 1 | 4 | 40 |
15,006 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/ipython.py | pipenv.vendor.dotenv.ipython.IPythonDotEnv | from IPython.core.magic import Magics, line_magic, magics_class
from .main import find_dotenv, load_dotenv
from IPython.core.magic_arguments import argument, magic_arguments, parse_argstring
@magics_class
class IPythonDotEnv(Magics):
@magic_arguments()
@argument('-o', '--override', action='store_true', help='... | @magics_class
class IPythonDotEnv(Magics):
@magic_arguments()
@argument('-o', '--override', action='store_true', help='Indicate to override existing variables')
@argument('-v', '--verbose', action='store_true', help='Indicate function calls to be verbose')
@argument('dotenv_path', nargs='?', type=str, ... | 8 | 0 | 12 | 1 | 9 | 2 | 2 | 0.09 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 68 | 26 | 2 | 22 | 5 | 8 | 2 | 10 | 4 | 8 | 2 | 7 | 1 | 2 |
15,007 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/main.py | pipenv.vendor.dotenv.main.DotEnv | from .parser import Binding, parse_stream
import io
from typing import IO, Dict, Iterable, Iterator, Mapping, Optional, Tuple, Union
from collections import OrderedDict
from contextlib import contextmanager
import os
class DotEnv:
def __init__(self, dotenv_path: Optional[StrPath], stream: Optional[IO[str]]=None, ... |
class DotEnv:
def __init__(self, dotenv_path: Optional[StrPath], stream: Optional[IO[str]]=None, verbose: bool=False, encoding: Optional[str]=None, interpolate: bool=True, override: bool=True) -> None:
pass
@contextmanager
def _get_stream(self) -> Iterator[IO[str]]:
pass
def dict(self... | 8 | 3 | 12 | 1 | 10 | 1 | 3 | 0.1 | 0 | 4 | 0 | 0 | 6 | 7 | 6 | 6 | 80 | 13 | 61 | 29 | 45 | 6 | 46 | 18 | 39 | 5 | 0 | 3 | 19 |
15,008 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/parser.py | pipenv.vendor.dotenv.parser.Binding | from typing import IO, Iterator, Match, NamedTuple, Optional, Pattern, Sequence, Tuple
class Binding(NamedTuple):
key: Optional[str]
value: Optional[str]
original: Original
error: bool |
class Binding(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
15,009 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/parser.py | pipenv.vendor.dotenv.parser.Original | from typing import IO, Iterator, Match, NamedTuple, Optional, Pattern, Sequence, Tuple
class Original(NamedTuple):
string: str
line: int |
class Original(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
15,010 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/parser.py | pipenv.vendor.dotenv.parser.Position | import re
class Position:
def __init__(self, chars: int, line: int) -> None:
self.chars = chars
self.line = line
@classmethod
def start(cls) -> 'Position':
return cls(chars=0, line=1)
def set(self, other: 'Position') -> None:
self.chars = other.chars
self.line... |
class Position:
def __init__(self, chars: int, line: int) -> None:
pass
@classmethod
def start(cls) -> 'Position':
pass
def set(self, other: 'Position') -> None:
pass
def advance(self, string: str) -> None:
pass | 6 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 3 | 2 | 4 | 4 | 16 | 3 | 13 | 8 | 7 | 0 | 12 | 7 | 7 | 1 | 0 | 0 | 4 |
15,011 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/parser.py | pipenv.vendor.dotenv.parser.Reader | from typing import IO, Iterator, Match, NamedTuple, Optional, Pattern, Sequence, Tuple
class Reader:
def __init__(self, stream: IO[str]) -> None:
self.string = stream.read()
self.position = Position.start()
self.mark = Position.start()
def has_next(self) -> bool:
return self.p... |
class Reader:
def __init__(self, stream: IO[str]) -> None:
pass
def has_next(self) -> bool:
pass
def set_mark(self) -> None:
pass
def get_marked(self) -> Original:
pass
def peek(self, count: int) -> str:
pass
def read(self, count: int) -> str:
... | 8 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 7 | 3 | 0 | 7 | 3 | 7 | 7 | 34 | 6 | 28 | 13 | 20 | 0 | 25 | 13 | 17 | 2 | 0 | 1 | 9 |
15,012 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/variables.py | pipenv.vendor.dotenv.variables.Atom | from abc import ABCMeta, abstractmethod
from typing import Iterator, Mapping, Optional, Pattern
class Atom(metaclass=ABCMeta):
def __ne__(self, other: object) -> bool:
result = self.__eq__(other)
if result is NotImplemented:
return NotImplemented
return not result
@abstrac... |
class Atom(metaclass=ABCMeta):
def __ne__(self, other: object) -> bool:
pass
@abstractmethod
def resolve(self, env: Mapping[str, Optional[str]]) -> str:
pass | 4 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 1 | 2 | 0 | 2 | 2 | 0 | 2 | 22 | 9 | 1 | 8 | 5 | 5 | 0 | 8 | 4 | 5 | 2 | 3 | 1 | 3 |
15,013 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/variables.py | pipenv.vendor.dotenv.variables.Literal | from typing import Iterator, Mapping, Optional, Pattern
class Literal(Atom):
def __init__(self, value: str) -> None:
self.value = value
def __repr__(self) -> str:
return f'Literal(value={self.value})'
def __eq__(self, other: object) -> bool:
if not isinstance(other, self.__class_... |
class Literal(Atom):
def __init__(self, value: str) -> None:
pass
def __repr__(self) -> str:
pass
def __eq__(self, other: object) -> bool:
pass
def __hash__(self) -> int:
pass
def resolve(self, env: Mapping[str, Optional[str]]) -> str:
pass | 6 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 5 | 1 | 5 | 27 | 17 | 4 | 13 | 7 | 7 | 0 | 13 | 7 | 7 | 2 | 4 | 1 | 6 |
15,014 | pypa/pipenv | pypa_pipenv/pipenv/vendor/dotenv/variables.py | pipenv.vendor.dotenv.variables.Variable | from typing import Iterator, Mapping, Optional, Pattern
class Variable(Atom):
def __init__(self, name: str, default: Optional[str]) -> None:
self.name = name
self.default = default
def __repr__(self) -> str:
return f'Variable(name={self.name}, default={self.default})'
def __eq__(... |
class Variable(Atom):
def __init__(self, name: str, default: Optional[str]) -> None:
pass
def __repr__(self) -> str:
pass
def __eq__(self, other: object) -> bool:
pass
def __hash__(self) -> int:
pass
def resolve(self, env: Mapping[str, Optional[str]]) -> str:
... | 6 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 1 | 3 | 0 | 0 | 5 | 2 | 5 | 27 | 20 | 4 | 16 | 10 | 10 | 0 | 16 | 10 | 10 | 3 | 4 | 1 | 8 |
15,015 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.Distribution | import email
import types
from .compat import py39, py311
import sys
import itertools
import pathlib
from ._functools import method_cache, pass_none
from ._itertools import always_iterable, bucket, unique_everseen
from ._meta import PackageMetadata, SimplePath
import abc
import os
from itertools import starmap
from . i... |
class Distribution(metaclass=abc.ABCMeta):
'''
An abstract Python distribution package.
Custom providers may derive from this class and define
the abstract methods to provide a concrete implementation
for their environment. Some providers may opt to override
the default implementation of some p... | 49 | 20 | 10 | 1 | 5 | 5 | 1 | 0.99 | 1 | 25 | 13 | 1 | 16 | 0 | 23 | 43 | 323 | 55 | 135 | 71 | 81 | 133 | 92 | 49 | 59 | 3 | 3 | 1 | 38 |
15,016 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.DistributionFinder | from importlib.abc import MetaPathFinder
import sys
from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
import abc
class DistributionFinder(MetaPathFinder):
"""
A MetaPathFinder capable of discovering installed distributions.
Custom providers should implement this interface in orde... |
class DistributionFinder(MetaPathFinder):
'''
A MetaPathFinder capable of discovering installed distributions.
Custom providers should implement this interface in order to
supply metadata.
'''
class Context:
'''
Keyword arguments presented by the caller to
``distributio... | 7 | 4 | 6 | 1 | 2 | 4 | 1 | 4 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 23 | 60 | 10 | 10 | 8 | 3 | 40 | 8 | 6 | 3 | 1 | 4 | 0 | 3 |
15,017 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.EntryPoint | import operator
import re
from importlib import import_module
import functools
from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
class EntryPoint:
"""An entry point as defined by Python packaging conventions.
See `the packaging docs on entry points
<https://packaging.python.org/s... |
class EntryPoint:
'''An entry point as defined by Python packaging conventions.
See `the packaging docs on entry points
<https://packaging.python.org/specifications/entry-points/>`_
for more information.
>>> ep = EntryPoint(
... name=None, group=None, value='package.module:attr [extra1, ext... | 19 | 4 | 6 | 0 | 3 | 2 | 1 | 0.89 | 0 | 7 | 0 | 0 | 13 | 0 | 14 | 14 | 139 | 24 | 61 | 28 | 42 | 54 | 47 | 24 | 32 | 2 | 0 | 1 | 15 |
15,018 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.FastPath | import pathlib
import functools
from ._functools import method_cache, pass_none
from contextlib import suppress
import posixpath
import os
class FastPath:
"""
Micro-optimized class for searching a root for children.
Root is a path on the file system that may contain metadata
directories either as natu... |
class FastPath:
'''
Micro-optimized class for searching a root for children.
Root is a path on the file system that may contain metadata
directories either as natural directories or within a zip file.
>>> FastPath('').children()
['...']
FastPath objects are cached and recycled for any given... | 12 | 1 | 4 | 0 | 3 | 0 | 1 | 0.4 | 0 | 7 | 1 | 0 | 8 | 1 | 8 | 8 | 55 | 14 | 30 | 16 | 17 | 12 | 27 | 13 | 17 | 1 | 0 | 1 | 8 |
15,019 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.MetadataPathFinder | from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
from ._compat import NullFinder, install
import itertools
@install
class MetadataPathFinder(NullFinder, DistributionFinder):
"""A degenerate finder for distribution packages on the file system.
This finder supplies only a find_distrib... | @install
class MetadataPathFinder(NullFinder, DistributionFinder):
'''A degenerate finder for distribution packages on the file system.
This finder supplies only a find_distributions() method for versions
of Python that do not have a PathFinder find_distributions().
'''
@classmethod
def find_dis... | 8 | 3 | 7 | 0 | 4 | 3 | 1 | 0.75 | 2 | 6 | 4 | 0 | 0 | 0 | 3 | 27 | 33 | 5 | 16 | 11 | 7 | 12 | 9 | 6 | 5 | 1 | 5 | 0 | 3 |
15,020 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.PackagePath | from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
import pathlib
from ._meta import PackageMetadata, SimplePath
class PackagePath(pathlib.PurePosixPath):
"""A reference to a path in a package"""
hash: Optional[FileHash]
size: int
dist: Distribution
def read_text(self, enc... |
class PackagePath(pathlib.PurePosixPath):
'''A reference to a path in a package'''
def read_text(self, encoding: str='utf-8') -> str:
pass
def read_binary(self) -> bytes:
pass
def locate(self) -> SimplePath:
'''Return a path-like object for this path'''
pass | 4 | 2 | 2 | 0 | 2 | 0 | 1 | 0.2 | 1 | 3 | 1 | 0 | 3 | 0 | 3 | 42 | 16 | 4 | 10 | 4 | 6 | 2 | 10 | 4 | 6 | 1 | 3 | 0 | 3 |
15,021 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.PathDistribution | from ._functools import method_cache, pass_none
from ._meta import PackageMetadata, SimplePath
import os
from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
from contextlib import suppress
class PathDistribution(Distribution):
def __init__(self, path: SimplePath) -> None:
"""Constr... |
class PathDistribution(Distribution):
def __init__(self, path: SimplePath) -> None:
'''Construct a distribution.
:param path: SimplePath indicating the metadata directory.
'''
pass
def read_text(self, filename: str | os.PathLike[str]) -> Optional[str]:
pass
def lo... | 8 | 3 | 9 | 0 | 5 | 3 | 1 | 0.53 | 1 | 11 | 2 | 0 | 4 | 1 | 5 | 48 | 53 | 7 | 30 | 12 | 22 | 16 | 19 | 10 | 13 | 2 | 4 | 1 | 6 |
15,022 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.Prepared | import re
from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast
class Prepared:
"""
A prepared search query for metadata on a possibly-named package.
Pre-calculates the normalization to prevent repeated operations.
>>> none = Prepared(None)
>>> none.normalized
>>> none.l... |
class Prepared:
'''
A prepared search query for metadata on a possibly-named package.
Pre-calculates the normalization to prevent repeated operations.
>>> none = Prepared(None)
>>> none.normalized
>>> none.legacy_normalized
>>> bool(none)
False
>>> sample = Prepared('Sample__Pkg-nam... | 7 | 3 | 5 | 0 | 3 | 2 | 1 | 1.35 | 0 | 2 | 0 | 0 | 2 | 1 | 4 | 4 | 47 | 7 | 17 | 10 | 10 | 23 | 15 | 8 | 10 | 2 | 0 | 1 | 5 |
15,023 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/__init__.py | pipenv.vendor.importlib_metadata.Sectioned | import textwrap
from ._collections import FreezableDefaultDict, Pair
class Sectioned:
"""
A simple entry point config parser for performance
>>> for item in Sectioned.read(Sectioned._sample):
... print(item)
Pair(name='sec1', value='# comments ignored')
Pair(name='sec1', value='a = 1')
... |
class Sectioned:
'''
A simple entry point config parser for performance
>>> for item in Sectioned.read(Sectioned._sample):
... print(item)
Pair(name='sec1', value='# comments ignored')
Pair(name='sec1', value='a = 1')
Pair(name='sec1', value='b = 2')
Pair(name='sec2', value='a = 2')... | 7 | 1 | 6 | 0 | 6 | 0 | 2 | 0.9 | 0 | 4 | 1 | 0 | 0 | 0 | 3 | 3 | 63 | 7 | 30 | 12 | 23 | 27 | 15 | 9 | 11 | 3 | 0 | 2 | 5 |
15,024 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/_adapters.py | pipenv.vendor.importlib_metadata._adapters.Message | from ._text import FoldedCase
import email.message
import textwrap
import re
class Message(email.message.Message):
multiple_use_keys = set(map(FoldedCase, ['Classifier', 'Obsoletes-Dist', 'Platform', 'Project-URL', 'Provides-Dist', 'Provides-Extra', 'Requires-Dist', 'Requires-External', 'Supported-Platform', 'Dyna... |
class Message(email.message.Message):
def __new__(cls, orig: email.message.Message):
pass
def __init__(self, *args, **kwargs):
pass
def __iter__(self):
pass
def __getitem__(self, item):
'''
Override parent behavior to typical dict behavior.
``email.me... | 10 | 3 | 7 | 1 | 5 | 2 | 2 | 0.33 | 1 | 5 | 1 | 0 | 6 | 1 | 6 | 51 | 76 | 11 | 49 | 17 | 39 | 16 | 32 | 16 | 23 | 3 | 1 | 1 | 13 |
15,025 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/_itertools.py | pipenv.vendor.importlib_metadata._itertools.bucket | from collections import defaultdict, deque
class bucket:
"""Wrap *iterable* and return an object that buckets the iterable into
child iterables based on a *key* function.
>>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
>>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st cha... |
class bucket:
'''Wrap *iterable* and return an object that buckets the iterable into
child iterables based on a *key* function.
>>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
>>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character
>>> sorted(list(s)) # Get th... | 6 | 2 | 11 | 1 | 8 | 2 | 3 | 0.9 | 0 | 1 | 0 | 0 | 5 | 4 | 5 | 5 | 94 | 14 | 42 | 15 | 36 | 38 | 40 | 15 | 34 | 7 | 0 | 4 | 16 |
15,026 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/_meta.py | pipenv.vendor.importlib_metadata._meta.PackageMetadata | from typing import Any, Dict, Iterator, List, Optional, Protocol, TypeVar, Union, overload
class PackageMetadata(Protocol):
def __len__(self) -> int:
...
def __contains__(self, item: str) -> bool:
...
def __getitem__(self, key: str) -> str:
...
def __iter__(self) -> Iterator... |
class PackageMetadata(Protocol):
def __len__(self) -> int:
pass
def __contains__(self, item: str) -> bool:
pass
def __getitem__(self, key: str) -> str:
pass
def __iter__(self) -> Iterator[str]:
pass
@overload
def get(self, name: str, failobj: None=None) -> Op... | 15 | 2 | 2 | 0 | 1 | 1 | 1 | 0.74 | 1 | 4 | 0 | 0 | 9 | 0 | 9 | 33 | 34 | 8 | 19 | 19 | 7 | 14 | 17 | 10 | 7 | 1 | 5 | 0 | 9 |
15,027 | pypa/pipenv | pypa_pipenv/pipenv/vendor/importlib_metadata/_meta.py | pipenv.vendor.importlib_metadata._meta.SimplePath | import os
from typing import Any, Dict, Iterator, List, Optional, Protocol, TypeVar, Union, overload
class SimplePath(Protocol):
"""
A minimal subset of pathlib.Path required by Distribution.
"""
def joinpath(self, other: Union[str, os.PathLike[str]]) -> SimplePath:
...
def __truediv__(se... |
class SimplePath(Protocol):
'''
A minimal subset of pathlib.Path required by Distribution.
'''
def joinpath(self, other: Union[str, os.PathLike[str]]) -> SimplePath:
pass
def __truediv__(self, other: Union[str, os.PathLike[str]]) -> SimplePath:
pass
@property
def parent(se... | 8 | 1 | 2 | 0 | 2 | 1 | 1 | 0.75 | 1 | 4 | 0 | 0 | 6 | 0 | 6 | 30 | 21 | 6 | 12 | 12 | 6 | 9 | 13 | 7 | 6 | 1 | 5 | 0 | 6 |
15,028 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/_elffile.py | pipenv.vendor.packaging._elffile.ELFFile | import struct
import os
from typing import IO
class ELFFile:
"""
Representation of an ELF executable.
"""
def __init__(self, f: IO[bytes]) -> None:
self._f = f
try:
ident = self._read('16B')
except struct.error:
raise ELFInvalid('unable to parse identifi... |
class ELFFile:
'''
Representation of an ELF executable.
'''
def __init__(self, f: IO[bytes]) -> None:
pass
def _read(self, fmt: str) -> tuple[int, ...]:
pass
@property
def interpreter(self) -> str | None:
'''
The path recorded in the ``PT_INTERP`` section h... | 5 | 2 | 21 | 1 | 17 | 6 | 3 | 0.39 | 0 | 8 | 1 | 0 | 3 | 10 | 3 | 3 | 70 | 7 | 54 | 20 | 49 | 21 | 34 | 13 | 30 | 5 | 0 | 2 | 10 |
15,029 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/_tokenizer.py | pipenv.vendor.packaging._tokenizer.Tokenizer | from typing import Iterator, NoReturn
import contextlib
import re
class Tokenizer:
"""Context-sensitive token parsing.
Provides methods to examine the input stream to check whether the next token
matches.
"""
def __init__(self, source: str, *, rules: dict[str, str | re.Pattern[str]]) -> None:
... |
class Tokenizer:
'''Context-sensitive token parsing.
Provides methods to examine the input stream to check whether the next token
matches.
'''
def __init__(self, source: str, *, rules: dict[str, str | re.Pattern[str]]) -> None:
pass
def consume(self, name: str) -> None:
'''Mov... | 9 | 6 | 13 | 1 | 10 | 2 | 2 | 0.21 | 0 | 6 | 2 | 0 | 7 | 4 | 7 | 7 | 105 | 18 | 72 | 31 | 50 | 15 | 43 | 17 | 35 | 4 | 0 | 1 | 16 |
15,030 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/markers.py | pipenv.vendor.packaging.markers.Marker | from ._parser import parse_marker as _parse_marker
from ._tokenizer import ParserSyntaxError
from typing import Any, Callable, TypedDict, cast
class Marker:
def __init__(self, marker: str) -> None:
try:
self._markers = _normalize_extra_values(_parse_marker(marker))
except ParserSyntaxE... |
class Marker:
def __init__(self, marker: str) -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __hash__(self) -> int:
pass
def __eq__(self, other: Any) -> bool:
pass
def evaluate(self, environment: dict[str, str] | No... | 7 | 1 | 10 | 1 | 4 | 5 | 2 | 1.19 | 0 | 7 | 2 | 0 | 6 | 1 | 6 | 6 | 66 | 9 | 26 | 10 | 19 | 31 | 26 | 9 | 19 | 4 | 0 | 2 | 11 |
15,031 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/metadata.py | pipenv.vendor.packaging.metadata.Metadata | from . import version as version_module
from . import requirements, specifiers, utils
class Metadata:
"""Representation of distribution metadata.
Compared to :class:`RawMetadata`, this class provides objects representing
metadata fields instead of only using built-in types. Any invalid metadata
will c... |
class Metadata:
'''Representation of distribution metadata.
Compared to :class:`RawMetadata`, this class provides objects representing
metadata fields instead of only using built-in types. Any invalid metadata
will cause :exc:`InvalidMetadata` to be raised (with a
:py:attr:`~BaseException.__cause__... | 5 | 3 | 41 | 5 | 29 | 7 | 8 | 0.58 | 0 | 10 | 3 | 0 | 0 | 0 | 2 | 2 | 168 | 15 | 98 | 49 | 93 | 57 | 79 | 45 | 76 | 9 | 0 | 5 | 15 |
15,032 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/metadata.py | pipenv.vendor.packaging.metadata.RawMetadata | from typing import Any, Callable, Generic, Literal, TypedDict, cast
from . import version as version_module
class RawMetadata(TypedDict, total=False):
"""A dictionary of raw core metadata.
Each field in core metadata maps to a key of this dictionary (when data is
provided). The key is lower-case and under... |
class RawMetadata(TypedDict, total=False):
'''A dictionary of raw core metadata.
Each field in core metadata maps to a key of this dictionary (when data is
provided). The key is lower-case and underscores are used instead of dashes
compared to the equivalent core metadata field. Any core metadata field... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.83 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 9 | 29 | 1 | 28 | 24 | 29 | 1 | 28 | 0 | 1 | 0 | 0 |
15,033 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/requirements.py | pipenv.vendor.packaging.requirements.Requirement | from .specifiers import SpecifierSet
from ._tokenizer import ParserSyntaxError
from .utils import canonicalize_name
from .markers import Marker, _normalize_extra_values
from typing import Any, Iterator
from ._parser import parse_requirement as _parse_requirement
class Requirement:
"""Parse a requirement.
Pars... |
class Requirement:
'''Parse a requirement.
Parse a given requirement string into its parts, such as name, specifier,
URL, and extras. Raises InvalidRequirement on a badly-formed requirement
string.
'''
def __init__(self, requirement_string: str) -> None:
pass
def _iter_parts(self,... | 7 | 1 | 9 | 1 | 8 | 0 | 2 | 0.19 | 0 | 9 | 4 | 0 | 6 | 5 | 6 | 6 | 71 | 14 | 48 | 15 | 41 | 9 | 37 | 14 | 30 | 6 | 0 | 2 | 14 |
15,034 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/specifiers.py | pipenv.vendor.packaging.specifiers.BaseSpecifier | from typing import Callable, Iterable, Iterator, TypeVar, Union
import abc
class BaseSpecifier(metaclass=abc.ABCMeta):
@abc.abstractmethod
def __str__(self) -> str:
"""
Returns the str representation of this Specifier-like object. This
should be representative of the Specifier itself.
... |
class BaseSpecifier(metaclass=abc.ABCMeta):
@abc.abstractmethod
def __str__(self) -> str:
'''
Returns the str representation of this Specifier-like object. This
should be representative of the Specifier itself.
'''
pass
@abc.abstractmethod
def __hash__(self) -> ... | 16 | 7 | 5 | 0 | 1 | 4 | 1 | 1.44 | 1 | 3 | 0 | 2 | 7 | 0 | 7 | 27 | 53 | 9 | 18 | 17 | 0 | 26 | 8 | 8 | 0 | 1 | 3 | 0 | 7 |
15,035 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/specifiers.py | pipenv.vendor.packaging.specifiers.Specifier | from .utils import canonicalize_version
from typing import Callable, Iterable, Iterator, TypeVar, Union
import re
import itertools
from .version import Version
class Specifier(BaseSpecifier):
"""This class abstracts handling of version specifiers.
.. tip::
It is generally not required to instantiate ... |
class Specifier(BaseSpecifier):
'''This class abstracts handling of version specifiers.
.. tip::
It is generally not required to instantiate this manually. You should instead
prefer to work with :class:`SpecifierSet` instead, which can parse
comma-separated version specifiers (which is ... | 28 | 10 | 17 | 2 | 6 | 9 | 2 | 1.07 | 1 | 8 | 2 | 0 | 22 | 2 | 22 | 49 | 526 | 79 | 227 | 58 | 197 | 243 | 116 | 51 | 93 | 7 | 4 | 3 | 49 |
15,036 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/specifiers.py | pipenv.vendor.packaging.specifiers.SpecifierSet | from .version import Version
from typing import Callable, Iterable, Iterator, TypeVar, Union
class SpecifierSet(BaseSpecifier):
"""This class abstracts handling of a set of version specifiers.
It can be passed a single specifier (``>=3.0``), a comma-separated list of
specifiers (``>=3.0,!=3.1``), or no sp... |
class SpecifierSet(BaseSpecifier):
'''This class abstracts handling of a set of version specifiers.
It can be passed a single specifier (``>=3.0``), a comma-separated list of
specifiers (``>=3.0,!=3.1``), or no specifier at all.
'''
def __init__(self, specifiers: str='', prereleases: bool | None=N... | 16 | 11 | 23 | 3 | 7 | 13 | 3 | 1.82 | 1 | 9 | 2 | 0 | 13 | 2 | 13 | 40 | 320 | 55 | 94 | 33 | 71 | 171 | 71 | 24 | 57 | 8 | 4 | 4 | 34 |
15,037 | pypa/pipenv | pypa_pipenv/pipenv/vendor/packaging/version.py | pipenv.vendor.packaging.version.Version | import re
class Version(_BaseVersion):
"""This class abstracts handling of a project's versions.
A :class:`Version` instance is comparison aware and can be compared and
sorted using the standard Python interfaces.
>>> v1 = Version("1.0a5")
>>> v2 = Version("1.0")
>>> v1
<Version('1.0a5')>... |
class Version(_BaseVersion):
'''This class abstracts handling of a project's versions.
A :class:`Version` instance is comparison aware and can be compared and
sorted using the standard Python interfaces.
>>> v1 = Version("1.0a5")
>>> v2 = Version("1.0")
>>> v1
<Version('1.0a5')>
>>> v2
... | 32 | 18 | 14 | 2 | 4 | 8 | 2 | 1.66 | 1 | 6 | 2 | 0 | 17 | 1 | 17 | 24 | 291 | 52 | 90 | 37 | 58 | 149 | 59 | 23 | 41 | 6 | 1 | 1 | 31 |
15,038 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/ANSI.py | pipenv.vendor.pexpect.ANSI.ANSI | from . import screen
import string
from . import FSM
class ANSI(term):
"""This class implements an ANSI (VT100) terminal.
It is a stream filter that recognizes ANSI terminal
escape sequences and maintains the state of a screen object. """
def __init__(self, r=24, c=80, *args, **kwargs):
term._... |
class ANSI(term):
'''This class implements an ANSI (VT100) terminal.
It is a stream filter that recognizes ANSI terminal
escape sequences and maintains the state of a screen object. '''
def __init__(self, r=24, c=80, *args, **kwargs):
pass
def process(self, c):
'''Process a single... | 10 | 7 | 16 | 1 | 12 | 3 | 2 | 0.29 | 1 | 2 | 1 | 0 | 9 | 1 | 9 | 55 | 159 | 18 | 111 | 17 | 101 | 32 | 110 | 17 | 100 | 7 | 2 | 2 | 18 |
15,039 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/ANSI.py | pipenv.vendor.pexpect.ANSI.term | from . import screen
class term(screen.screen):
"""This class is an abstract, generic terminal.
This does nothing. This is a placeholder that
provides a common base class for other terminals
such as an ANSI terminal. """
def __init__(self, r=24, c=80, *args, **kwargs):
screen.screen.__init... |
class term(screen.screen):
'''This class is an abstract, generic terminal.
This does nothing. This is a placeholder that
provides a common base class for other terminals
such as an ANSI terminal. '''
def __init__(self, r=24, c=80, *args, **kwargs):
pass | 2 | 1 | 3 | 1 | 2 | 0 | 1 | 1.33 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 46 | 10 | 3 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
15,040 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/FSM.py | pipenv.vendor.pexpect.FSM.ExceptionFSM | class ExceptionFSM(Exception):
"""This is the FSM Exception class."""
def __init__(self, value):
self.value = value
def __str__(self):
return 'ExceptionFSM: ' + str(self.value) | class ExceptionFSM(Exception):
'''This is the FSM Exception class.'''
def __init__(self, value):
pass
def __str__(self):
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.2 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 12 | 9 | 3 | 5 | 4 | 2 | 1 | 5 | 4 | 2 | 1 | 3 | 0 | 2 |
15,041 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/FSM.py | pipenv.vendor.pexpect.FSM.FSM | class FSM:
"""This is a Finite State Machine (FSM).
"""
def __init__(self, initial_state, memory=None):
"""This creates the FSM. You set the initial state here. The "memory"
attribute is any object that you want to pass along to the action
functions. It is not used by the FSM. For p... | null | 10 | 10 | 16 | 4 | 5 | 7 | 2 | 1.31 | 0 | 2 | 1 | 0 | 9 | 9 | 9 | 9 | 155 | 42 | 49 | 21 | 39 | 64 | 45 | 21 | 35 | 4 | 0 | 1 | 18 |
15,042 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/_async_pre_await.py | pipenv.vendor.pexpect._async_pre_await.PatternWaiter | from pipenv.vendor.pexpect import EOF
import errno
import asyncio
class PatternWaiter(asyncio.Protocol):
transport = None
def set_expecter(self, expecter):
self.expecter = expecter
self.fut = asyncio.Future()
def found(self, result):
if not self.fut.done():
self.fut.se... |
class PatternWaiter(asyncio.Protocol):
def set_expecter(self, expecter):
pass
def found(self, result):
pass
def error(self, exc):
pass
def connection_made(self, transport):
pass
def data_received(self, data):
pass
def eof_received(self):
pas... | 8 | 0 | 7 | 0 | 6 | 1 | 2 | 0.09 | 1 | 3 | 1 | 0 | 7 | 2 | 7 | 7 | 56 | 9 | 43 | 17 | 35 | 4 | 42 | 15 | 34 | 4 | 1 | 2 | 15 |
15,043 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/_async_w_await.py | pipenv.vendor.pexpect._async_w_await.PatternWaiter | import asyncio
from pipenv.vendor.pexpect import EOF
import errno
class PatternWaiter(asyncio.Protocol):
transport = None
def set_expecter(self, expecter):
self.expecter = expecter
self.fut = asyncio.Future()
def found(self, result):
if not self.fut.done():
self.fut.se... |
class PatternWaiter(asyncio.Protocol):
def set_expecter(self, expecter):
pass
def found(self, result):
pass
def error(self, exc):
pass
def connection_made(self, transport):
pass
def data_received(self, data):
pass
def eof_received(self):
pas... | 8 | 0 | 7 | 0 | 6 | 1 | 2 | 0.09 | 1 | 3 | 1 | 0 | 7 | 2 | 7 | 7 | 56 | 9 | 43 | 17 | 35 | 4 | 42 | 15 | 34 | 4 | 1 | 2 | 15 |
15,044 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/exceptions.py | pipenv.vendor.pexpect.exceptions.EOF | class EOF(ExceptionPexpect):
"""Raised when EOF is read from a child.
This usually means the child has exited.""" | class EOF(ExceptionPexpect):
'''Raised when EOF is read from a child.
This usually means the child has exited.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,045 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/exceptions.py | pipenv.vendor.pexpect.exceptions.ExceptionPexpect | import sys
import traceback
class ExceptionPexpect(Exception):
"""Base class for all exceptions raised by this module.
"""
def __init__(self, value):
super(ExceptionPexpect, self).__init__(value)
self.value = value
def __str__(self):
return str(self.value)
def get_trace(s... |
class ExceptionPexpect(Exception):
'''Base class for all exceptions raised by this module.
'''
def __init__(self, value):
pass
def __str__(self):
pass
def get_trace(self):
'''This returns an abbreviated stack trace with lines that only concern
the caller. In o... | 4 | 2 | 5 | 0 | 4 | 1 | 1 | 0.42 | 1 | 2 | 0 | 3 | 3 | 1 | 3 | 13 | 21 | 4 | 12 | 6 | 8 | 5 | 11 | 6 | 7 | 1 | 3 | 0 | 3 |
15,046 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/exceptions.py | pipenv.vendor.pexpect.exceptions.TIMEOUT | class TIMEOUT(ExceptionPexpect):
"""Raised when a read time exceeds the timeout. """ | class TIMEOUT(ExceptionPexpect):
'''Raised when a read time exceeds the timeout. '''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,047 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/expect.py | pipenv.vendor.pexpect.expect.Expecter | import time
from .exceptions import EOF, TIMEOUT
class Expecter(object):
def __init__(self, spawn, searcher, searchwindowsize=-1):
self.spawn = spawn
self.searcher = searcher
if searchwindowsize == -1:
searchwindowsize = spawn.searchwindowsize
self.searchwindowsize = se... |
class Expecter(object):
def __init__(self, spawn, searcher, searchwindowsize=-1):
pass
def do_search(self, window, freshlen):
pass
def existing_data(self):
pass
def new_data(self, data):
pass
def eof(self, err=None):
pass
def timeout(self, err=None)... | 9 | 1 | 22 | 1 | 19 | 2 | 4 | 0.1 | 1 | 3 | 2 | 0 | 8 | 4 | 8 | 8 | 180 | 13 | 154 | 41 | 145 | 15 | 142 | 40 | 133 | 11 | 1 | 3 | 35 |
15,048 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/expect.py | pipenv.vendor.pexpect.expect.searcher_re | from .exceptions import EOF, TIMEOUT
class searcher_re(object):
"""This is regular expression string search helper for the
spawn.expect_any() method. This helper class is for powerful
pattern matching. For speed, see the helper class, searcher_string.
Attributes:
eof_index - index of EOF,... |
class searcher_re(object):
'''This is regular expression string search helper for the
spawn.expect_any() method. This helper class is for powerful
pattern matching. For speed, see the helper class, searcher_string.
Attributes:
eof_index - index of EOF, or -1
timeout_index - index of... | 4 | 4 | 22 | 2 | 15 | 5 | 5 | 0.57 | 1 | 5 | 2 | 0 | 3 | 6 | 3 | 3 | 87 | 13 | 47 | 20 | 43 | 27 | 45 | 20 | 41 | 6 | 1 | 2 | 14 |
15,049 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/expect.py | pipenv.vendor.pexpect.expect.searcher_string | from .exceptions import EOF, TIMEOUT
class searcher_string(object):
"""This is a plain string search helper for the spawn.expect_any() method.
This helper class is for speed. For more powerful regex patterns
see the helper class, searcher_re.
Attributes:
eof_index - index of EOF, or -1
... |
class searcher_string(object):
'''This is a plain string search helper for the spawn.expect_any() method.
This helper class is for speed. For more powerful regex patterns
see the helper class, searcher_re.
Attributes:
eof_index - index of EOF, or -1
timeout_index - index of TIMEOUT,... | 4 | 4 | 25 | 2 | 14 | 8 | 4 | 0.84 | 1 | 5 | 2 | 0 | 3 | 7 | 3 | 3 | 96 | 15 | 44 | 18 | 40 | 37 | 42 | 18 | 38 | 5 | 1 | 2 | 13 |
15,050 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/fdpexpect.py | pipenv.vendor.pexpect.fdpexpect.fdspawn | from .exceptions import ExceptionPexpect, TIMEOUT
import os
from .utils import select_ignore_interrupts, poll_ignore_interrupts
from .spawnbase import SpawnBase
class fdspawn(SpawnBase):
"""This is like pexpect.spawn but allows you to supply your own open file
descriptor. For example, you could use it to read ... |
class fdspawn(SpawnBase):
'''This is like pexpect.spawn but allows you to supply your own open file
descriptor. For example, you could use it to read through a file looking
for patterns, or to control a modem or serial device. '''
def __init__(self, fd, args=None, timeout=30, maxread=2000, searchwindo... | 10 | 10 | 11 | 1 | 7 | 3 | 2 | 0.52 | 1 | 5 | 2 | 0 | 9 | 7 | 9 | 32 | 118 | 20 | 66 | 23 | 55 | 34 | 61 | 22 | 51 | 5 | 2 | 2 | 20 |
15,051 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/popen_spawn.py | pipenv.vendor.pexpect.popen_spawn.PopenSpawn | import sys
import threading
from .utils import string_types
import signal
import os
from .exceptions import EOF
from .spawnbase import SpawnBase, PY3
import shlex
import subprocess
import time
class PopenSpawn(SpawnBase):
def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None, logfile=None, cwd=N... |
class PopenSpawn(SpawnBase):
def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None, logfile=None, cwd=None, env=None, encoding=None, codec_errors='strict', preexec_fn=None):
pass
def read_nonblocking(self, size, timeout):
pass
def _read_incoming(self):
'''Run in... | 11 | 8 | 16 | 2 | 11 | 3 | 3 | 0.3 | 1 | 8 | 1 | 0 | 10 | 11 | 10 | 33 | 169 | 30 | 107 | 38 | 94 | 32 | 94 | 35 | 83 | 8 | 2 | 3 | 29 |
15,052 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/pty_spawn.py | pipenv.vendor.pexpect.pty_spawn.spawn | from .spawnbase import SpawnBase
import tty
import signal
from pipenv.vendor.ptyprocess.ptyprocess import use_native_pty_fork
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
import os
import errno
import pipenv.vendor.ptyprocess as ptyprocess
import pty
import time
from .utils import which, split_command_line, s... | null | 37 | 31 | 23 | 3 | 9 | 11 | 3 | 1.2 | 1 | 11 | 4 | 1 | 31 | 22 | 31 | 54 | 826 | 141 | 312 | 88 | 268 | 374 | 285 | 78 | 250 | 14 | 2 | 4 | 92 |
15,053 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/pxssh.py | pipenv.vendor.pexpect.pxssh.ExceptionPxssh | from pipenv.vendor.pexpect import ExceptionPexpect, TIMEOUT, EOF, spawn
class ExceptionPxssh(ExceptionPexpect):
"""Raised for pxssh exceptions.
""" |
class ExceptionPxssh(ExceptionPexpect):
'''Raised for pxssh exceptions.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,054 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/pxssh.py | pipenv.vendor.pexpect.pxssh.pxssh | import os
from pipenv.vendor.pexpect import ExceptionPexpect, TIMEOUT, EOF, spawn
import re
import time
class pxssh(spawn):
"""This class extends pexpect.spawn to specialize setting up SSH
connections. This adds methods for login, logout, and expecting the shell
prompt. It does various tricky things to han... | null | 9 | 8 | 51 | 6 | 28 | 20 | 8 | 0.97 | 1 | 8 | 3 | 0 | 8 | 10 | 8 | 62 | 487 | 63 | 224 | 66 | 206 | 218 | 191 | 56 | 182 | 42 | 3 | 5 | 64 |
15,055 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/replwrap.py | pipenv.vendor.pexpect.replwrap.REPLWrapper | import signal
import pipenv.vendor.pexpect as pexpect
class REPLWrapper(object):
"""Wrapper for a REPL.
:param cmd_or_spawn: This can either be an instance of :class:`pexpect.spawn`
in which a REPL has already been started, or a str command to start a new
REPL process.
:param str orig_prompt: ... |
class REPLWrapper(object):
'''Wrapper for a REPL.
:param cmd_or_spawn: This can either be an instance of :class:`pexpect.spawn`
in which a REPL has already been started, or a str command to start a new
REPL process.
:param str orig_prompt: The prompt to expect at first.
:param str prompt_ch... | 5 | 2 | 19 | 2 | 12 | 5 | 3 | 0.67 | 1 | 2 | 1 | 0 | 4 | 3 | 4 | 4 | 93 | 11 | 49 | 15 | 40 | 33 | 41 | 12 | 35 | 6 | 1 | 1 | 13 |
15,056 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/screen.py | pipenv.vendor.pexpect.screen.screen | import copy
import codecs
class screen:
"""This object maintains the state of a virtual text screen as a
rectangular array. This maintains a virtual cursor position and handles
scrolling as characters are added. This supports most of the methods needed
by an ANSI text screen. Row and column indexes are... |
class screen:
'''This object maintains the state of a virtual text screen as a
rectangular array. This maintains a virtual cursor position and handles
scrolling as characters are added. This supports most of the methods needed
by an ANSI text screen. Row and column indexes are 1-based (not zero-based,
... | 46 | 35 | 6 | 1 | 4 | 2 | 1 | 0.51 | 0 | 3 | 0 | 1 | 45 | 12 | 45 | 45 | 356 | 94 | 190 | 76 | 144 | 96 | 185 | 76 | 139 | 6 | 0 | 2 | 66 |
15,057 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/socket_pexpect.py | pipenv.vendor.pexpect.socket_pexpect.SocketSpawn | from .spawnbase import SpawnBase
from contextlib import contextmanager
from .exceptions import TIMEOUT, EOF
import socket
class SocketSpawn(SpawnBase):
"""This is like :mod:`pexpect.fdpexpect` but uses the cross-platform python socket api,
rather than the unix-specific file descriptor api. Thus, it works with
... |
class SocketSpawn(SpawnBase):
'''This is like :mod:`pexpect.fdpexpect` but uses the cross-platform python socket api,
rather than the unix-specific file descriptor api. Thus, it works with
remote connections on both unix and windows.'''
def __init__(self, socket: socket.socket, args=None, timeout=30, ... | 11 | 9 | 11 | 1 | 8 | 2 | 2 | 0.34 | 1 | 3 | 2 | 0 | 9 | 8 | 9 | 32 | 114 | 16 | 73 | 34 | 51 | 25 | 52 | 22 | 42 | 4 | 2 | 3 | 14 |
15,058 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/spawnbase.py | pipenv.vendor.pexpect.spawnbase.SpawnBase | import re
from io import StringIO, BytesIO
import sys
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
import os
import errno
import codecs
from .expect import Expecter, searcher_string, searcher_re
class SpawnBase(object):
"""A base class providing the backwards-compatible spawn API for Pexpect.
This s... |
class SpawnBase(object):
'''A base class providing the backwards-compatible spawn API for Pexpect.
This should not be instantiated directly: use :class:`pexpect.spawn` or
:class:`pexpect.fdpexpect.fdspawn`.
'''
def __init__(self, timeout=30, maxread=2000, searchwindowsize=None, logfile=None, e... | 26 | 14 | 19 | 2 | 10 | 8 | 3 | 0.87 | 1 | 14 | 6 | 4 | 23 | 40 | 23 | 23 | 514 | 74 | 236 | 90 | 205 | 205 | 213 | 86 | 185 | 9 | 1 | 2 | 68 |
15,059 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pexpect/spawnbase.py | pipenv.vendor.pexpect.spawnbase._NullCoder | class _NullCoder(object):
"""Pass bytes through unchanged."""
@staticmethod
def encode(b, final=False):
return b
@staticmethod
def decode(b, final=False):
return b | class _NullCoder(object):
'''Pass bytes through unchanged.'''
@staticmethod
def encode(b, final=False):
pass
@staticmethod
def decode(b, final=False):
pass | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 9 | 1 | 7 | 5 | 2 | 1 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
15,060 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_cli.py | pipenv.vendor.pipdeptree._cli.EnumAction | import enum
from typing import Any, Sequence, cast
from argparse import Action, ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace
class EnumAction(Action):
"""
Generic action that exists to convert a string into a Enum value that is then added into a `Namespace` object.
This custom action exists be... |
class EnumAction(Action):
'''
Generic action that exists to convert a string into a Enum value that is then added into a `Namespace` object.
This custom action exists because argparse doesn't have support for enums.
References
----------
- https://github.com/python/cpython/issues/69247#issuecom... | 3 | 1 | 25 | 2 | 23 | 4 | 3 | 0.32 | 1 | 10 | 0 | 0 | 2 | 1 | 2 | 9 | 63 | 8 | 47 | 23 | 26 | 15 | 18 | 5 | 15 | 4 | 3 | 1 | 5 |
15,061 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_cli.py | pipenv.vendor.pipdeptree._cli.Options | from pipenv.vendor.pipdeptree._warning import WarningType
from argparse import Action, ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace
class Options(Namespace):
freeze: bool
python: str
all: bool
local_only: bool
user_only: bool
warn: WarningType
reverse: bool
packages: str
... |
class Options(Namespace):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 17 | 0 | 17 | 1 | 16 | 0 | 17 | 1 | 16 | 0 | 3 | 0 | 0 |
15,062 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_cli.py | pipenv.vendor.pipdeptree._cli._Formatter | from argparse import Action, ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace
class _Formatter(ArgumentDefaultsHelpFormatter):
def __init__(self, prog: str) -> None:
super().__init__(prog, max_help_position=22, width=240) |
class _Formatter(ArgumentDefaultsHelpFormatter):
def __init__(self, prog: str) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 28 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
15,063 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_freeze.py | pipenv.vendor.pipdeptree._freeze.PipBaseDistributionAdapter | from pipenv.patched.pip._internal.models.direct_url import DirectUrl, DirectUrlValidationError
from pathlib import Path
from pipenv.patched.pip._internal.utils.egg_link import egg_link_path_from_sys_path
from pipenv.patched.pip._vendor.packaging.version import Version
import locale
from typing import TYPE_CHECKING, Any... |
class PipBaseDistributionAdapter:
'''
An adapter class for pip's `pipenv.patched.pip._internal.metadata.BaseDistribution` abstract class.
It essentially wraps over an importlib.metadata.Distribution object and provides just enough fields/methods found in
pip's `BaseDistribution` so that we can use `pip... | 12 | 1 | 6 | 0 | 6 | 0 | 2 | 0.2 | 0 | 10 | 3 | 0 | 6 | 3 | 6 | 6 | 58 | 11 | 41 | 23 | 28 | 8 | 32 | 17 | 24 | 3 | 0 | 2 | 10 |
15,064 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/dag.py | pipenv.vendor.pipdeptree._models.dag.PackageDAG | from typing import TYPE_CHECKING, Iterator, List, Mapping
from pipenv.vendor.pipdeptree._warning import get_warning_printer
from itertools import chain
from fnmatch import fnmatch
from collections import defaultdict, deque
from .package import DistPackage, InvalidRequirementError, ReqPackage
from pipenv.vendor.packagin... |
class PackageDAG(Mapping[DistPackage, List[ReqPackage]]):
'''
Representation of Package dependencies as directed acyclic graph using a dict as the underlying datastructure.
The nodes and their relationships (edges) are internally stored using a map as follows,
{a: [b, c],
b: [d],
c: [d, e],
... | 12 | 7 | 19 | 2 | 10 | 6 | 4 | 0.73 | 1 | 14 | 4 | 1 | 9 | 2 | 10 | 10 | 219 | 39 | 106 | 43 | 94 | 77 | 98 | 41 | 87 | 16 | 1 | 5 | 37 |
15,065 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/dag.py | pipenv.vendor.pipdeptree._models.dag.ReversedPackageDAG | from .package import DistPackage, InvalidRequirementError, ReqPackage
from collections import defaultdict, deque
from itertools import chain
class ReversedPackageDAG(PackageDAG):
"""
Representation of Package dependencies in the reverse order.
Similar to it's super class `PackageDAG`, the underlying datas... |
class ReversedPackageDAG(PackageDAG):
'''
Representation of Package dependencies in the reverse order.
Similar to it's super class `PackageDAG`, the underlying datastructure is a dict, but here the keys are expected to
be of type `ReqPackage` and each item in the values of type `DistPackage`.
Typic... | 2 | 2 | 19 | 2 | 13 | 5 | 4 | 0.79 | 1 | 5 | 2 | 0 | 1 | 0 | 1 | 11 | 30 | 6 | 14 | 7 | 12 | 11 | 14 | 7 | 12 | 4 | 2 | 2 | 4 |
15,066 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/package.py | pipenv.vendor.pipdeptree._models.package.DistPackage | from importlib.metadata import Distribution, PackageNotFoundError, metadata, version
from typing import TYPE_CHECKING, Iterator
from pipenv.vendor.packaging.requirements import InvalidRequirement, Requirement
class DistPackage(Package):
"""
Wrapper class for importlib.metadata.Distribution instances.
:par... |
class DistPackage(Package):
'''
Wrapper class for importlib.metadata.Distribution instances.
:param obj: importlib.metadata.Distribution to wrap over
:param req: optional ReqPackage object to associate this DistPackage with. This is useful for displaying the tree in
reverse
'''
def __i... | 11 | 5 | 6 | 0 | 4 | 2 | 2 | 0.63 | 1 | 9 | 4 | 0 | 9 | 2 | 9 | 38 | 77 | 15 | 38 | 18 | 27 | 24 | 37 | 17 | 27 | 4 | 5 | 2 | 16 |
15,067 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/package.py | pipenv.vendor.pipdeptree._models.package.InvalidRequirementError | class InvalidRequirementError(ValueError):
"""
An invalid requirement string was found.
When raising an exception, this should provide just the problem requirement string.
""" | class InvalidRequirementError(ValueError):
'''
An invalid requirement string was found.
When raising an exception, this should provide just the problem requirement string.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 1 | 1 | 1 | 0 | 4 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,068 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/package.py | pipenv.vendor.pipdeptree._models.package.Package | from importlib.metadata import Distribution, PackageNotFoundError, metadata, version
from pipenv.vendor.pipdeptree._freeze import dist_to_frozen_repr
from pipenv.vendor.packaging.utils import canonicalize_name
from abc import ABC, abstractmethod
class Package(ABC):
"""Abstract class for wrappers around objects tha... |
class Package(ABC):
'''Abstract class for wrappers around objects that pip returns.'''
def __init__(self, project_name: str) -> None:
pass
def licenses(self) -> str:
pass
@abstractmethod
def render_as_root(self, *, frozen: bool) -> str:
pass
@abstractmethod
def ren... | 14 | 1 | 5 | 0 | 4 | 0 | 2 | 0.02 | 1 | 9 | 2 | 2 | 8 | 2 | 9 | 29 | 59 | 14 | 44 | 29 | 25 | 1 | 35 | 20 | 25 | 5 | 4 | 2 | 14 |
15,069 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_models/package.py | pipenv.vendor.pipdeptree._models.package.ReqPackage | from inspect import ismodule
from importlib import import_module
from importlib.metadata import Distribution, PackageNotFoundError, metadata, version
from pipenv.vendor.packaging.requirements import InvalidRequirement, Requirement
class ReqPackage(Package):
"""
Wrapper class for Requirement instance.
:par... |
class ReqPackage(Package):
'''
Wrapper class for Requirement instance.
:param obj: The `Requirement` instance to wrap over
:param dist: optional `importlib.metadata.Distribution` instance for this requirement
'''
def __init__(self, obj: Requirement, dist: DistPackage | None=None) -> None:
... | 12 | 2 | 7 | 0 | 7 | 1 | 2 | 0.16 | 1 | 9 | 2 | 0 | 8 | 2 | 8 | 37 | 77 | 12 | 57 | 20 | 45 | 9 | 49 | 17 | 40 | 6 | 5 | 3 | 19 |
15,070 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pipdeptree/_warning.py | pipenv.vendor.pipdeptree._warning.WarningPrinter | from typing import Callable
import sys
class WarningPrinter:
"""Non-thread safe class that handles printing warning logic."""
def __init__(self, warning_type: WarningType=WarningType.SUPPRESS) -> None:
self._warning_type = warning_type
self._has_warned = False
@property
def warning_ty... |
class WarningPrinter:
'''Non-thread safe class that handles printing warning logic.'''
def __init__(self, warning_type: WarningType=WarningType.SUPPRESS) -> None:
pass
@property
def warning_type(self) -> WarningType:
pass
@warning_type.setter
def warning_type(self) -> WarningTy... | 10 | 2 | 4 | 0 | 3 | 2 | 1 | 0.48 | 0 | 2 | 0 | 0 | 7 | 2 | 7 | 7 | 40 | 8 | 25 | 12 | 15 | 12 | 22 | 10 | 14 | 2 | 0 | 1 | 8 |
15,071 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/lockfiles.py | pipenv.vendor.plette.lockfiles.Lockfile | from .models import DataModel, Meta, PackageCollection
import json
class Lockfile(DataModel):
"""Representation of a Pipfile.lock.
"""
__SCHEMA__ = {'_meta': {'type': 'dict', 'required': True}, 'default': {'type': 'dict', 'required': True}, 'develop': {'type': 'dict', 'required': True}}
@classmethod
... |
class Lockfile(DataModel):
'''Representation of a Pipfile.lock.
'''
@classmethod
def validate(cls, data):
pass
@classmethod
def load(cls, f, encoding=None):
pass
@classmethod
def with_meta_from(cls, pipfile, categories=None):
pass
def __getitem__(self, key):... | 27 | 1 | 6 | 0 | 6 | 0 | 2 | 0.02 | 1 | 5 | 3 | 0 | 12 | 0 | 15 | 23 | 123 | 15 | 106 | 36 | 79 | 2 | 76 | 25 | 60 | 7 | 1 | 3 | 33 |
15,072 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/lockfiles.py | pipenv.vendor.plette.lockfiles._LockFileEncoder | import json
class _LockFileEncoder(json.JSONEncoder):
"""A specilized JSON encoder to convert loaded data into a lock file.
This adds a few characteristics to the encoder:
* The JSON is always prettified with indents and spaces.
* The output is always UTF-8-encoded text, never binary, even on Python ... |
class _LockFileEncoder(json.JSONEncoder):
'''A specilized JSON encoder to convert loaded data into a lock file.
This adds a few characteristics to the encoder:
* The JSON is always prettified with indents and spaces.
* The output is always UTF-8-encoded text, never binary, even on Python 2.
'''
... | 4 | 1 | 5 | 0 | 5 | 0 | 2 | 0.29 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 7 | 26 | 4 | 17 | 6 | 13 | 5 | 15 | 6 | 11 | 3 | 2 | 2 | 6 |
15,073 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/base.py | pipenv.vendor.plette.models.base.DataModel | class DataModel:
def __init__(self, data):
self.validate(data)
self._data = data
def __repr__(self):
return '{0}({1!r})'.format(type(self).__name__, self._data)
def __eq__(self, other):
if not isinstance(other, type(self)):
raise TypeError('cannot compare {0!r}... | class DataModel:
def __init__(self, data):
pass
def __repr__(self):
pass
def __eq__(self, other):
pass
def __getitem__(self, key):
pass
def __setitem__(self, key, value):
pass
def __delitem__(self, key):
pass
def get(self, key, default=N... | 10 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 0 | 4 | 1 | 12 | 7 | 1 | 8 | 8 | 45 | 9 | 36 | 12 | 26 | 0 | 31 | 11 | 22 | 7 | 0 | 3 | 16 |
15,074 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/base.py | pipenv.vendor.plette.models.base.DataModelCollection | class DataModelCollection(DataModel):
"""A homogeneous collection of data views.
Subclasses are expected to assign a class attribute `item_class` to specify
the type of items it contains. This class will be used to coerce return
values when accessed. The item class should conform to the `DataModel`
... | class DataModelCollection(DataModel):
'''A homogeneous collection of data views.
Subclasses are expected to assign a class attribute `item_class` to specify
the type of items it contains. This class will be used to coerce return
values when accessed. The item class should conform to the `DataModel`
... | 6 | 1 | 2 | 0 | 2 | 0 | 1 | 0.57 | 1 | 1 | 0 | 2 | 5 | 0 | 5 | 13 | 30 | 8 | 14 | 7 | 8 | 8 | 14 | 7 | 8 | 2 | 1 | 1 | 6 |
15,075 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/base.py | pipenv.vendor.plette.models.base.DataModelMapping | class DataModelMapping(DataModelCollection):
"""A mapping of data views.
The keys are primitive values, while values are instances of `item_class`.
"""
@classmethod
def validate(cls, data):
for d in data.values():
cls.item_class.validate(d)
def __iter__(self):
retu... | class DataModelMapping(DataModelCollection):
'''A mapping of data views.
The keys are primitive values, while values are instances of `item_class`.
'''
@classmethod
def validate(cls, data):
pass
def __iter__(self):
pass
def keys(self):
pass
def values(self)... | 7 | 1 | 2 | 0 | 2 | 0 | 1 | 0.23 | 1 | 0 | 0 | 2 | 4 | 0 | 5 | 18 | 22 | 6 | 13 | 8 | 6 | 3 | 12 | 7 | 6 | 2 | 2 | 1 | 6 |
15,076 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/base.py | pipenv.vendor.plette.models.base.DataModelSequence | class DataModelSequence(DataModelCollection):
"""A sequence of data views.
Each entry is an instance of `item_class`.
"""
@classmethod
def validate(cls, data):
for d in data:
cls.item_class.validate(d)
def __iter__(self):
return (self.item_class(d) for d in self._d... | class DataModelSequence(DataModelCollection):
'''A sequence of data views.
Each entry is an instance of `item_class`.
'''
@classmethod
def validate(cls, data):
pass
def __iter__(self):
pass
def __getitem__(self, key):
pass
def append(self, value):
p... | 6 | 1 | 3 | 0 | 3 | 0 | 2 | 0.2 | 1 | 3 | 0 | 1 | 3 | 0 | 4 | 17 | 23 | 5 | 15 | 7 | 9 | 3 | 14 | 6 | 9 | 2 | 2 | 1 | 7 |
15,077 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/base.py | pipenv.vendor.plette.models.base.DataValidationError | class DataValidationError(ValueError):
pass | class DataValidationError(ValueError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,078 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/hashes.py | pipenv.vendor.plette.models.hashes.Hash | from .base import DataModel, DataValidationError
class Hash(DataModel):
"""A hash.
"""
item_class = 'Hash'
__SCHEMA__ = {}
__OPTIONAL__ = {'name': str, 'md5': str, 'sha256': str, 'digest': str}
def __init__(self, data):
self.validate(data)
self._data = data
if 'name' in... |
class Hash(DataModel):
'''A hash.
'''
def __init__(self, data):
pass
@classmethod
def validate(cls, data):
pass
@classmethod
def from_hash(cls, ins):
'''Interpolation to the hash result of `hashlib`.
'''
pass
@classmethod
def from_line(cls, v... | 12 | 2 | 6 | 0 | 6 | 0 | 2 | 0.08 | 1 | 5 | 1 | 0 | 4 | 3 | 7 | 15 | 66 | 9 | 53 | 20 | 41 | 4 | 39 | 16 | 31 | 5 | 1 | 2 | 16 |
15,079 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/packages.py | pipenv.vendor.plette.models.packages.Package | from .base import DataModel, DataValidationError
import pipenv.vendor.tomlkit as tomlkit
class Package(DataModel):
"""A package requirement specified in a Pipfile.
This is the base class of variants appearing in either `[packages]` or
`[dev-packages]` sections of a Pipfile.
"""
__OPTIONAL__ = {'Pa... |
class Package(DataModel):
'''A package requirement specified in a Pipfile.
This is the base class of variants appearing in either `[packages]` or
`[dev-packages]` sections of a Pipfile.
'''
@classmethod
def validate(cls, data):
pass
def __getattr__(self, key):
pass
def... | 5 | 1 | 8 | 0 | 8 | 0 | 3 | 0.28 | 1 | 8 | 2 | 0 | 2 | 1 | 3 | 11 | 41 | 4 | 29 | 7 | 24 | 8 | 23 | 6 | 19 | 4 | 1 | 2 | 10 |
15,080 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/packages.py | pipenv.vendor.plette.models.packages.PackageSpecfiers | from .base import DataModel, DataValidationError
class PackageSpecfiers(DataModel):
__SCHEMA__ = {}
__OPTIONAL__ = {'editable': bool, 'version': str, 'extras': list} |
class PackageSpecfiers(DataModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.29 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 9 | 0 | 7 | 3 | 6 | 2 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
15,081 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/scripts.py | pipenv.vendor.plette.models.scripts.Script | import re
from .base import DataModel, DataValidationError
import shlex
class Script(DataModel):
"""Parse a script line (in Pipfile's [scripts] section).
This always works in POSIX mode, even on Windows.
"""
__OPTIONAL__ = {'script': (str, list, dict)}
def __init__(self, data):
self.valid... |
class Script(DataModel):
'''Parse a script line (in Pipfile's [scripts] section).
This always works in POSIX mode, even on Windows.
'''
def __init__(self, data):
pass
@classmethod
def validate(cls, data):
pass
def __repr__(self):
pass
@property
def command(... | 10 | 2 | 8 | 1 | 4 | 3 | 2 | 0.61 | 1 | 4 | 1 | 0 | 5 | 1 | 6 | 14 | 65 | 12 | 33 | 14 | 23 | 20 | 24 | 11 | 17 | 4 | 1 | 2 | 12 |
15,082 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.Meta | from .base import DataModel, DataModelSequence, DataModelMapping
class Meta(DataModel):
"""Representation of the `_meta` section in a Pipfile.lock."""
__SCHEMA__ = {'hash': 'dict', 'pipfile-spec': 'integer', 'requires': 'dict', 'sources': 'list'}
@classmethod
def validate(cls, data):
for key, ... |
class Meta(DataModel):
'''Representation of the `_meta` section in a Pipfile.lock.'''
@classmethod
def validate(cls, data):
pass
def __getitem__(self, key):
pass
def __setitem__(self, key, value):
pass
@property
def hash_(self):
pass
@hash_.setter
d... | 25 | 1 | 3 | 0 | 3 | 0 | 1 | 0.02 | 1 | 2 | 0 | 0 | 12 | 0 | 13 | 21 | 67 | 14 | 52 | 28 | 27 | 1 | 35 | 17 | 21 | 2 | 1 | 1 | 16 |
15,083 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.PackageCollection | from .base import DataModel, DataModelSequence, DataModelMapping
from .packages import Package
class PackageCollection(DataModelMapping):
item_class = Package |
class PackageCollection(DataModelMapping):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
15,084 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.Pipenv | from .base import DataModel, DataModelSequence, DataModelMapping
class Pipenv(DataModel):
"""Represent the [pipenv] section in Pipfile"""
__SCHEMA__ = {}
__OPTIONAL__ = {'allow_prereleases': bool} |
class Pipenv(DataModel):
'''Represent the [pipenv] section in Pipfile'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 6 | 0 | 5 | 3 | 4 | 1 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
15,085 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.PipfileSection | from .base import DataModel, DataModelSequence, DataModelMapping
class PipfileSection(DataModel):
"""
Dummy pipfile validator that needs to be completed in a future PR
Hint: many pipfile features are undocumented in pipenv/project.py
"""
@classmethod
def validate(cls, data):
pass |
class PipfileSection(DataModel):
'''
Dummy pipfile validator that needs to be completed in a future PR
Hint: many pipfile features are undocumented in pipenv/project.py
'''
@classmethod
def validate(cls, data):
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 9 | 10 | 2 | 4 | 3 | 1 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
15,086 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.Requires | from .base import DataModel, DataModelSequence, DataModelMapping
class Requires(DataModel):
"""Representation of the `[requires]` section in a Pipfile."""
__SCHEMA__ = {}
__OPTIONAL__ = {'python_version': str, 'python_full_version': str}
@property
def python_version(self):
try:
... |
class Requires(DataModel):
'''Representation of the `[requires]` section in a Pipfile.'''
@property
def python_version(self):
pass
@property
def python_full_version(self):
pass | 5 | 1 | 5 | 0 | 5 | 0 | 2 | 0.06 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 10 | 23 | 4 | 18 | 7 | 13 | 1 | 13 | 5 | 10 | 2 | 1 | 1 | 4 |
15,087 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.ScriptCollection | from .base import DataModel, DataModelSequence, DataModelMapping
from .scripts import Script
class ScriptCollection(DataModelMapping):
item_class = Script |
class ScriptCollection(DataModelMapping):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
15,088 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sections.py | pipenv.vendor.plette.models.sections.SourceCollection | from .base import DataModel, DataModelSequence, DataModelMapping
from .sources import Source
class SourceCollection(DataModelSequence):
item_class = Source |
class SourceCollection(DataModelSequence):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
15,089 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/models/sources.py | pipenv.vendor.plette.models.sources.Source | import os
from .base import DataModel
class Source(DataModel):
"""Information on a "simple" Python package index.
This could be PyPI, or a self-hosted index server, etc. The server
specified by the `url` attribute is expected to provide the "simple"
package API.
"""
__SCHEMA__ = {'name': str, ... |
class Source(DataModel):
'''Information on a "simple" Python package index.
This could be PyPI, or a self-hosted index server, etc. The server
specified by the `url` attribute is expected to provide the "simple"
package API.
'''
@property
def name(self):
pass
@name.setter
de... | 15 | 1 | 2 | 0 | 2 | 0 | 1 | 0.19 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 15 | 40 | 8 | 27 | 16 | 12 | 5 | 16 | 9 | 8 | 1 | 1 | 0 | 7 |
15,090 | pypa/pipenv | pypa_pipenv/pipenv/vendor/plette/pipfiles.py | pipenv.vendor.plette.pipfiles.Pipfile | import hashlib
import pipenv.vendor.tomlkit as tomlkit
from .models import DataModel, Hash, Requires, PipfileSection, Pipenv, PackageCollection, ScriptCollection, SourceCollection
import json
class Pipfile(DataModel):
"""Representation of a Pipfile.
"""
__SCHEMA__ = {}
@classmethod
def validate(cl... |
class Pipfile(DataModel):
'''Representation of a Pipfile.
'''
@classmethod
def validate(cls, data):
pass
@classmethod
def load(cls, f, encoding=None):
pass
def __getitem__(self, key):
pass
def __setitem__(self, key, value):
pass
def get_hash(self):... | 33 | 1 | 6 | 0 | 5 | 1 | 2 | 0.1 | 1 | 6 | 2 | 1 | 16 | 0 | 18 | 26 | 140 | 20 | 109 | 45 | 76 | 11 | 87 | 31 | 68 | 4 | 1 | 2 | 36 |
15,091 | pypa/pipenv | pypa_pipenv/pipenv/vendor/ptyprocess/ptyprocess.py | pipenv.vendor.ptyprocess.ptyprocess.PtyProcess | import sys
import resource
import io
import struct
import time
import errno
import os
from .util import which, PtyProcessError
import signal
from pty import STDIN_FILENO, CHILD
import fcntl
import pty
import termios
class PtyProcess(object):
"""This class represents a process running in a pseudoterminal.
The ... | null | 33 | 23 | 22 | 2 | 12 | 8 | 4 | 0.63 | 1 | 16 | 1 | 1 | 24 | 12 | 28 | 28 | 669 | 101 | 352 | 93 | 317 | 220 | 313 | 81 | 284 | 25 | 1 | 4 | 103 |
15,092 | pypa/pipenv | pypa_pipenv/pipenv/vendor/ptyprocess/ptyprocess.py | pipenv.vendor.ptyprocess.ptyprocess.PtyProcessUnicode | import codecs
class PtyProcessUnicode(PtyProcess):
"""Unicode wrapper around a process running in a pseudoterminal.
This class exposes a similar interface to :class:`PtyProcess`, but its read
methods return unicode, and its :meth:`write` accepts unicode.
"""
if PY3:
string_type = str
e... |
class PtyProcessUnicode(PtyProcess):
'''Unicode wrapper around a process running in a pseudoterminal.
This class exposes a similar interface to :class:`PtyProcess`, but its read
methods return unicode, and its :meth:`write` accepts unicode.
'''
def __init__(self, pid, fd, encoding='utf-8', codec_e... | 5 | 4 | 8 | 1 | 4 | 3 | 1 | 0.89 | 1 | 1 | 0 | 0 | 4 | 3 | 4 | 32 | 44 | 9 | 19 | 12 | 14 | 17 | 18 | 12 | 13 | 1 | 2 | 1 | 4 |
15,093 | pypa/pipenv | pypa_pipenv/pipenv/vendor/ptyprocess/util.py | pipenv.vendor.ptyprocess.util.PtyProcessError | class PtyProcessError(Exception):
"""Generic error class for this package.""" | class PtyProcessError(Exception):
'''Generic error class for this package.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
15,094 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pythonfinder/exceptions.py | pipenv.vendor.pythonfinder.exceptions.InvalidPythonVersion | class InvalidPythonVersion(Exception):
"""Raised when parsing an invalid python version"""
pass | class InvalidPythonVersion(Exception):
'''Raised when parsing an invalid python version'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
15,095 | pypa/pipenv | pypa_pipenv/pipenv/vendor/pythonfinder/pythonfinder.py | pipenv.vendor.pythonfinder.pythonfinder.Finder | from .finders import AsdfFinder, BaseFinder, PyenvFinder, SystemFinder
import os
class Finder:
"""
Main finder class that orchestrates all the finders.
"""
def __init__(self, path: str | None=None, system: bool=False, global_search: bool=True, ignore_unsupported: bool=True, sort_by_path: bool=False):
... |
class Finder:
'''
Main finder class that orchestrates all the finders.
'''
def __init__(self, path: str | None=None, system: bool=False, global_search: bool=True, ignore_unsupported: bool=True, sort_by_path: bool=False):
'''
Initialize a new Finder.
Args:
path: ... | 7 | 5 | 31 | 0 | 29 | 2 | 5 | 0.07 | 0 | 15 | 4 | 0 | 5 | 0 | 6 | 6 | 200 | 8 | 179 | 61 | 144 | 13 | 88 | 32 | 81 | 15 | 0 | 3 | 31 |
15,096 | pypa/pipenv | pypa_pipenv/pipenv/vendor/shellingham/_core.py | pipenv.vendor.shellingham._core.ShellDetectionFailure | class ShellDetectionFailure(EnvironmentError):
pass | class ShellDetectionFailure(EnvironmentError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
15,097 | pypa/pipenv | pypa_pipenv/pipenv/vendor/shellingham/nt.py | pipenv.vendor.shellingham.nt.ProcessEntry32 | import ctypes
from ctypes.wintypes import BOOL, CHAR, DWORD, HANDLE, LONG, LPWSTR, MAX_PATH, PDWORD, ULONG
class ProcessEntry32(ctypes.Structure):
_fields_ = (('dwSize', DWORD), ('cntUsage', DWORD), ('th32ProcessID', DWORD), ('th32DefaultHeapID', ctypes.POINTER(ULONG)), ('th32ModuleID', DWORD), ('cntThreads', DWOR... |
class ProcessEntry32(ctypes.Structure):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0 | 13 | 2 | 12 | 0 | 2 | 2 | 1 | 0 | 0 | 0 | 0 |
15,098 | pypa/pipenv | pypa_pipenv/pipenv/vendor/shellingham/posix/proc.py | pipenv.vendor.shellingham.posix.proc.ProcFormatError | class ProcFormatError(EnvironmentError):
pass | class ProcFormatError(EnvironmentError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
15,099 | pypa/pipenv | pypa_pipenv/pipenv/vendor/shellingham/posix/ps.py | pipenv.vendor.shellingham.posix.ps.PsNotAvailable | class PsNotAvailable(EnvironmentError):
pass | class PsNotAvailable(EnvironmentError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.