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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14,500 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/base.py | pipenv.patched.pip._internal.resolution.resolvelib.base.Candidate | from typing import FrozenSet, Iterable, Optional, Tuple
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.models.link import Link, links_equivalent
from pipenv.patched.pip._vendor.packaging.version import Version
from pipenv.patched.pip._vendor.packaging.utils... |
class Candidate:
@property
def project_name(self) -> NormalizedName:
'''The "project name" of the candidate.
This is different from ``name`` if this candidate contains extras,
in which case ``name`` would contain the ``[...]`` part, while this
refers to the name of the project.... | 16 | 2 | 3 | 0 | 2 | 1 | 1 | 0.36 | 0 | 7 | 4 | 4 | 9 | 0 | 9 | 9 | 44 | 10 | 25 | 16 | 9 | 9 | 19 | 10 | 9 | 1 | 0 | 0 | 9 |
14,501 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/base.py | pipenv.patched.pip._internal.resolution.resolvelib.base.Constraint | from pipenv.patched.pip._vendor.packaging.specifiers import SpecifierSet
from dataclasses import dataclass
from typing import FrozenSet, Iterable, Optional, Tuple
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.models.link import Link, links_equivalent
from ... | @dataclass(frozen=True)
class Constraint:
@classmethod
def empty(cls) -> 'Constraint':
pass
@classmethod
def from_ireq(cls, ireq: InstallRequirement) -> 'Constraint':
pass
def __bool__(self) -> bool:
pass
def __and__(self, other: InstallRequirement) -> 'Constraint':
... | 9 | 0 | 5 | 0 | 4 | 1 | 2 | 0.15 | 0 | 5 | 3 | 0 | 3 | 0 | 5 | 5 | 35 | 5 | 26 | 12 | 18 | 4 | 24 | 10 | 18 | 3 | 0 | 1 | 9 |
14,502 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/base.py | pipenv.patched.pip._internal.resolution.resolvelib.base.Requirement | from pipenv.patched.pip._vendor.packaging.utils import NormalizedName
class Requirement:
@property
def project_name(self) -> NormalizedName:
"""The "project name" of a requirement.
This is different from ``name`` if this requirement contains extras,
in which case ``name`` would contai... |
class Requirement:
@property
def project_name(self) -> NormalizedName:
'''The "project name" of a requirement.
This is different from ``name`` if this requirement contains extras,
in which case ``name`` would contain the ``[...]`` part, while this
refers to the name of the proj... | 8 | 2 | 4 | 0 | 2 | 2 | 1 | 0.69 | 0 | 3 | 0 | 4 | 5 | 0 | 5 | 5 | 28 | 6 | 13 | 8 | 5 | 9 | 11 | 6 | 5 | 1 | 0 | 0 | 5 |
14,503 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates.AlreadyInstalledCandidate | from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._vendor.packaging.version import Version
from pipenv.patched.pip._internal.exceptions import HashError, InstallationSubprocessError, InvalidInstalledPackage, MetadataInconsistent, MetadataInvalid
from .base import Candid... |
class AlreadyInstalledCandidate(Candidate):
def __init__(self, dist: BaseDistribution, template: InstallRequirement, factory: 'Factory') -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __eq__(self, other: object) -> bool:
pass
de... | 17 | 0 | 4 | 0 | 4 | 0 | 1 | 0.08 | 1 | 10 | 6 | 0 | 12 | 4 | 12 | 21 | 69 | 14 | 51 | 31 | 29 | 4 | 42 | 21 | 29 | 4 | 1 | 2 | 17 |
14,504 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates.EditableCandidate | from pipenv.patched.pip._vendor.packaging.version import Version
from pipenv.patched.pip._internal.models.link import Link, links_equivalent
from pipenv.patched.pip._internal.metadata import BaseDistribution
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from typing import TYPE... |
class EditableCandidate(_InstallRequirementBackedCandidate):
def __init__(self, link: Link, template: InstallRequirement, factory: 'Factory', name: Optional[NormalizedName]=None, version: Optional[Version]=None) -> None:
pass
def _prepare_distribution(self) -> BaseDistribution:
pass | 3 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 5 | 4 | 0 | 2 | 0 | 2 | 26 | 22 | 2 | 20 | 11 | 10 | 0 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
14,505 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates.ExtrasCandidate | from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.models.link import Link, links_equivalent
from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast
from pipenv.patched.pip._vendor.packaging.version import Version
from pipenv.pa... |
class ExtrasCandidate(Candidate):
'''A candidate that has 'extras', indicating additional dependencies.
Requirements can be for a project with dependencies, something like
foo[extra]. The extras don't affect the project/version being installed
directly, but indicate that we need additional dependencie... | 21 | 3 | 6 | 0 | 4 | 1 | 1 | 0.53 | 1 | 9 | 4 | 0 | 14 | 3 | 14 | 23 | 122 | 21 | 66 | 36 | 39 | 35 | 43 | 24 | 28 | 4 | 1 | 1 | 19 |
14,506 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates.LinkCandidate | from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.metadata import BaseDistribution
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from pipenv.patched.pip._internal.models.wheel import Wheel
from typing import TYPE_CHEC... |
class LinkCandidate(_InstallRequirementBackedCandidate):
def __init__(self, link: Link, template: InstallRequirement, factory: 'Factory', name: Optional[NormalizedName]=None, version: Optional[Version]=None) -> None:
pass
def _prepare_distribution(self) -> BaseDistribution:
pass | 3 | 0 | 26 | 1 | 23 | 2 | 4 | 0.06 | 1 | 6 | 5 | 0 | 2 | 1 | 2 | 26 | 55 | 4 | 48 | 19 | 38 | 3 | 29 | 11 | 26 | 7 | 2 | 2 | 8 |
14,507 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates.RequiresPythonCandidate | from .base import Candidate, Requirement, format_name
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
import sys
from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast
f... |
class RequiresPythonCandidate(Candidate):
def __init__(self, py_version_info: Optional[Tuple[int, ...]]) -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
@property
def project_name(self) -> NormalizedName:
pass
@property
def nam... | 13 | 0 | 3 | 0 | 3 | 0 | 1 | 0.12 | 1 | 6 | 3 | 0 | 8 | 1 | 8 | 17 | 38 | 9 | 26 | 16 | 14 | 3 | 22 | 13 | 13 | 2 | 1 | 1 | 9 |
14,508 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.candidates._InstallRequirementBackedCandidate | from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast
from pipenv.patched.pip._internal.models.link import Link, links_equivalent
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._vendor.packaging.requirements import InvalidRequiremen... |
class _InstallRequirementBackedCandidate(Candidate):
'''A candidate backed by an ``InstallRequirement``.
This represents a package request with the target not being already
in the environment, and needs to be fetched and installed. The backing
``InstallRequirement`` is responsible for most of the leg w... | 20 | 3 | 7 | 0 | 6 | 1 | 2 | 0.22 | 1 | 17 | 11 | 2 | 15 | 7 | 15 | 24 | 137 | 20 | 96 | 43 | 68 | 21 | 71 | 28 | 55 | 4 | 1 | 1 | 28 |
14,509 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py | pipenv.patched.pip._internal.resolution.resolvelib.factory.CollectedRootRequirements | from .base import Candidate, Constraint, Requirement
from typing import TYPE_CHECKING, Callable, Dict, FrozenSet, Iterable, Iterator, List, Mapping, NamedTuple, Optional, Protocol, Sequence, Set, Tuple, TypeVar, cast
class CollectedRootRequirements(NamedTuple):
requirements: List[Requirement]
constraints: Dict... |
class CollectedRootRequirements(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
14,510 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py | pipenv.patched.pip._internal.resolution.resolvelib.factory.Factory | from pipenv.patched.pip._internal.operations.prepare import RequirementPreparer
from .base import Candidate, Constraint, Requirement
from pipenv.patched.pip._internal.exceptions import DistributionNotFound, InstallationError, InvalidInstalledPackage, MetadataInconsistent, MetadataInvalid, UnsupportedPythonVersion, Unsu... |
class Factory:
def __init__(self, finder: PackageFinder, preparer: RequirementPreparer, make_install_req: InstallRequirementProvider, wheel_cache: Optional[WheelCache], use_user_site: bool, force_reinstall: bool, ignore_installed: bool, ignore_requires_python: bool, py_version_info: Optional[Tuple[int, ...]]=None... | 28 | 6 | 31 | 2 | 24 | 5 | 4 | 0.21 | 0 | 41 | 30 | 0 | 21 | 15 | 21 | 21 | 728 | 69 | 546 | 193 | 435 | 116 | 309 | 107 | 282 | 11 | 0 | 4 | 109 |
14,511 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/found_candidates.py | pipenv.patched.pip._internal.resolution.resolvelib.found_candidates.FoundCandidates | from .base import Candidate
from collections.abc import Sequence
from typing import Any, Callable, Iterator, Optional, Set, Tuple
class FoundCandidates(Sequence[Candidate]):
"""A lazy sequence to provide candidates to the resolver.
The intended usage is to return this from `find_matches()` so the resolver
... |
class FoundCandidates(Sequence[Candidate]):
'''A lazy sequence to provide candidates to the resolver.
The intended usage is to return this from `find_matches()` so the resolver
can iterate through the sequence multiple times, but only access the index
page when remote packages are actually needed. This... | 6 | 1 | 7 | 0 | 6 | 1 | 2 | 0.4 | 1 | 5 | 1 | 0 | 5 | 4 | 5 | 5 | 48 | 6 | 30 | 19 | 17 | 12 | 21 | 12 | 15 | 3 | 1 | 1 | 8 |
14,512 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/provider.py | pipenv.patched.pip._internal.resolution.resolvelib.provider.PipProvider | from functools import lru_cache
from typing import TYPE_CHECKING, Dict, Iterable, Iterator, Mapping, Optional, Sequence, Tuple, TypeVar, Union
import math
from .candidates import REQUIRES_PYTHON_IDENTIFIER
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from .base import Candidate, Constrain... |
class PipProvider(_ProviderBase):
'''Pip's provider implementation for resolvelib.
:params constraints: A mapping of constraints specified by the user. Keys
are canonicalized project names.
:params ignore_dependencies: Whether the user specified ``--no-deps``.
:params upgrade_strategy: The user... | 11 | 4 | 23 | 2 | 16 | 5 | 2 | 0.34 | 1 | 11 | 4 | 0 | 6 | 6 | 7 | 7 | 180 | 22 | 118 | 55 | 86 | 40 | 61 | 31 | 52 | 6 | 1 | 2 | 18 |
14,513 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/reporter.py | pipenv.patched.pip._internal.resolution.resolvelib.reporter.PipDebuggingReporter | from typing import Any, DefaultDict, Optional
from .base import Candidate, Requirement
from pipenv.patched.pip._vendor.resolvelib.reporters import BaseReporter
class PipDebuggingReporter(BaseReporter[Requirement, Candidate, str]):
"""A reporter that does an info log for every event it sees."""
def starting(se... |
class PipDebuggingReporter(BaseReporter[Requirement, Candidate, str]):
'''A reporter that does an info log for every event it sees.'''
def starting(self) -> None:
pass
def starting_round(self, index: int) -> None:
pass
def ending_round(self, index: int, state: Any) -> None:
p... | 8 | 1 | 2 | 0 | 2 | 0 | 1 | 0.06 | 1 | 4 | 2 | 0 | 7 | 0 | 7 | 15 | 24 | 7 | 16 | 8 | 8 | 1 | 16 | 8 | 8 | 1 | 2 | 0 | 7 |
14,514 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/reporter.py | pipenv.patched.pip._internal.resolution.resolvelib.reporter.PipReporter | from typing import Any, DefaultDict, Optional
from pipenv.patched.pip._vendor.resolvelib.reporters import BaseReporter
from collections import defaultdict
from .base import Candidate, Requirement
class PipReporter(BaseReporter[Requirement, Candidate, str]):
def __init__(self) -> None:
self.reject_count_by... |
class PipReporter(BaseReporter[Requirement, Candidate, str]):
def __init__(self) -> None:
pass
def rejecting_candidate(self, criterion: Any, candidate: Candidate) -> None:
pass | 3 | 0 | 21 | 2 | 19 | 1 | 3 | 0.03 | 1 | 4 | 1 | 0 | 2 | 2 | 2 | 10 | 44 | 5 | 38 | 10 | 35 | 1 | 20 | 10 | 17 | 4 | 2 | 2 | 5 |
14,515 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/requirements.py | pipenv.patched.pip._internal.resolution.resolvelib.requirements.ExplicitRequirement | from .base import Candidate, CandidateLookup, Requirement, format_name
from typing import Any, Optional
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
class ExplicitRequirement(Requirement):
def __init__(self, candidate: Candidate) -> None:
self.candidate = candid... |
class ExplicitRequirement(Requirement):
def __init__(self, candidate: Candidate) -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __hash__(self) -> int:
pass
def __eq__(self, other: Any) -> bool:
pass
@property
def... | 13 | 0 | 2 | 0 | 2 | 0 | 1 | 0.08 | 1 | 5 | 1 | 0 | 10 | 1 | 10 | 15 | 36 | 9 | 25 | 14 | 12 | 2 | 23 | 12 | 12 | 2 | 1 | 1 | 11 |
14,516 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/requirements.py | pipenv.patched.pip._internal.resolution.resolvelib.requirements.RequiresPythonRequirement | from pipenv.patched.pip._vendor.packaging.specifiers import SpecifierSet
from typing import Any, Optional
from .base import Candidate, CandidateLookup, Requirement, format_name
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
class RequiresPythonRequirement(Requirement):
"""... |
class RequiresPythonRequirement(Requirement):
'''A requirement representing Requires-Python metadata.'''
def __init__(self, specifier: SpecifierSet, match: Candidate) -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __hash__(self) -> int:
... | 13 | 1 | 4 | 0 | 3 | 0 | 1 | 0.14 | 1 | 6 | 2 | 0 | 10 | 4 | 10 | 15 | 52 | 11 | 37 | 17 | 24 | 5 | 32 | 15 | 21 | 2 | 1 | 1 | 13 |
14,517 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/requirements.py | pipenv.patched.pip._internal.resolution.resolvelib.requirements.SpecifierRequirement | from typing import Any, Optional
from .base import Candidate, CandidateLookup, Requirement, format_name
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
class SpecifierRequirement(Requirement):
def ... |
class SpecifierRequirement(Requirement):
def __init__(self, ireq: InstallRequirement) -> None:
pass
@property
def _equal(self) -> str:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __eq__(self, other: object) -> bool:
pass
... | 15 | 0 | 5 | 0 | 4 | 1 | 1 | 0.14 | 1 | 7 | 2 | 1 | 11 | 4 | 11 | 16 | 70 | 13 | 50 | 21 | 35 | 7 | 43 | 18 | 31 | 3 | 1 | 1 | 16 |
14,518 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/requirements.py | pipenv.patched.pip._internal.resolution.resolvelib.requirements.SpecifierWithoutExtrasRequirement | from typing import Any, Optional
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.req.constructors import install_req_drop_extras
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
class SpecifierWithoutExtrasRequirement... |
class SpecifierWithoutExtrasRequirement(SpecifierRequirement):
'''
Requirement backed by an install requirement on a base package.
Trims extras from its install requirement if there are any.
'''
def __init__(self, ireq: InstallRequirement) -> None:
pass
@property
def _equal(self) -... | 6 | 1 | 6 | 1 | 5 | 0 | 2 | 0.18 | 1 | 6 | 1 | 0 | 4 | 4 | 4 | 20 | 32 | 6 | 22 | 10 | 16 | 4 | 21 | 9 | 16 | 2 | 2 | 1 | 7 |
14,519 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/requirements.py | pipenv.patched.pip._internal.resolution.resolvelib.requirements.UnsatisfiableRequirement | from .base import Candidate, CandidateLookup, Requirement, format_name
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
class UnsatisfiableRequirement(Requirement):
"""A requirement that cannot be satisfied."""
def __init__(self, name: NormalizedName) -> None:
s... |
class UnsatisfiableRequirement(Requirement):
'''A requirement that cannot be satisfied.'''
def __init__(self, name: NormalizedName) -> None:
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def __eq__(self, other: object) -> bool:
pass
def... | 13 | 1 | 2 | 0 | 2 | 0 | 1 | 0.04 | 1 | 5 | 1 | 0 | 10 | 1 | 10 | 15 | 36 | 10 | 25 | 14 | 12 | 1 | 23 | 12 | 12 | 2 | 1 | 1 | 11 |
14,520 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/resolvelib/resolver.py | pipenv.patched.pip._internal.resolution.resolvelib.resolver.Resolver | from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.req.constructors import install_req_extend_extras
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, cast
from .base import Candidate, Requirement
import os
import functools
from pipenv.patched... |
class Resolver(BaseResolver):
def __init__(self, preparer: RequirementPreparer, finder: PackageFinder, wheel_cache: Optional[WheelCache], make_install_req: InstallRequirementProvider, use_user_site: bool, ignore_dependencies: bool, ignore_installed: bool, ignore_requires_python: bool, force_reinstall: bool, upgra... | 4 | 1 | 57 | 5 | 43 | 9 | 6 | 0.21 | 1 | 21 | 13 | 0 | 3 | 4 | 3 | 5 | 177 | 17 | 132 | 46 | 111 | 28 | 61 | 27 | 57 | 14 | 1 | 4 | 17 |
14,521 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/self_outdated_check.py | pipenv.patched.pip._internal.self_outdated_check.SelfCheckState | from pipenv.patched.pip._internal.utils.misc import ExternallyManagedEnvironment, check_externally_managed, ensure_dir
from pipenv.patched.pip._internal.utils.filesystem import adjacent_tmp_file, check_path_owner, replace
import sys
import datetime
from typing import Any, Callable, Dict, Optional
import json
import os.... |
class SelfCheckState:
def __init__(self, cache_dir: str) -> None:
pass
@property
def key(self) -> str:
pass
def get(self, current_time: datetime.datetime) -> Optional[str]:
'''Check if we have a not-outdated version loaded already.'''
pass
def set(self, pypi_versi... | 6 | 1 | 17 | 3 | 11 | 4 | 3 | 0.3 | 0 | 6 | 0 | 0 | 4 | 2 | 4 | 4 | 74 | 14 | 46 | 14 | 40 | 14 | 39 | 11 | 34 | 5 | 0 | 3 | 13 |
14,522 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/self_outdated_check.py | pipenv.patched.pip._internal.self_outdated_check.UpgradePrompt | from pipenv.patched.pip._internal.utils.entrypoints import get_best_invocation_for_this_pip, get_best_invocation_for_this_python
from pipenv.patched.pip._internal.utils.compat import WINDOWS
from pipenv.patched.pip._vendor.rich.console import Group
from dataclasses import dataclass
from pipenv.patched.pip._vendor.rich.... | @dataclass
class UpgradePrompt:
def __rich__(self) -> Group:
pass | 3 | 0 | 18 | 1 | 17 | 0 | 2 | 0 | 0 | 2 | 2 | 0 | 1 | 0 | 1 | 1 | 22 | 2 | 20 | 4 | 18 | 0 | 9 | 4 | 7 | 2 | 0 | 1 | 2 |
14,523 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/_log.py | pipenv.patched.pip._internal.utils._log.VerboseLogger | import logging
from typing import Any, cast
class VerboseLogger(logging.Logger):
"""Custom Logger, defining a verbose log-level
VERBOSE is between INFO and DEBUG.
"""
def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None:
return self.log(VERBOSE, msg, *args, **kwargs) |
class VerboseLogger(logging.Logger):
'''Custom Logger, defining a verbose log-level
VERBOSE is between INFO and DEBUG.
'''
def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 8 | 2 | 3 | 2 | 1 | 3 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
14,524 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/hashes.py | pipenv.patched.pip._internal.utils.hashes.Hashes | from pipenv.patched.pip._internal.utils.misc import read_chunks
from typing import TYPE_CHECKING, BinaryIO, Dict, Iterable, List, NoReturn, Optional
import hashlib
from pipenv.patched.pip._internal.exceptions import HashMismatch, HashMissing, InstallationError
class Hashes:
"""A wrapper that builds multiple hashes... |
class Hashes:
'''A wrapper that builds multiple hashes at once and checks them against
known-good values
'''
def __init__(self, hashes: Optional[Dict[str, List[str]]]=None) -> None:
'''
:param hashes: A dict of algorithm names pointing to lists of allowed
hex digests
... | 14 | 7 | 8 | 1 | 5 | 2 | 2 | 0.31 | 0 | 8 | 0 | 1 | 12 | 1 | 12 | 12 | 109 | 21 | 67 | 27 | 53 | 21 | 58 | 24 | 45 | 7 | 0 | 2 | 28 |
14,525 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/hashes.py | pipenv.patched.pip._internal.utils.hashes.MissingHashes | from typing import TYPE_CHECKING, BinaryIO, Dict, Iterable, List, NoReturn, Optional
from pipenv.patched.pip._internal.exceptions import HashMismatch, HashMissing, InstallationError
class MissingHashes(Hashes):
"""A workalike for Hashes used when we're missing a hash for a requirement
It computes the actual h... |
class MissingHashes(Hashes):
'''A workalike for Hashes used when we're missing a hash for a requirement
It computes the actual hash of the requirement and raises a HashMissing
exception showing it to the user.
'''
def __init__(self) -> None:
'''Don't offer the ``hashes`` kwarg.'''
... | 3 | 2 | 4 | 0 | 2 | 2 | 1 | 1.4 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 14 | 16 | 4 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
14,526 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.BetterRotatingFileHandler | from pipenv.patched.pip._internal.utils.misc import ensure_dir
from io import TextIOWrapper
import os
import logging
import logging.handlers
class BetterRotatingFileHandler(logging.handlers.RotatingFileHandler):
def _open(self) -> TextIOWrapper:
ensure_dir(os.path.dirname(self.baseFilename))
retur... |
class BetterRotatingFileHandler(logging.handlers.RotatingFileHandler):
def _open(self) -> TextIOWrapper:
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 38 | 4 | 0 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 7 | 0 | 1 |
14,527 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.BrokenStdoutLoggingError | class BrokenStdoutLoggingError(Exception):
"""
Raised if BrokenPipeError occurs for the stdout stream while logging.
""" | class BrokenStdoutLoggingError(Exception):
'''
Raised if BrokenPipeError occurs for the stdout stream while logging.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 0 | 1 | 1 | 0 | 3 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
14,528 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.ExcludeLoggerFilter | import logging.handlers
import logging
from logging import Filter
class ExcludeLoggerFilter(Filter):
"""
A logging Filter that excludes records from a logger (or its children).
"""
def filter(self, record: logging.LogRecord) -> bool:
return not super().filter(record) |
class ExcludeLoggerFilter(Filter):
'''
A logging Filter that excludes records from a logger (or its children).
'''
def filter(self, record: logging.LogRecord) -> bool:
pass | 2 | 1 | 4 | 0 | 2 | 2 | 1 | 1.67 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 3 | 9 | 1 | 3 | 2 | 1 | 5 | 3 | 2 | 1 | 1 | 2 | 0 | 1 |
14,529 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.IndentedRenderable | from dataclasses import dataclass
from pipenv.patched.pip._vendor.rich.segment import Segment
from pipenv.patched.pip._vendor.rich.console import Console, ConsoleOptions, ConsoleRenderable, RenderableType, RenderResult, RichCast
@dataclass
class IndentedRenderable:
renderable: RenderableType
indent: int
d... | @dataclass
class IndentedRenderable:
def __rich_console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
pass | 3 | 0 | 9 | 0 | 9 | 0 | 2 | 0 | 0 | 3 | 3 | 0 | 1 | 0 | 1 | 1 | 13 | 1 | 12 | 7 | 8 | 0 | 10 | 5 | 8 | 2 | 0 | 1 | 2 |
14,530 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.IndentingFormatter | import logging.handlers
from typing import Any, ClassVar, Generator, List, Optional, Type
import logging
from pipenv.patched.pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX
class IndentingFormatter(logging.Formatter):
default_time_format = '%Y-%m-%dT%H:%M:%S'
def __init__(self, *args: Any, add_t... |
class IndentingFormatter(logging.Formatter):
def __init__(self, *args: Any, add_timestamp: bool=False, **kwargs: Any) -> None:
'''
A logging.Formatter that obeys the indent_log() context manager.
:param add_timestamp: A bool indicating output lines should be prefixed
with their... | 4 | 3 | 15 | 1 | 9 | 5 | 2 | 0.54 | 1 | 6 | 0 | 0 | 3 | 1 | 3 | 10 | 49 | 6 | 28 | 14 | 19 | 15 | 23 | 9 | 19 | 4 | 2 | 1 | 7 |
14,531 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.MaxLevelFilter | import logging.handlers
from logging import Filter
import logging
class MaxLevelFilter(Filter):
def __init__(self, level: int) -> None:
self.level = level
def filter(self, record: logging.LogRecord) -> bool:
return record.levelno < self.level |
class MaxLevelFilter(Filter):
def __init__(self, level: int) -> None:
pass
def filter(self, record: logging.LogRecord) -> bool:
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 2 | 1 | 2 | 4 | 6 | 1 | 5 | 4 | 2 | 0 | 5 | 4 | 2 | 1 | 2 | 0 | 2 |
14,532 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/logging.py | pipenv.patched.pip._internal.utils.logging.RichPipStreamHandler | import sys
from pipenv.patched.pip._vendor.rich.style import Style
import logging.handlers
from typing import Any, ClassVar, Generator, List, Optional, Type
from pipenv.patched.pip._vendor.rich.logging import RichHandler
import logging
from pipenv.patched.pip._vendor.rich.highlighter import NullHighlighter
from pipenv.... |
class RichPipStreamHandler(RichHandler):
def __init__(self, console: Console) -> None:
pass
def emit(self, record: logging.LogRecord) -> None:
pass
def handleError(self, record: logging.LogRecord) -> None:
'''Called when logging is unable to log some output.'''
pass | 4 | 1 | 17 | 2 | 14 | 2 | 3 | 0.16 | 1 | 14 | 7 | 0 | 3 | 0 | 3 | 28 | 58 | 8 | 43 | 10 | 39 | 7 | 26 | 10 | 22 | 6 | 4 | 3 | 9 |
14,533 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/misc.py | pipenv.patched.pip._internal.utils.misc.ConfiguredBuildBackendHookCaller | from pipenv.patched.pip._vendor.pyproject_hooks import BuildBackendHookCaller
from typing import Any, BinaryIO, Callable, Generator, Iterable, Iterator, List, Mapping, Optional, Sequence, TextIO, Tuple, Type, TypeVar, Union, cast
class ConfiguredBuildBackendHookCaller(BuildBackendHookCaller):
def __init__(self, c... |
class ConfiguredBuildBackendHookCaller(BuildBackendHookCaller):
def __init__(self, config_holder: Any, source_dir: str, build_backend: str, backend_path: Optional[str]=None, runner: Optional[Callable[..., None]]=None, python_executable: Optional[str]=None):
pass
def build_wheel(self, wheel_directory:... | 10 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 9 | 1 | 9 | 21 | 88 | 8 | 80 | 57 | 32 | 0 | 28 | 19 | 18 | 1 | 1 | 0 | 9 |
14,534 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/misc.py | pipenv.patched.pip._internal.utils.misc.HiddenText | from typing import Any, BinaryIO, Callable, Generator, Iterable, Iterator, List, Mapping, Optional, Sequence, TextIO, Tuple, Type, TypeVar, Union, cast
from dataclasses import dataclass
@dataclass(frozen=True)
class HiddenText:
secret: str
redacted: str
def __repr__(self) -> str:
return f'<HiddenT... | @dataclass(frozen=True)
class HiddenText:
def __repr__(self) -> str:
pass
def __str__(self) -> str:
pass
def __eq__(self, other: Any) -> bool:
pass | 5 | 0 | 4 | 0 | 3 | 1 | 1 | 0.27 | 0 | 4 | 0 | 0 | 3 | 0 | 3 | 3 | 18 | 4 | 11 | 4 | 7 | 3 | 11 | 4 | 7 | 2 | 0 | 1 | 4 |
14,535 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/misc.py | pipenv.patched.pip._internal.utils.misc.StreamWrapper | from io import StringIO
from typing import Any, BinaryIO, Callable, Generator, Iterable, Iterator, List, Mapping, Optional, Sequence, TextIO, Tuple, Type, TypeVar, Union, cast
class StreamWrapper(StringIO):
orig_stream: TextIO
@classmethod
def from_stream(cls, orig_stream: TextIO) -> 'StreamWrapper':
... |
class StreamWrapper(StringIO):
@classmethod
def from_stream(cls, orig_stream: TextIO) -> 'StreamWrapper':
pass
@property
def encoding(self) -> str:
pass | 5 | 0 | 3 | 0 | 3 | 1 | 1 | 0.3 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 2 | 14 | 2 | 10 | 6 | 5 | 3 | 8 | 4 | 5 | 1 | 1 | 0 | 2 |
14,536 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/temp_dir.py | pipenv.patched.pip._internal.utils.temp_dir.AdjacentTempDirectory | import tempfile
from typing import Any, Callable, Dict, Generator, List, Optional, TypeVar, Union
import errno
import itertools
import os.path
class AdjacentTempDirectory(TempDirectory):
"""Helper class that creates a temporary directory adjacent to a real one.
Attributes:
original
The ori... |
class AdjacentTempDirectory(TempDirectory):
'''Helper class that creates a temporary directory adjacent to a real one.
Attributes:
original
The original directory to create a temp directory for.
path
After calling create() or entering, contains the full
path ... | 5 | 2 | 15 | 1 | 11 | 3 | 4 | 0.68 | 1 | 6 | 0 | 0 | 2 | 1 | 3 | 10 | 71 | 9 | 37 | 14 | 32 | 25 | 32 | 12 | 28 | 7 | 1 | 3 | 12 |
14,537 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/temp_dir.py | pipenv.patched.pip._internal.utils.temp_dir.TempDirectory | from pipenv.patched.pip._internal.utils.misc import enum, rmtree
import tempfile
from typing import Any, Callable, Dict, Generator, List, Optional, TypeVar, Union
import traceback
import os.path
from pathlib import Path
class TempDirectory:
"""Helper class that owns and cleans up a temporary directory.
This c... |
class TempDirectory:
'''Helper class that owns and cleans up a temporary directory.
This class can be used as a context manager or as an OO representation of a
temporary directory.
Attributes:
path
Location to the created temporary directory
delete
Whether the di... | 10 | 4 | 15 | 1 | 12 | 2 | 3 | 0.38 | 0 | 9 | 1 | 1 | 7 | 5 | 7 | 7 | 131 | 19 | 82 | 30 | 61 | 31 | 55 | 18 | 46 | 5 | 0 | 2 | 20 |
14,538 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/temp_dir.py | pipenv.patched.pip._internal.utils.temp_dir.TempDirectoryTypeRegistry | from typing import Any, Callable, Dict, Generator, List, Optional, TypeVar, Union
class TempDirectoryTypeRegistry:
"""Manages temp directory behavior"""
def __init__(self) -> None:
self._should_delete: Dict[str, bool] = {}
def set_delete(self, kind: str, value: bool) -> None:
"""Indicate ... |
class TempDirectoryTypeRegistry:
'''Manages temp directory behavior'''
def __init__(self) -> None:
pass
def set_delete(self, kind: str, value: bool) -> None:
'''Indicate whether a TempDirectory of the given kind should be
auto-deleted.
'''
pass
def get_delete(... | 4 | 3 | 4 | 0 | 2 | 2 | 1 | 1 | 0 | 2 | 0 | 0 | 3 | 1 | 3 | 3 | 17 | 3 | 7 | 5 | 3 | 7 | 7 | 5 | 3 | 1 | 0 | 0 | 3 |
14,539 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/utils/temp_dir.py | pipenv.patched.pip._internal.utils.temp_dir._Default | class _Default:
pass | class _Default:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
14,540 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/bazaar.py | pipenv.patched.pip._internal.vcs.bazaar.Bazaar | from pipenv.patched.pip._internal.utils.misc import HiddenText, display_path
from typing import List, Optional, Tuple
from pipenv.patched.pip._internal.utils.subprocess import make_command
from pipenv.patched.pip._internal.utils.urls import path_to_url
from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInf... |
class Bazaar(VersionControl):
@staticmethod
def get_base_rev_args(rev: str) -> List[str]:
pass
def fetch_new(self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int) -> None:
pass
def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
... | 14 | 1 | 8 | 0 | 8 | 1 | 2 | 0.05 | 1 | 6 | 2 | 0 | 3 | 0 | 8 | 33 | 92 | 9 | 79 | 31 | 63 | 4 | 46 | 24 | 37 | 5 | 1 | 4 | 16 |
14,541 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/git.py | pipenv.patched.pip._internal.vcs.git.Git | from pipenv.patched.pip._internal.utils.misc import HiddenText, display_path, hide_url
import os.path
import pathlib
import urllib.request
from dataclasses import replace
from pipenv.patched.pip._internal.utils.subprocess import make_command
import re
from typing import Any, List, Optional, Tuple
from pipenv.patched.pi... |
class Git(VersionControl):
@staticmethod
def get_base_rev_args(rev: str) -> List[str]:
pass
@classmethod
def run_command(cls, *args: Any, **kwargs: Any) -> str:
pass
def is_immutable_rev_checkout(self, url: str, dest: str) -> bool:
pass
def get_git_version(self) -> Tu... | 38 | 11 | 21 | 2 | 14 | 5 | 3 | 0.36 | 1 | 10 | 3 | 0 | 5 | 0 | 20 | 45 | 465 | 54 | 302 | 86 | 262 | 109 | 188 | 67 | 167 | 8 | 1 | 3 | 59 |
14,542 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/mercurial.py | pipenv.patched.pip._internal.vcs.mercurial.Mercurial | from typing import List, Optional, Tuple
from pipenv.patched.pip._internal.utils.subprocess import make_command
from pipenv.patched.pip._internal.vcs.versioncontrol import RevOptions, VersionControl, find_path_to_project_root_from_repo_root, vcs
from pipenv.patched.pip._internal.utils.misc import HiddenText, display_pa... |
class Mercurial(VersionControl):
@staticmethod
def get_base_rev_args(rev: str) -> List[str]:
pass
def fetch_new(self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int) -> None:
pass
def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
... | 18 | 4 | 11 | 0 | 10 | 1 | 2 | 0.11 | 1 | 8 | 1 | 0 | 3 | 0 | 10 | 35 | 141 | 10 | 118 | 38 | 98 | 13 | 64 | 27 | 53 | 4 | 1 | 2 | 19 |
14,543 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/subversion.py | pipenv.patched.pip._internal.vcs.subversion.Subversion | from typing import List, Optional, Tuple
import os
from pipenv.patched.pip._internal.utils.misc import HiddenText, display_path, is_console_interactive, is_installable_dir, split_auth_from_netloc
from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInfo, RemoteNotFoundError, RevOptions, VersionControl, vcs
f... | null | 26 | 6 | 16 | 2 | 11 | 5 | 3 | 0.4 | 1 | 11 | 3 | 0 | 7 | 2 | 16 | 41 | 292 | 40 | 184 | 68 | 151 | 74 | 132 | 52 | 114 | 7 | 1 | 2 | 41 |
14,544 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/versioncontrol.py | pipenv.patched.pip._internal.vcs.versioncontrol.RemoteNotValidError | class RemoteNotValidError(Exception):
def __init__(self, url: str):
super().__init__(url)
self.url = url | class RemoteNotValidError(Exception):
def __init__(self, url: str):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 11 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
14,545 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/versioncontrol.py | pipenv.patched.pip._internal.vcs.versioncontrol.RevOptions | from typing import Any, Dict, Iterable, Iterator, List, Literal, Mapping, Optional, Tuple, Type, Union
from dataclasses import dataclass, field
from pipenv.patched.pip._internal.utils.subprocess import CommandArgs, call_subprocess, format_command_args, make_command
@dataclass(frozen=True)
class RevOptions:
"""
... | @dataclass(frozen=True)
class RevOptions:
'''
Encapsulates a VCS-specific revision to install, along with any VCS
install options.
Args:
vc_class: a VersionControl subclass.
rev: the name of the revision to install.
extra_args: a list of extra options.
'''
def __repr__(s... | 8 | 3 | 6 | 1 | 4 | 2 | 2 | 0.64 | 0 | 1 | 0 | 0 | 5 | 0 | 5 | 5 | 52 | 11 | 25 | 12 | 18 | 16 | 24 | 11 | 18 | 2 | 0 | 1 | 8 |
14,546 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/versioncontrol.py | pipenv.patched.pip._internal.vcs.versioncontrol.VcsSupport | from typing import Any, Dict, Iterable, Iterator, List, Literal, Mapping, Optional, Tuple, Type, Union
import urllib.parse
class VcsSupport:
_registry: Dict[str, 'VersionControl'] = {}
schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp', 'svn']
def __init__(self) -> None:
urllib.parse.uses_netloc.extend(... |
class VcsSupport:
def __init__(self) -> None:
pass
def __iter__(self) -> Iterator[str]:
pass
@property
def backends(self) -> List['VersionControl']:
pass
@property
def dirnames(self) -> List[str]:
pass
@property
def all_schemes(self) -> List[str]:
... | 14 | 3 | 6 | 0 | 4 | 2 | 2 | 0.32 | 0 | 3 | 0 | 0 | 10 | 0 | 10 | 10 | 78 | 12 | 50 | 23 | 36 | 16 | 47 | 20 | 36 | 4 | 0 | 2 | 19 |
14,547 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/vcs/versioncontrol.py | pipenv.patched.pip._internal.vcs.versioncontrol.VersionControl | from pipenv.patched.pip._internal.utils.subprocess import CommandArgs, call_subprocess, format_command_args, make_command
from pipenv.patched.pip._internal.cli.spinners import SpinnerInterface
from pipenv.patched.pip._internal.exceptions import BadCommand, InstallationError
import shutil
from typing import Any, Dict, I... |
class VersionControl:
@classmethod
def should_add_vcs_url_prefix(cls, remote_url: str) -> bool:
'''
Return whether the vcs prefix (e.g. "git+") should be added to a
repository's remote url when used in a requirement.
'''
pass
@classmethod
def get_subdirectory(cl... | 44 | 25 | 15 | 1 | 8 | 6 | 2 | 0.64 | 0 | 11 | 2 | 4 | 7 | 0 | 25 | 25 | 434 | 57 | 232 | 89 | 168 | 148 | 132 | 51 | 106 | 9 | 0 | 3 | 44 |
14,548 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/adapter.py | pipenv.patched.pip._vendor.cachecontrol.adapter.CacheControlAdapter | import weakref
from pipenv.patched.pip._vendor.cachecontrol.cache import DictCache
from pipenv.patched.pip._vendor.requests.adapters import HTTPAdapter
import functools
from pipenv.patched.pip._vendor.cachecontrol.filewrapper import CallbackFileWrapper
from pipenv.patched.pip._vendor.cachecontrol.controller import PERM... |
class CacheControlAdapter(HTTPAdapter):
def __init__(self, cache: BaseCache | None=None, cache_etags: bool=True, controller_class: type[CacheController] | None=None, serializer: Serializer | None=None, heuristic: BaseHeuristic | None=None, cacheable_methods: Collection[str] | None=None, *args: Any, **kw: Any) -> ... | 6 | 2 | 27 | 3 | 18 | 7 | 3 | 0.37 | 1 | 20 | 9 | 1 | 4 | 4 | 4 | 22 | 136 | 20 | 90 | 45 | 59 | 33 | 52 | 20 | 46 | 8 | 2 | 3 | 17 |
14,549 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/cache.py | pipenv.patched.pip._vendor.cachecontrol.cache.BaseCache | class BaseCache:
def get(self, key: str) -> bytes | None:
raise NotImplementedError()
def set(self, key: str, value: bytes, expires: int | datetime | None=None) -> None:
raise NotImplementedError()
def delete(self, key: str) -> None:
raise NotImplementedError()
def close(self... | class BaseCache:
def get(self, key: str) -> bytes | None:
pass
def set(self, key: str, value: bytes, expires: int | datetime | None=None) -> None:
pass
def delete(self, key: str) -> None:
pass
def close(self) -> None:
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 5 | 0 | 4 | 4 | 0 | 4 | 4 | 14 | 3 | 11 | 7 | 4 | 0 | 9 | 5 | 4 | 1 | 0 | 0 | 4 |
14,550 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/cache.py | pipenv.patched.pip._vendor.cachecontrol.cache.DictCache | from threading import Lock
from typing import IO, TYPE_CHECKING, MutableMapping
class DictCache(BaseCache):
def __init__(self, init_dict: MutableMapping[str, bytes] | None=None) -> None:
self.lock = Lock()
self.data = init_dict or {}
def get(self, key: str) -> bytes | None:
return sel... |
class DictCache(BaseCache):
def __init__(self, init_dict: MutableMapping[str, bytes] | None=None) -> None:
pass
def get(self, key: str) -> bytes | None:
pass
def set(self, key: str, value: bytes, expires: int | datetime | None=None) -> None:
pass
def delete(self, key: str) -... | 5 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 4 | 2 | 4 | 8 | 18 | 3 | 15 | 9 | 8 | 0 | 13 | 7 | 8 | 2 | 1 | 2 | 5 |
14,551 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/cache.py | pipenv.patched.pip._vendor.cachecontrol.cache.SeparateBodyBaseCache | from typing import IO, TYPE_CHECKING, MutableMapping
class SeparateBodyBaseCache(BaseCache):
"""
In this variant, the body is not stored mixed in with the metadata, but is
passed in (as a bytes-like object) in a separate call to ``set_body()``.
That is, the expected interaction pattern is::
c... |
class SeparateBodyBaseCache(BaseCache):
'''
In this variant, the body is not stored mixed in with the metadata, but is
passed in (as a bytes-like object) in a separate call to ``set_body()``.
That is, the expected interaction pattern is::
cache.set(key, serialized_metadata)
cache.set_bo... | 3 | 2 | 4 | 0 | 2 | 2 | 1 | 2.2 | 1 | 4 | 0 | 2 | 2 | 0 | 2 | 6 | 21 | 5 | 5 | 3 | 2 | 11 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
14,552 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/caches/file_cache.py | pipenv.patched.pip._vendor.cachecontrol.caches.file_cache.FileCache | from pipenv.patched.pip._vendor.cachecontrol.cache import BaseCache, SeparateBodyBaseCache
class FileCache(_FileCacheMixin, BaseCache):
"""
Traditional FileCache: body is stored in memory, so not suitable for large
downloads.
"""
def delete(self, key: str) -> None:
self._delete(key, '') |
class FileCache(_FileCacheMixin, BaseCache):
'''
Traditional FileCache: body is stored in memory, so not suitable for large
downloads.
'''
def delete(self, key: str) -> None:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 1.33 | 2 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 8 | 1 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
14,553 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/caches/file_cache.py | pipenv.patched.pip._vendor.cachecontrol.caches.file_cache.SeparateBodyFileCache | from typing import IO, TYPE_CHECKING
from pipenv.patched.pip._vendor.cachecontrol.cache import BaseCache, SeparateBodyBaseCache
class SeparateBodyFileCache(_FileCacheMixin, SeparateBodyBaseCache):
"""
Memory-efficient FileCache: body is stored in a separate file, reducing
peak memory usage.
"""
de... |
class SeparateBodyFileCache(_FileCacheMixin, SeparateBodyBaseCache):
'''
Memory-efficient FileCache: body is stored in a separate file, reducing
peak memory usage.
'''
def get_body(self, key: str) -> IO[bytes] | None:
pass
def set_body(self, key: str, body: bytes) -> None:
pas... | 4 | 1 | 4 | 0 | 4 | 0 | 1 | 0.31 | 2 | 4 | 0 | 0 | 3 | 0 | 3 | 16 | 20 | 3 | 13 | 6 | 9 | 4 | 13 | 6 | 9 | 2 | 2 | 1 | 4 |
14,554 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/caches/file_cache.py | pipenv.patched.pip._vendor.cachecontrol.caches.file_cache._FileCacheMixin | import hashlib
import os
import tempfile
from pathlib import Path
from textwrap import dedent
class _FileCacheMixin:
"""Shared implementation for both FileCache variants."""
def __init__(self, directory: str | Path, forever: bool=False, filemode: int=384, dirmode: int=448, lock_class: type[BaseFileLock] | Non... |
class _FileCacheMixin:
'''Shared implementation for both FileCache variants.'''
def __init__(self, directory: str | Path, forever: bool=False, filemode: int=384, dirmode: int=448, lock_class: type[BaseFileLock] | None=None) -> None:
pass
@staticmethod
def encode(x: str) -> str:
pass
... | 9 | 2 | 10 | 1 | 8 | 1 | 2 | 0.13 | 0 | 12 | 0 | 2 | 6 | 5 | 7 | 7 | 80 | 11 | 61 | 32 | 42 | 8 | 45 | 20 | 36 | 3 | 0 | 2 | 13 |
14,555 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/caches/redis_cache.py | pipenv.patched.pip._vendor.cachecontrol.caches.redis_cache.RedisCache | from pipenv.patched.pip._vendor.cachecontrol.cache import BaseCache
from datetime import datetime, timezone
class RedisCache(BaseCache):
def __init__(self, conn: Redis[bytes]) -> None:
self.conn = conn
def get(self, key: str) -> bytes | None:
return self.conn.get(key)
def set(self, key: ... |
class RedisCache(BaseCache):
def __init__(self, conn: Redis[bytes]) -> None:
pass
def get(self, key: str) -> bytes | None:
pass
def set(self, key: str, value: bytes, expires: int | datetime | None=None) -> None:
pass
def delete(self, key: str) -> None:
pass
def ... | 7 | 2 | 5 | 0 | 4 | 1 | 2 | 0.12 | 1 | 5 | 0 | 0 | 6 | 1 | 6 | 10 | 33 | 5 | 25 | 13 | 16 | 3 | 21 | 11 | 14 | 4 | 1 | 2 | 10 |
14,556 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/controller.py | pipenv.patched.pip._vendor.cachecontrol.controller.CacheController | from typing import TYPE_CHECKING, Collection, Mapping
import weakref
import time
from email.utils import parsedate_tz
from pipenv.patched.pip._vendor.requests.structures import CaseInsensitiveDict
from pipenv.patched.pip._vendor.cachecontrol.cache import DictCache, SeparateBodyBaseCache
import calendar
from pipenv.patc... |
class CacheController:
'''An interface to see if request should cached or not.'''
def __init__(self, cache: BaseCache | None=None, cache_etags: bool=True, serializer: Serializer | None=None, status_codes: Collection[int] | None=None):
pass
@classmethod
def _urlnorm(cls, uri: str) -> str:
... | 13 | 7 | 44 | 6 | 30 | 9 | 6 | 0.29 | 0 | 16 | 7 | 0 | 8 | 4 | 10 | 10 | 452 | 65 | 300 | 84 | 266 | 87 | 205 | 61 | 194 | 18 | 0 | 4 | 61 |
14,557 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/filewrapper.py | pipenv.patched.pip._vendor.cachecontrol.filewrapper.CallbackFileWrapper | from tempfile import NamedTemporaryFile
import mmap
from typing import TYPE_CHECKING, Any, Callable
class CallbackFileWrapper:
"""
Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.
... |
class CallbackFileWrapper:
'''
Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.
All attributes are proxied to the underlying file object.
This class uses members with a double... | 7 | 1 | 14 | 2 | 8 | 5 | 2 | 0.85 | 0 | 9 | 0 | 0 | 6 | 3 | 6 | 6 | 106 | 18 | 48 | 17 | 39 | 41 | 43 | 15 | 36 | 3 | 0 | 2 | 14 |
14,558 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/heuristics.py | pipenv.patched.pip._vendor.cachecontrol.heuristics.BaseHeuristic | class BaseHeuristic:
def warning(self, response: HTTPResponse) -> str | None:
"""
Return a valid 1xx warning header value describing the cache
adjustments.
The response is provided too allow warnings like 113
http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
... | class BaseHeuristic:
def warning(self, response: HTTPResponse) -> str | None:
'''
Return a valid 1xx warning header value describing the cache
adjustments.
The response is provided too allow warnings like 113
http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
... | 4 | 2 | 9 | 1 | 4 | 4 | 2 | 0.92 | 0 | 3 | 1 | 3 | 3 | 0 | 3 | 3 | 31 | 6 | 13 | 6 | 9 | 12 | 13 | 6 | 9 | 3 | 0 | 2 | 5 |
14,559 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/heuristics.py | pipenv.patched.pip._vendor.cachecontrol.heuristics.ExpiresAfter | from typing import TYPE_CHECKING, Any, Mapping
from datetime import datetime, timedelta, timezone
class ExpiresAfter(BaseHeuristic):
"""
Cache **all** requests for a defined time period.
"""
def __init__(self, **kw: Any) -> None:
self.delta = timedelta(**kw)
def update_headers(self, respo... |
class ExpiresAfter(BaseHeuristic):
'''
Cache **all** requests for a defined time period.
'''
def __init__(self, **kw: Any) -> None:
pass
def update_headers(self, response: HTTPResponse) -> dict[str, str]:
pass
def warning(self, response: HTTPResponse) -> str | None:
... | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.33 | 1 | 5 | 1 | 0 | 3 | 1 | 3 | 6 | 15 | 3 | 9 | 7 | 5 | 3 | 9 | 7 | 5 | 1 | 1 | 0 | 3 |
14,560 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/heuristics.py | pipenv.patched.pip._vendor.cachecontrol.heuristics.LastModified | import calendar
import time
from typing import TYPE_CHECKING, Any, Mapping
from email.utils import formatdate, parsedate, parsedate_tz
class LastModified(BaseHeuristic):
"""
If there is no Expires header already, fall back on Last-Modified
using the heuristic from
http://tools.ietf.org/html/rfc7234#sec... |
class LastModified(BaseHeuristic):
'''
If there is no Expires header already, fall back on Last-Modified
using the heuristic from
http://tools.ietf.org/html/rfc7234#section-4.2.2
to calculate a reasonable value.
Firefox also does something like this per
https://developer.mozilla.org/en-US/d... | 3 | 1 | 17 | 4 | 13 | 0 | 4 | 0.25 | 1 | 3 | 1 | 0 | 2 | 0 | 2 | 5 | 61 | 11 | 40 | 13 | 37 | 10 | 28 | 13 | 25 | 7 | 1 | 1 | 8 |
14,561 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/heuristics.py | pipenv.patched.pip._vendor.cachecontrol.heuristics.OneDayCache | from email.utils import formatdate, parsedate, parsedate_tz
from datetime import datetime, timedelta, timezone
class OneDayCache(BaseHeuristic):
"""
Cache the response by providing an expires 1 day in the
future.
"""
def update_headers(self, response: HTTPResponse) -> dict[str, str]:
heade... |
class OneDayCache(BaseHeuristic):
'''
Cache the response by providing an expires 1 day in the
future.
'''
def update_headers(self, response: HTTPResponse) -> dict[str, str]:
pass | 2 | 1 | 9 | 1 | 8 | 1 | 2 | 0.56 | 1 | 6 | 1 | 0 | 1 | 0 | 1 | 4 | 15 | 2 | 9 | 5 | 7 | 5 | 9 | 5 | 7 | 2 | 1 | 1 | 2 |
14,562 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/cachecontrol/serialize.py | pipenv.patched.pip._vendor.cachecontrol.serialize.Serializer | import io
from pipenv.patched.pip._vendor import msgpack
from pipenv.patched.pip._vendor.urllib3 import HTTPResponse
from pipenv.patched.pip._vendor.requests.structures import CaseInsensitiveDict
from typing import IO, TYPE_CHECKING, Any, Mapping, cast
class Serializer:
serde_version = '4'
def dumps(self, req... |
class Serializer:
def dumps(self, request: PreparedRequest, response: HTTPResponse, body: bytes | None=None) -> bytes:
pass
def serialize(self, data: dict[str, Any]) -> bytes:
pass
def loads(self, request: PreparedRequest, data: bytes, body_file: IO[bytes] | None=None) -> HTTPResponse | ... | 6 | 1 | 25 | 3 | 17 | 5 | 4 | 0.28 | 0 | 10 | 3 | 0 | 5 | 0 | 5 | 5 | 130 | 19 | 88 | 36 | 62 | 25 | 54 | 16 | 48 | 7 | 0 | 3 | 18 |
14,563 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/database.py | pipenv.patched.pip._vendor.distlib.database.BaseInstalledDistribution | import hashlib
import base64
class BaseInstalledDistribution(Distribution):
"""
This is the base class for installed distributions (whether PEP 376 or
legacy).
"""
hasher = None
def __init__(self, metadata, path, env=None):
"""
Initialise an instance.
:param metadata: A... |
class BaseInstalledDistribution(Distribution):
'''
This is the base class for installed distributions (whether PEP 376 or
legacy).
'''
def __init__(self, metadata, path, env=None):
'''
Initialise an instance.
:param metadata: An instance of :class:`Metadata` which describes... | 3 | 3 | 22 | 1 | 8 | 14 | 2 | 1.72 | 1 | 1 | 0 | 2 | 2 | 2 | 2 | 16 | 53 | 4 | 18 | 8 | 15 | 31 | 17 | 8 | 14 | 3 | 2 | 1 | 4 |
14,564 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/database.py | pipenv.patched.pip._vendor.distlib.database.DistributionPath | import sys
from .version import get_scheme, UnsupportedVersionError
import posixpath
from . import DistlibException, resources
import contextlib
from .util import parse_requirement, cached_property, parse_name_and_version, read_exports, write_exports, CSVReader, CSVWriter
from .metadata import Metadata, METADATA_FILENA... |
class DistributionPath(object):
'''
Represents a set of distributions installed on a path (typically sys.path).
'''
def __init__(self, path=None, include_egg=False):
'''
Create an instance from a path, optionally including legacy (distutils/
setuptools/distribute) distributions... | 14 | 11 | 19 | 1 | 11 | 6 | 4 | 0.54 | 1 | 9 | 4 | 0 | 11 | 7 | 12 | 12 | 241 | 29 | 138 | 53 | 123 | 74 | 129 | 50 | 115 | 9 | 1 | 6 | 48 |
14,565 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/database.py | pipenv.patched.pip._vendor.distlib.database.EggInfoDistribution | import os
import zipimport
from .util import parse_requirement, cached_property, parse_name_and_version, read_exports, write_exports, CSVReader, CSVWriter
import hashlib
from . import DistlibException, resources
import codecs
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FI... |
class EggInfoDistribution(BaseInstalledDistribution):
'''Created with the *path* of the ``.egg-info`` directory or file provided
to the constructor. It reads the metadata contained in the file itself, or
if the given path happens to be a directory, the metadata is read from the
file ``PKG-INFO`` under ... | 14 | 6 | 20 | 1 | 15 | 4 | 4 | 0.31 | 1 | 4 | 2 | 0 | 8 | 3 | 8 | 24 | 219 | 26 | 152 | 53 | 138 | 47 | 142 | 49 | 128 | 10 | 3 | 6 | 46 |
14,566 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/database.py | pipenv.patched.pip._vendor.distlib.database.InstalledDistribution | import codecs
from .util import parse_requirement, cached_property, parse_name_and_version, read_exports, write_exports, CSVReader, CSVWriter
import os
import contextlib
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME
from . import DistlibException, resources
class ... |
class InstalledDistribution(BaseInstalledDistribution):
'''
Created with the *path* of the ``.dist-info`` directory provided to the
constructor. It reads the metadata contained in ``pydist.json`` when it is
instantiated., or uses a passed in Metadata instance (useful for when
dry-run mode is being ... | 20 | 13 | 17 | 1 | 10 | 6 | 4 | 0.6 | 1 | 10 | 4 | 0 | 17 | 3 | 17 | 33 | 321 | 35 | 179 | 80 | 159 | 107 | 167 | 65 | 149 | 10 | 3 | 5 | 60 |
14,567 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/index.py | pipenv.patched.pip._vendor.distlib.index.PackageIndex | import tempfile
import subprocess
from . import DistlibException
import shutil
from .util import zip_dir, ServerProxy
import hashlib
import os
from .compat import HTTPBasicAuthHandler, Request, HTTPPasswordMgr, urlparse, build_opener, string_types
class PackageIndex(object):
"""
This class represents a package... |
class PackageIndex(object):
'''
This class represents a package index compatible with PyPI, the Python
Package Index.
'''
def __init__(self, url=None):
'''
Initialise an instance.
:param url: The URL of the index. If not specified, the URL for PyPI is
us... | 19 | 18 | 25 | 1 | 15 | 10 | 3 | 0.66 | 1 | 9 | 2 | 0 | 18 | 8 | 18 | 18 | 480 | 39 | 268 | 95 | 243 | 178 | 223 | 89 | 201 | 12 | 1 | 4 | 59 |
14,568 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.DependencyFinder | from . import DistlibException
from .version import get_scheme, UnsupportedVersionError
from .util import cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_name_and_version, ServerProxy, normalize_name
from .database import Distribution, DistributionPath, make_dist
class Depende... |
class DependencyFinder(object):
'''
Locate dependencies for distributions.
'''
def __init__(self, locator=None):
'''
Initialise an instance, using the specified locator
to locate distributions.
'''
pass
def add_distribution(self, dist):
'''
... | 8 | 8 | 31 | 2 | 19 | 11 | 6 | 0.56 | 1 | 5 | 3 | 0 | 7 | 6 | 7 | 7 | 231 | 20 | 137 | 52 | 129 | 77 | 132 | 52 | 124 | 21 | 1 | 5 | 39 |
14,569 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.DirectoryLocator | from .compat import urljoin, urlparse, urlunparse, url2pathname, pathname2url, queue, quote, unescape, build_opener, HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError
import os
from . import DistlibException
class DirectoryLocator(Locator):
"""
This class locates distributions... |
class DirectoryLocator(Locator):
'''
This class locates distributions in a directory tree.
'''
def __init__(self, path, **kwargs):
'''
Initialise an instance.
:param path: The root of the directory tree to search.
:param kwargs: Passed to the superclass constructor,... | 5 | 4 | 13 | 0 | 9 | 5 | 4 | 0.58 | 1 | 3 | 1 | 0 | 4 | 2 | 4 | 20 | 60 | 4 | 36 | 17 | 31 | 21 | 36 | 17 | 31 | 6 | 2 | 4 | 15 |
14,570 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.Locator | import posixpath
from .database import Distribution, DistributionPath, make_dist
from . import DistlibException
from .wheel import Wheel, is_compatible
from .version import get_scheme, UnsupportedVersionError
from .util import cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_nam... |
class Locator(object):
'''
A base class for locators - things that locate distributions.
'''
def __init__(self, scheme='default'):
'''
Initialise an instance.
:param scheme: Because locators look for most recent versions, they
need to know the version... | 18 | 14 | 17 | 1 | 12 | 5 | 4 | 0.5 | 1 | 9 | 3 | 7 | 16 | 5 | 16 | 16 | 315 | 28 | 202 | 73 | 184 | 100 | 180 | 70 | 162 | 16 | 1 | 6 | 61 |
14,571 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.Page | from .compat import urljoin, urlparse, urlunparse, url2pathname, pathname2url, queue, quote, unescape, build_opener, HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError
import re
from .util import cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_n... |
class Page(object):
'''
This class represents a scraped HTML page.
'''
def __init__(self, data, url):
'''
Initialise an instance with the Unicode page contents and the URL they
came from.
'''
pass
@cached_property
def links(self):
'''
... | 5 | 4 | 13 | 1 | 8 | 4 | 2 | 0.68 | 1 | 1 | 0 | 0 | 2 | 3 | 2 | 2 | 56 | 5 | 31 | 17 | 26 | 21 | 25 | 16 | 21 | 2 | 1 | 1 | 5 |
14,572 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.PyPIJSONLocator | import json
from .database import Distribution, DistributionPath, make_dist
from .compat import urljoin, urlparse, urlunparse, url2pathname, pathname2url, queue, quote, unescape, build_opener, HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError
from .metadata import Metadata, MetadataInv... |
class PyPIJSONLocator(Locator):
'''
This locator uses PyPI's JSON interface. It's very limited in functionality
and probably not worth using.
'''
def __init__(self, url, **kwargs):
pass
def get_distribution_names(self):
'''
Return all the distribution names known to th... | 4 | 2 | 21 | 1 | 16 | 5 | 3 | 0.4 | 1 | 6 | 2 | 0 | 3 | 1 | 3 | 19 | 70 | 5 | 48 | 17 | 44 | 19 | 48 | 16 | 44 | 6 | 2 | 3 | 8 |
14,573 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.PyPIRPCLocator | from .util import cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_name_and_version, ServerProxy, normalize_name
from .database import Distribution, DistributionPath, make_dist
from .metadata import Metadata, MetadataInvalidError
class PyPIRPCLocator(Locator):
"""
This ... |
class PyPIRPCLocator(Locator):
'''
This locator uses XML-RPC to locate distributions. It therefore
cannot be used with simple mirrors (that only mirror file content).
'''
def __init__(self, url, **kwargs):
'''
Initialise an instance.
:param url: The URL to use for XML-RPC.
... | 4 | 3 | 13 | 0 | 10 | 3 | 2 | 0.38 | 1 | 5 | 3 | 0 | 3 | 2 | 3 | 19 | 48 | 4 | 32 | 16 | 28 | 12 | 32 | 16 | 28 | 4 | 2 | 3 | 6 |
14,574 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/locators.py | pipenv.patched.pip._vendor.distlib.locators.SimpleScrapingLocator | import zlib
from .util import cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_name_and_version, ServerProxy, normalize_name
from .metadata import Metadata, MetadataInvalidError
from io import BytesIO
import gzip
from .compat import urljoin, urlparse, urlunparse, url2pathname, p... |
class SimpleScrapingLocator(Locator):
'''
A locator which scrapes HTML pages to locate downloads for a distribution.
This runs multiple threads to do the I/O; performance is at least as good
as pip's PackageFinder, which works in an analogous fashion.
'''
def __init__(self, url, timeout=None, ... | 11 | 10 | 22 | 1 | 16 | 7 | 4 | 0.44 | 1 | 11 | 3 | 0 | 10 | 14 | 10 | 26 | 245 | 18 | 166 | 57 | 155 | 73 | 148 | 55 | 137 | 12 | 2 | 7 | 44 |
14,575 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/manifest.py | pipenv.patched.pip._vendor.distlib.manifest.Manifest | from .util import convert_path
import fnmatch
import re
from .compat import fsdecode
from . import DistlibException
import os
class Manifest(object):
"""
A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.
"""
def __init__(self, base=N... |
class Manifest(object):
'''
A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.
'''
def __init__(self, base=None):
'''
Initialise an instance.
:param base: The base directory to explore under.
'''
... | 14 | 13 | 25 | 3 | 15 | 7 | 5 | 0.56 | 1 | 4 | 1 | 0 | 12 | 4 | 12 | 12 | 347 | 59 | 186 | 57 | 168 | 105 | 148 | 53 | 133 | 20 | 1 | 3 | 65 |
14,576 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/metadata.py | pipenv.patched.pip._vendor.distlib.metadata.LegacyMetadata | from .compat import StringIO, string_types, text_type
from email import message_from_file
from .version import get_scheme, PEP440_VERSION_RE
import codecs
import logging
class LegacyMetadata(object):
"""The legacy metadata of a release.
Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can... |
class LegacyMetadata(object):
'''The legacy metadata of a release.
Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can
instantiate the class with one of these arguments (or none):
- *path*, the path to a metadata file
- *fileobj* give a file-like object with metadata as conten... | 32 | 12 | 10 | 1 | 8 | 1 | 3 | 0.23 | 1 | 6 | 1 | 0 | 29 | 5 | 29 | 29 | 349 | 64 | 232 | 67 | 200 | 54 | 212 | 66 | 180 | 15 | 1 | 4 | 102 |
14,577 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/metadata.py | pipenv.patched.pip._vendor.distlib.metadata.Metadata | import json
from .markers import interpret
from .version import get_scheme, PEP440_VERSION_RE
from . import DistlibException, __version__
import re
from .util import extract_by_key, get_extras
from .compat import StringIO, string_types, text_type
import codecs
class Metadata(object):
"""
The metadata of a rele... |
class Metadata(object):
'''
The metadata of a release. This implementation uses 2.1
metadata where possible. If not possible, it wraps a LegacyMetadata
instance which handles the key-value metadata format.
'''
def __init__(self, path=None, fileobj=None, mapping=None, scheme='default'):
... | 27 | 2 | 18 | 0 | 17 | 1 | 6 | 0.09 | 1 | 11 | 4 | 0 | 19 | 3 | 19 | 19 | 448 | 38 | 378 | 107 | 351 | 33 | 287 | 99 | 266 | 16 | 1 | 6 | 110 |
14,578 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/resources.py | pipenv.patched.pip._vendor.distlib.resources.ResourceCache | from .util import cached_property, get_cache_base, Cache
import os
class ResourceCache(Cache):
def __init__(self, base=None):
if base is None:
base = os.path.join(get_cache_base(), str('resource-cache'))
super(ResourceCache, self).__init__(base)
def is_stale(self, resource, path):... |
class ResourceCache(Cache):
def __init__(self, base=None):
pass
def is_stale(self, resource, path):
'''
Is the cache stale for the given resource?
:param resource: The :class:`Resource` being cached.
:param path: The path of the resource in the cache.
:return: ... | 4 | 2 | 13 | 1 | 8 | 5 | 3 | 0.58 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 6 | 42 | 4 | 24 | 9 | 20 | 14 | 22 | 8 | 18 | 5 | 2 | 3 | 8 |
14,579 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/resources.py | pipenv.patched.pip._vendor.distlib.resources.ZipResourceFinder | import zipimport
import bisect
import io
import os
class ZipResourceFinder(ResourceFinder):
"""
Resource finder for resources in .zip files.
"""
def __init__(self, module):
super(ZipResourceFinder, self).__init__(module)
archive = self.loader.archive
self.prefix_len = 1 + len(a... |
class ZipResourceFinder(ResourceFinder):
'''
Resource finder for resources in .zip files.
'''
def __init__(self, module):
pass
def _adjust_path(self, path):
pass
def _find(self, path):
pass
def get_cache_info(self, resource):
pass
def get_bytes(self,... | 10 | 1 | 7 | 0 | 7 | 0 | 2 | 0.08 | 1 | 3 | 0 | 0 | 9 | 3 | 9 | 21 | 76 | 8 | 64 | 26 | 54 | 5 | 61 | 26 | 51 | 5 | 2 | 2 | 19 |
14,580 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/scripts.py | pipenv.patched.pip._vendor.distlib.scripts.ScriptMaker | from .compat import sysconfig, detect_encoding, ZipFile
from .util import FileOperator, get_export_entry, convert_path, get_executable, get_platform, in_venv
from zipfile import ZipInfo
from io import BytesIO
import time
import os
import struct
import sys
class ScriptMaker(object):
"""
A class to copy or creat... |
class ScriptMaker(object):
'''
A class to copy or create scripts from source scripts or callable
specifications.
'''
def __init__(self, source_dir, target_dir, add_launchers=True, dry_run=False, fileop=None):
pass
def _get_alternate_executable(self, executable, options):
pass
... | 20 | 5 | 19 | 1 | 14 | 5 | 4 | 0.37 | 1 | 10 | 2 | 1 | 17 | 10 | 17 | 17 | 357 | 34 | 254 | 82 | 233 | 93 | 225 | 78 | 206 | 13 | 1 | 4 | 71 |
14,581 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.CSVReader | from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
import codecs
import sys
import csv
class CSVReader(CSVBase):
def _... |
class CSVReader(CSVBase):
def __init__(self, **kwargs):
pass
def __iter__(self):
pass
def next(self):
pass | 4 | 0 | 6 | 0 | 6 | 0 | 3 | 0.05 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 5 | 25 | 4 | 20 | 10 | 16 | 1 | 19 | 10 | 15 | 4 | 2 | 3 | 8 |
14,582 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.CSVWriter | import csv
import sys
from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
class CSVWriter(CSVBase):
def __init__(self, ... |
class CSVWriter(CSVBase):
def __init__(self, fn, **kwargs):
pass
def writerow(self, row):
pass | 3 | 0 | 6 | 0 | 6 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 2 | 2 | 4 | 15 | 2 | 13 | 7 | 10 | 0 | 13 | 7 | 10 | 4 | 2 | 3 | 5 |
14,583 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.Cache | from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
import os
class Cache(object):
"""
A class implementing a cache ... |
class Cache(object):
'''
A class implementing a cache for resources that need to live in the file system
e.g. shared libraries. This class was moved from resources to here because it
could be used by other modules, e.g. the wheel module.
'''
def __init__(self, base):
'''
Initia... | 4 | 4 | 11 | 0 | 7 | 4 | 3 | 0.86 | 1 | 1 | 0 | 1 | 3 | 1 | 3 | 3 | 42 | 4 | 21 | 7 | 17 | 18 | 20 | 7 | 16 | 5 | 1 | 3 | 9 |
14,584 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.Configurator | import json
from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
import codecs
import os
class Configurator(BaseConfigurator)... |
class Configurator(BaseConfigurator):
def __init__(self, config, base=None):
pass
def configure_custom(self, config):
pass
def convert(o):
pass
def __getitem__(self, key):
pass
def inc_convert(self, value):
'''Default converter for the inc://... | 6 | 1 | 12 | 0 | 11 | 0 | 3 | 0.04 | 1 | 5 | 0 | 0 | 4 | 1 | 4 | 11 | 54 | 7 | 45 | 20 | 39 | 2 | 42 | 19 | 36 | 5 | 2 | 3 | 15 |
14,585 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.FileOperator | from . import DistlibException
import codecs
import py_compile
import os
from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
... |
class FileOperator(object):
def __init__(self, dry_run=False):
pass
def _init_record(self):
pass
def record_as_written(self, path):
pass
def newer(self, source, target):
'''Tell if the target is newer than the source.
Returns true if 'source' exists and is mo... | 17 | 3 | 11 | 0 | 10 | 1 | 4 | 0.14 | 1 | 5 | 1 | 0 | 15 | 5 | 15 | 15 | 184 | 20 | 145 | 40 | 129 | 21 | 138 | 39 | 122 | 10 | 1 | 4 | 55 |
14,586 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/util.py | pipenv.patched.pip._vendor.distlib.util.PyPIRCFile | from .compat import string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, fsdecode, unquote, urlparse
import os
class PyPIRCFile(object):
DEFAULT_REPOSITORY = 'https://up... |
class PyPIRCFile(object):
def __init__(self, fn=None, url=None):
pass
def read(self):
pass
def update(self, username, password): | 4 | 0 | 23 | 1 | 19 | 3 | 5 | 0.14 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 3 | 75 | 8 | 59 | 18 | 55 | 8 | 47 | 17 | 43 | 12 | 1 | 6 | 16 |
14,587 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distlib/wheel.py | pipenv.patched.pip._vendor.distlib.wheel.Wheel | from . import __version__, DistlibException
from .metadata import Metadata, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME
from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
import shutil
import sys
from .util import FileOperator, convert_path, CSVReader, CSVWriter, Cache, cached_property, get_cache... |
class Wheel(object):
'''
Class to build and install from Wheel files (PEP 427).
'''
def __init__(self, filename=None, sign=False, verify=False):
'''
Initialise an instance using a (valid) filename.
'''
pass
@property
def filename(self):
'''
Build... | 32 | 9 | 31 | 2 | 24 | 5 | 5 | 0.21 | 1 | 22 | 10 | 0 | 23 | 10 | 23 | 23 | 800 | 71 | 608 | 253 | 575 | 128 | 560 | 227 | 532 | 36 | 1 | 9 | 139 |
14,588 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/distro/distro.py | pipenv.patched.pip._vendor.distro.distro.LinuxDistribution | import subprocess
import os
import re
import shlex
import sys
from typing import Any, Callable, Dict, Iterable, Optional, Sequence, TextIO, Tuple, Type
class LinuxDistribution:
"""
Provides information about a OS distribution.
This package creates a private module-global instance of this class with
de... |
class LinuxDistribution:
'''
Provides information about a OS distribution.
This package creates a private module-global instance of this class with
default initialization arguments, that is used by the
`consolidated accessor functions`_ and `single source accessor functions`_.
By using default ... | 47 | 30 | 19 | 2 | 9 | 7 | 3 | 0.8 | 0 | 13 | 2 | 0 | 29 | 8 | 34 | 34 | 708 | 110 | 334 | 110 | 277 | 266 | 235 | 86 | 199 | 9 | 0 | 3 | 93 |
14,589 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/codec.py | pipenv.patched.pip._vendor.idna.codec.Codec | from typing import Any, Optional, Tuple
from .core import IDNAError, alabel, decode, encode, ulabel
import codecs
class Codec(codecs.Codec):
def encode(self, data: str, errors: str='strict') -> Tuple[bytes, int]:
if errors != 'strict':
raise IDNAError('Unsupported error handling "{}"'.format(e... |
class Codec(codecs.Codec):
def encode(self, data: str, errors: str='strict') -> Tuple[bytes, int]:
pass
def decode(self, data: bytes, errors: str='strict') -> Tuple[str, int]:
pass | 3 | 0 | 8 | 2 | 6 | 0 | 3 | 0 | 1 | 4 | 1 | 2 | 2 | 0 | 2 | 4 | 19 | 6 | 13 | 3 | 10 | 0 | 13 | 3 | 10 | 3 | 1 | 1 | 6 |
14,590 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/codec.py | pipenv.patched.pip._vendor.idna.codec.IncrementalDecoder | from .core import IDNAError, alabel, decode, encode, ulabel
import codecs
from typing import Any, Optional, Tuple
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
def _buffer_decode(self, data: Any, errors: str, final: bool) -> Tuple[str, int]:
if errors != 'strict':
raise IDNAErro... |
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
def _buffer_decode(self, data: Any, errors: str, final: bool) -> Tuple[str, int]:
pass | 2 | 0 | 33 | 5 | 27 | 1 | 10 | 0.04 | 1 | 5 | 1 | 0 | 1 | 0 | 1 | 12 | 34 | 5 | 28 | 8 | 26 | 1 | 27 | 8 | 25 | 10 | 3 | 3 | 10 |
14,591 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/codec.py | pipenv.patched.pip._vendor.idna.codec.IncrementalEncoder | from .core import IDNAError, alabel, decode, encode, ulabel
from typing import Any, Optional, Tuple
import codecs
class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[bytes, int]:
if errors != 'strict':
raise IDNAEr... |
class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[bytes, int]:
pass | 2 | 0 | 31 | 4 | 25 | 2 | 9 | 0.08 | 1 | 5 | 1 | 0 | 1 | 0 | 1 | 12 | 32 | 4 | 26 | 8 | 24 | 2 | 25 | 8 | 23 | 9 | 3 | 3 | 9 |
14,592 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/core.py | pipenv.patched.pip._vendor.idna.core.IDNABidiError | class IDNABidiError(IDNAError):
"""Exception when bidirectional requirements are not satisfied"""
pass | class IDNABidiError(IDNAError):
'''Exception when bidirectional requirements are not satisfied'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
14,593 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/core.py | pipenv.patched.pip._vendor.idna.core.IDNAError | class IDNAError(UnicodeError):
"""Base exception for all IDNA-encoding related problems"""
pass | class IDNAError(UnicodeError):
'''Base exception for all IDNA-encoding related problems'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 13 | 3 | 0 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
14,594 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/core.py | pipenv.patched.pip._vendor.idna.core.InvalidCodepoint | class InvalidCodepoint(IDNAError):
"""Exception when a disallowed or unallocated codepoint is used"""
pass | class InvalidCodepoint(IDNAError):
'''Exception when a disallowed or unallocated codepoint is used'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
14,595 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/idna/core.py | pipenv.patched.pip._vendor.idna.core.InvalidCodepointContext | class InvalidCodepointContext(IDNAError):
"""Exception when the codepoint is not valid in the context it is used"""
pass | class InvalidCodepointContext(IDNAError):
'''Exception when the codepoint is not valid in the context it is used'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
14,596 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/msgpack/ext.py | pipenv.patched.pip._vendor.msgpack.ext.ExtType | from collections import namedtuple
class ExtType(namedtuple('ExtType', 'code data')):
"""ExtType represents ext type in msgpack."""
def __new__(cls, code, data):
if not isinstance(code, int):
raise TypeError('code must be int')
if not isinstance(data, bytes):
raise Type... |
class ExtType(namedtuple('ExtType', 'code data')):
'''ExtType represents ext type in msgpack.'''
def __new__(cls, code, data):
pass | 2 | 1 | 8 | 0 | 8 | 0 | 4 | 0.11 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 6 | 11 | 1 | 9 | 2 | 7 | 1 | 9 | 2 | 7 | 4 | 1 | 1 | 4 |
14,597 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/msgpack/ext.py | pipenv.patched.pip._vendor.msgpack.ext.Timestamp | import datetime
import struct
class Timestamp:
"""Timestamp represents the Timestamp extension type in msgpack.
When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`.
When using pure-Python msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and
unpack `Timestamp`... |
class Timestamp:
'''Timestamp represents the Timestamp extension type in msgpack.
When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`.
When using pure-Python msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and
unpack `Timestamp`.
This class is immutable: ... | 18 | 13 | 9 | 1 | 5 | 4 | 2 | 0.86 | 0 | 7 | 0 | 0 | 9 | 2 | 13 | 13 | 150 | 30 | 65 | 29 | 47 | 56 | 54 | 25 | 40 | 4 | 0 | 2 | 22 |
14,598 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/msgpack/fallback.py | pipenv.patched.pip._vendor.msgpack.fallback.Packer | from datetime import datetime as _DateTime
from .ext import ExtType, Timestamp
import struct
class Packer:
"""
MessagePack Packer
Usage::
packer = Packer()
astream.write(packer.pack(a))
astream.write(packer.pack(b))
Packer's constructor has some keyword arguments:
:param... |
class Packer:
'''
MessagePack Packer
Usage::
packer = Packer()
astream.write(packer.pack(a))
astream.write(packer.pack(b))
Packer's constructor has some keyword arguments:
:param default:
When specified, it should be callable.
Convert user type to builtin typ... | 16 | 4 | 17 | 0 | 17 | 0 | 6 | 0.23 | 0 | 18 | 3 | 0 | 15 | 8 | 15 | 15 | 345 | 35 | 253 | 52 | 222 | 58 | 213 | 37 | 197 | 42 | 0 | 3 | 92 |
14,599 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_vendor/msgpack/fallback.py | pipenv.patched.pip._vendor.msgpack.fallback.Unpacker | import sys
from .ext import ExtType, Timestamp
import struct
from .exceptions import BufferFull, ExtraData, FormatError, OutOfData, StackError
class Unpacker:
"""Streaming unpacker.
Arguments:
:param file_like:
File-like object having `.read(n)` method.
If specified, unpacker reads serial... |
class Unpacker:
'''Streaming unpacker.
Arguments:
:param file_like:
File-like object having `.read(n)` method.
If specified, unpacker reads serialized data from it and `.feed()` is not usable.
:param int read_size:
Used as `file_like.read(read_size)`. (default: `min(16*1024, max... | 18 | 2 | 21 | 1 | 19 | 1 | 6 | 0.29 | 0 | 16 | 6 | 0 | 17 | 22 | 17 | 17 | 470 | 54 | 324 | 82 | 287 | 94 | 278 | 62 | 260 | 28 | 0 | 4 | 99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.