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,400 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/exceptions.py | pipenv.patched.pip._internal.exceptions.PipError | class PipError(Exception):
"""The base pip error.""" | class PipError(Exception):
'''The base pip error.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 9 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
14,401 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/exceptions.py | pipenv.patched.pip._internal.exceptions.UninstallMissingRecord | from pipenv.patched.pip._vendor.rich.text import Text
class UninstallMissingRecord(DiagnosticPipError):
reference = 'uninstall-no-record-file'
def __init__(self, *, distribution: 'BaseDistribution') -> None:
installer = distribution.installer
if not installer or installer == 'pip':
... |
class UninstallMissingRecord(DiagnosticPipError):
def __init__(self, *, distribution: 'BaseDistribution') -> None:
pass | 2 | 0 | 22 | 1 | 21 | 0 | 2 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 14 | 25 | 2 | 23 | 6 | 21 | 0 | 9 | 6 | 7 | 2 | 5 | 1 | 2 |
14,402 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/exceptions.py | pipenv.patched.pip._internal.exceptions.UserInstallationInvalid | class UserInstallationInvalid(InstallationError):
"""A --user install is requested on an environment without user site."""
def __str__(self) -> str:
return 'User base directory is not specified' | class UserInstallationInvalid(InstallationError):
'''A --user install is requested on an environment without user site.'''
def __str__(self) -> str:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
14,403 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.CacheablePageContent | class CacheablePageContent:
def __init__(self, page: 'IndexContent') -> None:
assert page.cache_link_parsing
self.page = page
def __eq__(self, other: object) -> bool:
return isinstance(other, type(self)) and self.page.url == other.page.url
def __hash__(self) -> int:
return... | class CacheablePageContent:
def __init__(self, page: 'IndexContent') -> None:
pass
def __eq__(self, other: object) -> bool:
pass
def __hash__(self) -> int:
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 4 | 0 | 0 | 3 | 1 | 3 | 3 | 10 | 2 | 8 | 5 | 4 | 0 | 8 | 5 | 4 | 1 | 0 | 0 | 3 |
14,404 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.CollectedSources | from .sources import CandidatesFromPage, LinkSource, build_source
from typing import Callable, Dict, Iterable, List, MutableMapping, NamedTuple, Optional, Protocol, Sequence, Tuple, Union
class CollectedSources(NamedTuple):
find_links: Sequence[Optional[LinkSource]]
index_urls: Sequence[Optional[LinkSource]] |
class CollectedSources(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 |
14,405 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.HTMLLinkParser | from typing import Callable, Dict, Iterable, List, MutableMapping, NamedTuple, Optional, Protocol, Sequence, Tuple, Union
from html.parser import HTMLParser
class HTMLLinkParser(HTMLParser):
"""
HTMLParser that keeps the first base HREF and a list of all anchor
elements' attributes.
"""
def __init... |
class HTMLLinkParser(HTMLParser):
'''
HTMLParser that keeps the first base HREF and a list of all anchor
elements' attributes.
'''
def __init__(self, url: str) -> None:
pass
def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None:
pass
def get_... | 4 | 1 | 6 | 0 | 6 | 0 | 3 | 0.22 | 1 | 3 | 0 | 0 | 3 | 3 | 3 | 41 | 26 | 4 | 18 | 9 | 14 | 4 | 17 | 9 | 13 | 4 | 2 | 2 | 8 |
14,406 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.IndexContent | from dataclasses import dataclass
from pipenv.patched.pip._internal.utils.misc import redact_auth_from_url
from typing import Callable, Dict, Iterable, List, MutableMapping, NamedTuple, Optional, Protocol, Sequence, Tuple, Union
@dataclass(frozen=True)
class IndexContent:
"""Represents one response (or page), alon... | @dataclass(frozen=True)
class IndexContent:
'''Represents one response (or page), along with its URL.
:param encoding: the encoding to decode the given content.
:param url: the URL from which the HTML was downloaded.
:param cache_link_parsing: whether links parsed from this page's url
... | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.88 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 3 | 8 | 3 | 6 | 7 | 8 | 3 | 6 | 1 | 0 | 0 | 1 |
14,407 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.LinkCollector | import collections
from pipenv.patched.pip._internal.models.search_scope import SearchScope
from pipenv.patched.pip._internal.network.session import PipSession
from pipenv.patched.pip._internal.models.link import Link
from .sources import CandidatesFromPage, LinkSource, build_source
import itertools
import logging
from... |
class LinkCollector:
'''
Responsible for collecting Link objects from all configured locations,
making network requests as needed.
The class's main method is its collect_sources() method.
'''
def __init__(self, session: PipSession, search_scope: SearchScope, index_lookup: Optional[Dict[str... | 8 | 3 | 19 | 1 | 16 | 2 | 2 | 0.18 | 0 | 11 | 5 | 0 | 4 | 3 | 5 | 5 | 110 | 10 | 85 | 33 | 62 | 15 | 26 | 16 | 20 | 2 | 0 | 1 | 8 |
14,408 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector.ParseLinks | from pipenv.patched.pip._internal.models.link import Link
from typing import Callable, Dict, Iterable, List, MutableMapping, NamedTuple, Optional, Protocol, Sequence, Tuple, Union
class ParseLinks(Protocol):
def __call__(self, page: 'IndexContent') -> Iterable[Link]:
... |
class ParseLinks(Protocol):
def __call__(self, page: 'IndexContent') -> Iterable[Link]:
pass | 2 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 25 | 2 | 0 | 2 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
14,409 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/collector.py | pipenv.patched.pip._internal.index.collector._NotAPIContent | class _NotAPIContent(Exception):
def __init__(self, content_type: str, request_desc: str) -> None:
super().__init__(content_type, request_desc)
self.content_type = content_type
self.request_desc = request_desc | class _NotAPIContent(Exception):
def __init__(self, content_type: str, request_desc: str) -> None:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 11 | 5 | 0 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 3 | 0 | 1 |
14,410 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.BestCandidateResult | from typing import TYPE_CHECKING, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, Union
from dataclasses import dataclass
from pipenv.patched.pip._internal.models.candidate import InstallationCandidate
@dataclass(frozen=True)
class BestCandidateResult:
"""A collection of candidates, returned by `PackageFind... | @dataclass(frozen=True)
class BestCandidateResult:
'''A collection of candidates, returned by `PackageFinder.find_best_candidate`.
This class is only intended to be instantiated by CandidateEvaluator's
`compute_best_candidate()` method.
:param all_candidates: A sequence of all available candidates found... | 3 | 1 | 10 | 1 | 6 | 3 | 1 | 0.63 | 0 | 2 | 1 | 0 | 3 | 3 | 3 | 3 | 38 | 7 | 19 | 12 | 10 | 12 | 13 | 7 | 9 | 2 | 0 | 1 | 4 |
14,411 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.CandidateEvaluator | from pipenv.patched.pip._internal.models.target_python import TargetPython
from pipenv.patched.pip._vendor.packaging import specifiers
from pipenv.patched.pip._internal.models.wheel import Wheel
from pipenv.patched.pip._internal.exceptions import BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename, ... |
class CandidateEvaluator:
'''
Responsible for filtering and sorting candidates for installation based
on what tags are valid.
'''
@classmethod
def create(cls, project_name: str, target_python: Optional[TargetPython]=None, prefer_binary: bool=False, allow_all_prereleases: bool=False, specifier: ... | 8 | 7 | 33 | 2 | 21 | 10 | 2 | 0.51 | 0 | 14 | 8 | 0 | 5 | 7 | 6 | 6 | 207 | 20 | 125 | 66 | 88 | 64 | 58 | 35 | 51 | 6 | 0 | 3 | 14 |
14,412 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.CandidatePreferences | from dataclasses import dataclass
@dataclass
class CandidatePreferences:
"""
Encapsulates some of the preferences for filtering and sorting
InstallationCandidate objects.
"""
prefer_binary: bool = False
allow_all_prereleases: bool = False | @dataclass
class CandidatePreferences:
'''
Encapsulates some of the preferences for filtering and sorting
InstallationCandidate objects.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.33 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 1 | 3 | 3 | 2 | 4 | 3 | 3 | 2 | 0 | 0 | 0 | 0 |
14,413 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.LinkEvaluator | from pipenv.patched.pip._internal.exceptions import BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename, UnsupportedWheel
from pipenv.patched.pip._internal.utils.filetypes import WHEEL_EXTENSION
from typing import TYPE_CHECKING, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, Union
from pipen... |
class LinkEvaluator:
'''
Responsible for evaluating links for a particular project.
'''
def __init__(self, project_name: str, canonical_name: str, formats: FrozenSet[str], target_python: TargetPython, allow_yanked: bool, ignore_requires_python: Optional[bool]=None, ignore_compatibility: Optional[bool]... | 3 | 3 | 67 | 6 | 46 | 15 | 10 | 0.4 | 0 | 6 | 4 | 0 | 2 | 7 | 2 | 2 | 145 | 15 | 93 | 30 | 81 | 37 | 64 | 21 | 61 | 17 | 0 | 3 | 19 |
14,414 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.LinkType | import enum
class LinkType(enum.Enum):
candidate = enum.auto()
different_project = enum.auto()
yanked = enum.auto()
format_unsupported = enum.auto()
format_invalid = enum.auto()
platform_mismatch = enum.auto()
requires_python_mismatch = enum.auto() |
class LinkType(enum.Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 4 | 0 | 0 |
14,415 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/package_finder.py | pipenv.patched.pip._internal.index.package_finder.PackageFinder | from pipenv.patched.pip._internal.index.collector import LinkCollector, parse_links
from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name
from pipenv.patched.pip._internal.models.selection_prefs import SelectionPreferences
from pipenv.patched.pip._internal.exceptions import BestVersionAlreadyInstalle... |
class PackageFinder:
'''This finds packages.
This is meant to match easy_install's technique for looking for
packages, by reading pages and looking for appropriate links.
'''
def __init__(self, link_collector: LinkCollector, target_python: TargetPython, allow_yanked: bool, format_control: Optional... | 41 | 10 | 15 | 1 | 11 | 2 | 2 | 0.23 | 0 | 23 | 16 | 0 | 22 | 8 | 23 | 23 | 400 | 57 | 281 | 112 | 210 | 64 | 138 | 65 | 112 | 6 | 0 | 3 | 47 |
14,416 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources.LinkSource | from pipenv.patched.pip._internal.models.link import Link
from typing import Callable, Dict, Iterable, List, Optional, Tuple
class LinkSource:
@property
def link(self) -> Optional[Link]:
"""Returns the underlying link, if there's one."""
raise NotImplementedError()
def page_candidates(sel... |
class LinkSource:
@property
def link(self) -> Optional[Link]:
'''Returns the underlying link, if there's one.'''
pass
def page_candidates(self) -> FoundCandidates:
'''Candidates found by parsing an archive listing HTML file.'''
pass
def file_links(self) -> FoundLinks:... | 5 | 3 | 3 | 0 | 2 | 1 | 1 | 0.38 | 0 | 2 | 1 | 4 | 3 | 0 | 3 | 3 | 13 | 2 | 8 | 5 | 3 | 3 | 7 | 4 | 3 | 1 | 0 | 0 | 3 |
14,417 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources._FlatDirectorySource | from pipenv.patched.pip._internal.models.link import Link
from typing import Callable, Dict, Iterable, List, Optional, Tuple
from pipenv.patched.pip._vendor.packaging.utils import InvalidSdistFilename, InvalidWheelFilename, canonicalize_name, parse_sdist_filename, parse_wheel_filename
class _FlatDirectorySource(LinkSo... |
class _FlatDirectorySource(LinkSource):
'''Link source specified by ``--find-links=<path-to-dir>``.
This looks the content of the directory, and returns:
* ``page_candidates``: Links listed on each HTML file in the directory.
* ``file_candidates``: Archives in the directory.
'''
def __init__(s... | 6 | 1 | 6 | 0 | 5 | 0 | 2 | 0.25 | 1 | 3 | 2 | 0 | 4 | 3 | 4 | 7 | 38 | 8 | 24 | 17 | 13 | 6 | 17 | 11 | 12 | 2 | 1 | 1 | 7 |
14,418 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources._FlatDirectoryToUrls | from typing import Callable, Dict, Iterable, List, Optional, Tuple
from pipenv.patched.pip._vendor.packaging.utils import InvalidSdistFilename, InvalidWheelFilename, canonicalize_name, parse_sdist_filename, parse_wheel_filename
from pipenv.patched.pip._internal.utils.urls import path_to_url, url_to_path
import os
from ... |
class _FlatDirectoryToUrls:
'''Scans directory and caches results'''
def __init__(self, path: str) -> None:
pass
def _scan_directory(self) -> None:
'''Scans directory once and populates both page_candidates
and project_name_to_urls at the same time
'''
pass
@pr... | 7 | 2 | 9 | 1 | 7 | 1 | 3 | 0.19 | 0 | 4 | 2 | 0 | 4 | 4 | 4 | 4 | 45 | 8 | 31 | 14 | 24 | 6 | 29 | 12 | 24 | 5 | 0 | 3 | 10 |
14,419 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources._IndexDirectorySource | from typing import Callable, Dict, Iterable, List, Optional, Tuple
from pipenv.patched.pip._internal.models.link import Link
class _IndexDirectorySource(LinkSource):
"""``--[extra-]index-url=<path-to-directory>``.
This is treated like a remote URL; ``candidates_from_page`` contains logic
for this by appen... |
class _IndexDirectorySource(LinkSource):
'''``--[extra-]index-url=<path-to-directory>``.
This is treated like a remote URL; ``candidates_from_page`` contains logic
for this by appending ``index.html`` to the link.
'''
def __init__(self, candidates_from_page: CandidatesFromPage, link: Link) -> None... | 6 | 1 | 3 | 0 | 3 | 0 | 1 | 0.27 | 1 | 1 | 1 | 0 | 4 | 2 | 4 | 7 | 24 | 5 | 15 | 12 | 5 | 4 | 10 | 7 | 5 | 1 | 1 | 0 | 4 |
14,420 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources._LocalFileSource | from pipenv.patched.pip._internal.models.link import Link
from typing import Callable, Dict, Iterable, List, Optional, Tuple
class _LocalFileSource(LinkSource):
"""``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.
If a URL is supplied, it must be a ``file:`` URL. If a path is supplied t... |
class _LocalFileSource(LinkSource):
'''``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.
If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
the option, it is converted to a URL first. This returns:
* ``page_candidates``: Links listed on an HTML file.
*... | 6 | 1 | 4 | 0 | 4 | 0 | 2 | 0.32 | 1 | 1 | 1 | 0 | 4 | 2 | 4 | 7 | 31 | 6 | 19 | 12 | 9 | 6 | 14 | 7 | 9 | 2 | 1 | 1 | 6 |
14,421 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/index/sources.py | pipenv.patched.pip._internal.index.sources._RemoteFileSource | from pipenv.patched.pip._internal.models.link import Link
from typing import Callable, Dict, Iterable, List, Optional, Tuple
class _RemoteFileSource(LinkSource):
"""``--find-links=<url>`` or ``--[extra-]index-url=<url>``.
This returns:
* ``page_candidates``: Links listed on an HTML file.
* ``file_can... |
class _RemoteFileSource(LinkSource):
'''``--find-links=<url>`` or ``--[extra-]index-url=<url>``.
This returns:
* ``page_candidates``: Links listed on an HTML file.
* ``file_candidates``: The non-HTML file.
'''
def __init__(self, candidates_from_page: CandidatesFromPage, page_validator: PageVal... | 6 | 1 | 4 | 0 | 4 | 0 | 1 | 0.26 | 1 | 1 | 1 | 0 | 4 | 3 | 4 | 7 | 30 | 6 | 19 | 14 | 8 | 5 | 13 | 8 | 8 | 2 | 1 | 1 | 5 |
14,422 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/__init__.py | pipenv.patched.pip._internal.metadata.Backend | from typing import List, Literal, Optional, Protocol, Type, cast
from .base import BaseDistribution, BaseEnvironment, FilesystemWheel, MemoryWheel, Wheel
class Backend(Protocol):
NAME: 'Literal["importlib", "pkg_resources"]'
Distribution: Type[BaseDistribution]
Environment: Type[BaseEnvironment] |
class Backend(Protocol):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 5 | 0 | 0 |
14,423 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.BaseDistribution | import functools
import csv
from pipenv.patched.pip._internal.utils.misc import is_local, normalize_path
from pipenv.patched.pip._internal.utils.egg_link import egg_link_path_from_sys_path
from pipenv.patched.pip._vendor.packaging.requirements import Requirement
from pipenv.patched.pip._internal.locations import site_p... |
class BaseDistribution(Protocol):
@classmethod
def from_directory(cls, directory: str) -> 'BaseDistribution':
'''Load the distribution from a metadata directory.
:param directory: Path to a metadata directory, e.g. ``.dist-info``.
'''
pass
@classmethod
def from_metadata... | 72 | 30 | 9 | 1 | 5 | 4 | 2 | 0.64 | 1 | 20 | 8 | 3 | 41 | 0 | 44 | 68 | 481 | 80 | 248 | 111 | 171 | 159 | 196 | 77 | 151 | 6 | 5 | 2 | 83 |
14,424 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.BaseEntryPoint | from typing import IO, Any, Collection, Container, Dict, Iterable, Iterator, List, NamedTuple, Optional, Protocol, Tuple, Union
class BaseEntryPoint(Protocol):
@property
def name(self) -> str:
raise NotImplementedError()
@property
def value(self) -> str:
raise NotImplementedError()
... |
class BaseEntryPoint(Protocol):
@property
def name(self) -> str:
pass
@property
def value(self) -> str:
pass
@property
def group(self) -> str:
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 27 | 12 | 2 | 10 | 7 | 3 | 0 | 7 | 4 | 3 | 1 | 5 | 0 | 3 |
14,425 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.BaseEnvironment | from pipenv.patched.pip._internal.utils.compat import stdlib_pkgs
import re
from typing import IO, Any, Collection, Container, Dict, Iterable, Iterator, List, NamedTuple, Optional, Protocol, Tuple, Union
class BaseEnvironment:
"""An environment containing distributions to introspect."""
@classmethod
def d... |
class BaseEnvironment:
'''An environment containing distributions to introspect.'''
@classmethod
def default(cls) -> 'BaseEnvironment':
pass
@classmethod
def from_paths(cls, paths: Optional[List[str]]) -> 'BaseEnvironment':
pass
def get_distribution(self, name: str) -> Optional... | 9 | 5 | 12 | 1 | 7 | 5 | 2 | 0.66 | 0 | 4 | 1 | 2 | 4 | 0 | 6 | 6 | 83 | 10 | 44 | 19 | 28 | 29 | 27 | 10 | 20 | 5 | 0 | 2 | 12 |
14,426 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.FilesystemWheel | import zipfile
class FilesystemWheel(Wheel):
def __init__(self, location: str) -> None:
self.location = location
def as_zipfile(self) -> zipfile.ZipFile:
return zipfile.ZipFile(self.location, allowZip64=True) |
class FilesystemWheel(Wheel):
def __init__(self, location: str) -> None:
pass
def as_zipfile(self) -> zipfile.ZipFile:
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 27 | 6 | 1 | 5 | 4 | 2 | 0 | 5 | 4 | 2 | 1 | 6 | 0 | 2 |
14,427 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.MemoryWheel | import zipfile
from typing import IO, Any, Collection, Container, Dict, Iterable, Iterator, List, NamedTuple, Optional, Protocol, Tuple, Union
class MemoryWheel(Wheel):
def __init__(self, location: str, stream: IO[bytes]) -> None:
self.location = location
self.stream = stream
def as_zipfile(s... |
class MemoryWheel(Wheel):
def __init__(self, location: str, stream: IO[bytes]) -> None:
pass
def as_zipfile(self) -> zipfile.ZipFile:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 2 | 2 | 2 | 27 | 7 | 1 | 6 | 5 | 3 | 0 | 6 | 5 | 3 | 1 | 6 | 0 | 2 |
14,428 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.RequiresEntry | from typing import IO, Any, Collection, Container, Dict, Iterable, Iterator, List, NamedTuple, Optional, Protocol, Tuple, Union
class RequiresEntry(NamedTuple):
requirement: str
extra: str
marker: str |
class RequiresEntry(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,429 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/base.py | pipenv.patched.pip._internal.metadata.base.Wheel | from typing import IO, Any, Collection, Container, Dict, Iterable, Iterator, List, NamedTuple, Optional, Protocol, Tuple, Union
import zipfile
class Wheel(Protocol):
location: str
def as_zipfile(self) -> zipfile.ZipFile:
raise NotImplementedError() |
class Wheel(Protocol):
def as_zipfile(self) -> zipfile.ZipFile:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 2 | 1 | 0 | 1 | 25 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
14,430 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_compat.py | pipenv.patched.pip._internal.metadata.importlib._compat.BadMetadata | import importlib.metadata
class BadMetadata(ValueError):
def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None:
self.dist = dist
self.reason = reason
def __str__(self) -> str:
return f'Bad metadata in {self.dist} ({self.reason})' |
class BadMetadata(ValueError):
def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None:
pass
def __str__(self) -> str:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 2 | 2 | 2 | 13 | 7 | 1 | 6 | 5 | 3 | 0 | 6 | 5 | 3 | 1 | 4 | 0 | 2 |
14,431 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_compat.py | pipenv.patched.pip._internal.metadata.importlib._compat.BasePath | from typing import Any, Optional, Protocol, Tuple, cast
class BasePath(Protocol):
"""A protocol that various path objects conform.
This exists because importlib.metadata uses both ``pathlib.Path`` and
``zipfile.Path``, and we need a common base for type hints (Union does not
work well since ``zipfile.... |
class BasePath(Protocol):
'''A protocol that various path objects conform.
This exists because importlib.metadata uses both ``pathlib.Path`` and
``zipfile.Path``, and we need a common base for type hints (Union does not
work well since ``zipfile.Path`` is too new for our linter setup).
This does no... | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 26 | 18 | 4 | 7 | 5 | 2 | 7 | 5 | 3 | 2 | 1 | 5 | 0 | 2 |
14,432 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_dists.py | pipenv.patched.pip._internal.metadata.importlib._dists.Distribution | from pipenv.patched.pip._internal.utils.packaging import get_requirement
from pipenv.patched.pip._internal.utils.temp_dir import TempDirectory
import email.message
import pathlib
import zipfile
import importlib.metadata
from ._compat import BasePath, get_dist_canonical_name, parse_name_and_version_from_info_directory
f... |
class Distribution(BaseDistribution):
def __init__(self, dist: importlib.metadata.Distribution, info_location: Optional[BasePath], installed_location: Optional[BasePath]) -> None:
pass
@classmethod
def from_directory(cls, directory: str) -> BaseDistribution:
pass
@classmethod
def f... | 27 | 0 | 6 | 0 | 5 | 1 | 2 | 0.14 | 1 | 17 | 8 | 0 | 14 | 3 | 17 | 85 | 123 | 16 | 94 | 54 | 57 | 13 | 68 | 32 | 50 | 5 | 6 | 2 | 29 |
14,433 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_dists.py | pipenv.patched.pip._internal.metadata.importlib._dists.WheelDistribution | import importlib.metadata
from pipenv.patched.pip._internal.exceptions import InvalidWheel, UnsupportedWheel
from typing import Collection, Dict, Iterable, Iterator, Mapping, Optional, Sequence, Union, cast
from pipenv.patched.pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file
import zipfile
from pi... |
class WheelDistribution(importlib.metadata.Distribution):
'''An ``importlib.metadata.Distribution`` read from a wheel.
Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``,
its implementation is too "lazy" for pip's needs (we can't keep the ZipFile
handle open for the entire lifeti... | 7 | 1 | 11 | 0 | 10 | 0 | 2 | 0.19 | 1 | 8 | 1 | 0 | 3 | 2 | 4 | 23 | 57 | 6 | 43 | 26 | 28 | 8 | 26 | 15 | 21 | 3 | 1 | 1 | 7 |
14,434 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_envs.py | pipenv.patched.pip._internal.metadata.importlib._envs.Environment | import sys
from typing import Iterator, List, Optional, Sequence, Set, Tuple
from pipenv.patched.pip._vendor.packaging.utils import InvalidWheelFilename, NormalizedName, canonicalize_name, parse_wheel_filename
from pipenv.patched.pip._internal.metadata.base import BaseDistribution, BaseEnvironment
class Environment(Ba... |
class Environment(BaseEnvironment):
def __init__(self, paths: Sequence[str]) -> None:
pass
@classmethod
def default(cls) -> BaseEnvironment:
pass
@classmethod
def from_paths(cls, paths: Optional[List[str]]) -> BaseEnvironment:
pass
def _iter_distributions(self) -> Iter... | 8 | 0 | 5 | 0 | 5 | 0 | 2 | 0.04 | 1 | 3 | 2 | 0 | 3 | 1 | 5 | 11 | 32 | 4 | 27 | 14 | 19 | 1 | 21 | 12 | 15 | 3 | 1 | 2 | 8 |
14,435 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/importlib/_envs.py | pipenv.patched.pip._internal.metadata.importlib._envs._DistributionFinder | import pathlib
from typing import Iterator, List, Optional, Sequence, Set, Tuple
from ._compat import BadMetadata, BasePath, get_dist_canonical_name, get_info_location
import importlib.metadata
from ._dists import Distribution
from pipenv.patched.pip._vendor.packaging.utils import InvalidWheelFilename, NormalizedName, ... |
class _DistributionFinder:
'''Finder to locate distributions.
The main purpose of this class is to memoize found distributions' names, so
only one distribution is returned for each package name. At lot of pip code
assumes this (because it is setuptools's behavior), and not doing the same
can potent... | 5 | 4 | 13 | 1 | 9 | 3 | 4 | 0.51 | 0 | 10 | 5 | 0 | 7 | 1 | 7 | 7 | 112 | 17 | 63 | 32 | 51 | 32 | 62 | 29 | 50 | 6 | 0 | 3 | 25 |
14,436 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/pkg_resources.py | pipenv.patched.pip._internal.metadata.pkg_resources.Distribution | from pipenv.patched.pip._internal.utils.misc import display_path, normalize_path
from pipenv.patched.pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file
import os
import email.parser
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
import zipfile
from pipenv.pa... |
class Distribution(BaseDistribution):
def __init__(self, dist: pkg_resources.Distribution) -> None:
pass
@property
def _extra_mapping(self) -> Mapping[NormalizedName, str]:
pass
@classmethod
def from_directory(cls, directory: str) -> BaseDistribution:
pass
@classmethod
... | 31 | 1 | 7 | 0 | 6 | 1 | 2 | 0.08 | 1 | 22 | 12 | 0 | 16 | 2 | 19 | 87 | 168 | 22 | 135 | 63 | 99 | 11 | 96 | 45 | 76 | 4 | 6 | 2 | 34 |
14,437 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/pkg_resources.py | pipenv.patched.pip._internal.metadata.pkg_resources.EntryPoint | from typing import Collection, Iterable, Iterator, List, Mapping, NamedTuple, Optional
class EntryPoint(NamedTuple):
name: str
value: str
group: str |
class EntryPoint(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,438 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/pkg_resources.py | pipenv.patched.pip._internal.metadata.pkg_resources.Environment | from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from .base import BaseDistribution, BaseEntryPoint, BaseEnvironment, InfoPath, Wheel
from typing import Collection, Iterable, Iterator, List, Mapping, NamedTuple, Optional
from pipenv.patched.pip._vendor import pkg_resources
class... |
class Environment(BaseEnvironment):
def __init__(self, ws: pkg_resources.WorkingSet) -> None:
pass
@classmethod
def default(cls) -> BaseEnvironment:
pass
@classmethod
def from_paths(cls, paths: Optional[List[str]]) -> BaseEnvironment:
pass
def _iter_distributions(self)... | 9 | 1 | 7 | 0 | 4 | 3 | 2 | 0.56 | 1 | 5 | 4 | 0 | 4 | 1 | 6 | 12 | 49 | 7 | 27 | 14 | 18 | 15 | 25 | 12 | 18 | 3 | 1 | 2 | 11 |
14,439 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/metadata/pkg_resources.py | pipenv.patched.pip._internal.metadata.pkg_resources.InMemoryMetadata | from typing import Collection, Iterable, Iterator, List, Mapping, NamedTuple, Optional
from pipenv.patched.pip._internal.exceptions import InvalidWheel, NoneMetadataError, UnsupportedWheel
from pipenv.patched.pip._vendor import pkg_resources
class InMemoryMetadata:
"""IMetadataProvider that reads metadata files fr... |
class InMemoryMetadata:
'''IMetadataProvider that reads metadata files from a dictionary.
This also maps metadata decoding exceptions to our internal exception type.
'''
def __init__(self, metadata: Mapping[str, bytes], wheel_name: str) -> None:
pass
def has_metadata(self, name: str) -> b... | 8 | 1 | 3 | 0 | 3 | 0 | 1 | 0.19 | 0 | 5 | 1 | 0 | 7 | 2 | 7 | 7 | 33 | 8 | 21 | 11 | 13 | 4 | 19 | 10 | 11 | 2 | 0 | 1 | 8 |
14,440 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/candidate.py | pipenv.patched.pip._internal.models.candidate.InstallationCandidate | from pipenv.patched.pip._vendor.packaging.version import parse as parse_version
from pipenv.patched.pip._internal.models.link import Link
from pipenv.patched.pip._vendor.packaging.version import Version
from dataclasses import dataclass
@dataclass(frozen=True)
class InstallationCandidate:
"""Represents a potential... | @dataclass(frozen=True)
class InstallationCandidate:
'''Represents a potential "candidate" for installation.'''
def __init__(self, name: str, version: str, link: Link) -> None:
pass
def __str__(self) -> str:
pass | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.09 | 0 | 3 | 1 | 0 | 2 | 0 | 2 | 2 | 16 | 4 | 11 | 4 | 8 | 1 | 11 | 4 | 8 | 1 | 0 | 0 | 2 |
14,441 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/direct_url.py | pipenv.patched.pip._internal.models.direct_url.ArchiveInfo | from typing import Any, ClassVar, Dict, Iterable, Optional, Type, TypeVar, Union
class ArchiveInfo:
name = 'archive_info'
def __init__(self, hash: Optional[str]=None, hashes: Optional[Dict[str, str]]=None) -> None:
self.hashes = hashes
self.hash = hash
@property
def hash(self) -> Opti... |
class ArchiveInfo:
def __init__(self, hash: Optional[str]=None, hashes: Optional[Dict[str, str]]=None) -> None:
pass
@property
def hash(self) -> Optional[str]:
pass
@hash.setter
def hash(self) -> Optional[str]:
pass
@classmethod
def _from_dict(cls, d: Optional[Dict[... | 9 | 0 | 6 | 0 | 6 | 1 | 2 | 0.09 | 0 | 5 | 1 | 0 | 4 | 2 | 5 | 5 | 42 | 5 | 34 | 17 | 21 | 3 | 24 | 10 | 18 | 5 | 0 | 2 | 10 |
14,442 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/direct_url.py | pipenv.patched.pip._internal.models.direct_url.DirInfo | from dataclasses import dataclass
from typing import Any, ClassVar, Dict, Iterable, Optional, Type, TypeVar, Union
@dataclass
class DirInfo:
name: ClassVar = 'dir_info'
editable: bool = False
@classmethod
def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional['DirInfo']:
if d is None:
... | @dataclass
class DirInfo:
@classmethod
def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional['DirInfo']:
pass
def _to_dict(self) -> Dict[str, Any]:
pass | 5 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 0 | 3 | 0 | 0 | 1 | 0 | 2 | 2 | 13 | 3 | 10 | 6 | 6 | 0 | 9 | 5 | 6 | 2 | 0 | 1 | 3 |
14,443 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/direct_url.py | pipenv.patched.pip._internal.models.direct_url.DirectUrl | import urllib.parse
import json
from typing import Any, ClassVar, Dict, Iterable, Optional, Type, TypeVar, Union
from dataclasses import dataclass
@dataclass
class DirectUrl:
url: str
info: InfoType
subdirectory: Optional[str] = None
def _remove_auth_from_netloc(self, netloc: str) -> str:
if '... | @dataclass
class DirectUrl:
def _remove_auth_from_netloc(self, netloc: str) -> str:
pass
@property
def redacted_url(self) -> str:
'''url with user:password part removed unless it is formed with
environment variables as specified in PEP 610, or it is ``git``
in the case of a ... | 13 | 1 | 6 | 0 | 6 | 1 | 1 | 0.07 | 0 | 7 | 3 | 0 | 6 | 0 | 8 | 8 | 66 | 8 | 54 | 18 | 42 | 4 | 32 | 15 | 23 | 4 | 0 | 1 | 11 |
14,444 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/direct_url.py | pipenv.patched.pip._internal.models.direct_url.VcsInfo | from typing import Any, ClassVar, Dict, Iterable, Optional, Type, TypeVar, Union
from dataclasses import dataclass
@dataclass
class VcsInfo:
name: ClassVar = 'vcs_info'
vcs: str
commit_id: str
requested_revision: Optional[str] = None
@classmethod
def _from_dict(cls, d: Optional[Dict[str, Any]]... | @dataclass
class VcsInfo:
@classmethod
def _from_dict(cls, d: Optional[Dict[str, Any]]) -> Optional['VcsInfo']:
pass
def _to_dict(self) -> Dict[str, Any]:
pass | 5 | 0 | 7 | 0 | 7 | 0 | 2 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 2 | 2 | 23 | 3 | 20 | 6 | 16 | 0 | 11 | 5 | 8 | 2 | 0 | 1 | 3 |
14,445 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/format_control.py | pipenv.patched.pip._internal.models.format_control.FormatControl | from pipenv.patched.pip._internal.exceptions import CommandError
from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name
from typing import FrozenSet, Optional, Set
class FormatControl:
"""Helper for managing formats from which a package can be installed."""
__slots__ = ['no_binary', 'only_bin... |
class FormatControl:
'''Helper for managing formats from which a package can be installed.'''
def __init__(self, no_binary: Optional[Set[str]]=None, only_binary: Optional[Set[str]]=None) -> None:
pass
def __eq__(self, other: object) -> bool:
pass
def __repr__(self) -> str:
pa... | 8 | 1 | 10 | 1 | 9 | 0 | 3 | 0.03 | 0 | 5 | 0 | 0 | 5 | 2 | 6 | 6 | 71 | 10 | 59 | 18 | 47 | 2 | 45 | 13 | 38 | 6 | 0 | 2 | 19 |
14,446 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/index.py | pipenv.patched.pip._internal.models.index.PackageIndex | import urllib.parse
class PackageIndex:
"""Represents a Package Index and provides easier access to endpoints"""
__slots__ = ['url', 'netloc', 'simple_url', 'pypi_url', 'file_storage_domain']
def __init__(self, url: str, file_storage_domain: str) -> None:
super().__init__()
self.url = url
... |
class PackageIndex:
'''Represents a Package Index and provides easier access to endpoints'''
def __init__(self, url: str, file_storage_domain: str) -> None:
pass
def _url_for_path(self, path: str) -> str:
pass | 3 | 1 | 7 | 1 | 5 | 2 | 1 | 0.36 | 0 | 2 | 0 | 0 | 2 | 5 | 2 | 2 | 19 | 4 | 11 | 9 | 8 | 4 | 11 | 9 | 8 | 1 | 0 | 0 | 2 |
14,447 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/installation_report.py | pipenv.patched.pip._internal.models.installation_report.InstallationReport | from pipenv.patched.pip import __version__
from typing import Any, Dict, Sequence
from pipenv.patched.pip._vendor.packaging.markers import default_environment
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
class InstallationReport:
def __init__(self, install_requirements: Sequence[Ins... |
class InstallationReport:
def __init__(self, install_requirements: Sequence[InstallRequirement]):
pass
@classmethod
def _install_req_to_dict(cls, ireq: InstallRequirement) -> Dict[str, Any]:
pass
def to_dict(self) -> Dict[str, Any]:
pass | 5 | 0 | 15 | 0 | 8 | 7 | 2 | 0.84 | 0 | 3 | 1 | 0 | 2 | 1 | 3 | 3 | 48 | 2 | 25 | 7 | 20 | 21 | 11 | 6 | 7 | 3 | 0 | 1 | 5 |
14,448 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/link.py | pipenv.patched.pip._internal.models.link.Link | import urllib.parse
from pipenv.patched.pip._internal.utils.filetypes import WHEEL_EXTENSION
from pipenv.patched.pip._internal.utils.hashes import Hashes
from pipenv.patched.pip._internal.utils.deprecation import deprecated
import posixpath
from typing import TYPE_CHECKING, Any, Dict, List, Mapping, NamedTuple, Optiona... | @functools.total_ordering
class Link:
'''Represents a parsed link from a Package Index's simple URL'''
def __init__(self, url: str, comes_from: Optional[Union[str, 'IndexContent']]=None, requires_python: Optional[str]=None, yanked_reason: Optional[str]=None, metadata_file_data: Optional[MetadataFile]=None, cac... | 54 | 7 | 9 | 1 | 6 | 2 | 2 | 0.3 | 0 | 8 | 3 | 0 | 29 | 9 | 31 | 31 | 346 | 53 | 228 | 108 | 158 | 68 | 149 | 71 | 116 | 7 | 0 | 2 | 57 |
14,449 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/link.py | pipenv.patched.pip._internal.models.link.LinkHash | from dataclasses import dataclass
import functools
from pipenv.patched.pip._internal.utils.hashes import Hashes
import re
from typing import TYPE_CHECKING, Any, Dict, List, Mapping, NamedTuple, Optional, Tuple, Union
@dataclass(frozen=True)
class LinkHash:
"""Links to content may have embedded hash values. This cl... | @dataclass(frozen=True)
class LinkHash:
'''Links to content may have embedded hash values. This class parses those.
`name` must be any member of `_SUPPORTED_HASHES`.
This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
be JSON-serializable to conform to PEP 610, this class... | 9 | 4 | 4 | 0 | 3 | 1 | 1 | 0.65 | 0 | 3 | 1 | 0 | 4 | 0 | 5 | 5 | 51 | 9 | 26 | 10 | 18 | 17 | 20 | 9 | 14 | 2 | 0 | 1 | 7 |
14,450 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/link.py | pipenv.patched.pip._internal.models.link.MetadataFile | from typing import TYPE_CHECKING, Any, Dict, List, Mapping, NamedTuple, Optional, Tuple, Union
from dataclasses import dataclass
@dataclass(frozen=True)
class MetadataFile:
"""Information about a core metadata file associated with a distribution."""
hashes: Optional[Dict[str, str]]
def __post_init__(self)... | @dataclass(frozen=True)
class MetadataFile:
'''Information about a core metadata file associated with a distribution.'''
def __post_init__(self) -> None:
pass | 3 | 1 | 3 | 0 | 3 | 0 | 2 | 0.2 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 8 | 2 | 5 | 2 | 3 | 1 | 5 | 2 | 3 | 2 | 0 | 1 | 2 |
14,451 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/link.py | pipenv.patched.pip._internal.models.link._CleanResult | from typing import TYPE_CHECKING, Any, Dict, List, Mapping, NamedTuple, Optional, Tuple, Union
import urllib.parse
class _CleanResult(NamedTuple):
"""Convert link for equivalency check.
This is used in the resolver to check whether two URL-specified requirements
likely point to the same distribution and c... |
class _CleanResult(NamedTuple):
'''Convert link for equivalency check.
This is used in the resolver to check whether two URL-specified requirements
likely point to the same distribution and can be considered equivalent. This
equivalency logic avoids comparing URLs literally, which can be too strict
... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 4 | 5 | 1 | 4 | 21 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
14,452 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/scheme.py | pipenv.patched.pip._internal.models.scheme.Scheme | from dataclasses import dataclass
@dataclass(frozen=True)
class Scheme:
"""A Scheme holds paths which are used as the base directories for
artifacts associated with a Python package.
"""
__slots__ = SCHEME_KEYS
platlib: str
purelib: str
headers: str
scripts: str
data: str | @dataclass(frozen=True)
class Scheme:
'''A Scheme holds paths which are used as the base directories for
artifacts associated with a Python package.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.43 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 7 | 2 | 6 | 3 | 7 | 2 | 6 | 0 | 0 | 0 | 0 |
14,453 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/search_scope.py | pipenv.patched.pip._internal.models.search_scope.SearchScope | from pipenv.patched.pip._internal.utils.misc import normalize_path, redact_auth_from_url
import urllib.parse
from typing import Dict, List, Optional
import os
import posixpath
from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name
import itertools
from dataclasses import dataclass
from pipenv.patched.... | @dataclass(frozen=False)
class SearchScope:
'''
Encapsulates the locations that pip is configured to search.
'''
@classmethod
def create(cls, find_links: List[str], index_urls: List[str], no_index: bool, index_lookup: Optional[Dict[str, List[str]]]=None, index_restricted: bool=False) -> 'SearchScope... | 7 | 3 | 29 | 3 | 19 | 8 | 4 | 0.37 | 0 | 3 | 0 | 0 | 2 | 0 | 3 | 3 | 117 | 13 | 76 | 26 | 63 | 28 | 46 | 18 | 41 | 7 | 0 | 3 | 17 |
14,454 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/selection_prefs.py | pipenv.patched.pip._internal.models.selection_prefs.SelectionPreferences | from typing import Optional
from pipenv.patched.pip._internal.models.format_control import FormatControl
class SelectionPreferences:
"""
Encapsulates the candidate selection preferences for downloading
and installing files.
"""
__slots__ = ['allow_yanked', 'allow_all_prereleases', 'format_control',... |
class SelectionPreferences:
'''
Encapsulates the candidate selection preferences for downloading
and installing files.
'''
def __init__(self, allow_yanked: bool, allow_all_prereleases: bool=False, format_control: Optional[FormatControl]=None, prefer_binary: bool=False, ignore_requires_python: Opti... | 2 | 2 | 28 | 2 | 15 | 11 | 2 | 0.83 | 0 | 2 | 1 | 0 | 1 | 5 | 1 | 1 | 46 | 4 | 23 | 15 | 14 | 19 | 10 | 8 | 8 | 2 | 0 | 1 | 2 |
14,455 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/target_python.py | pipenv.patched.pip._internal.models.target_python.TargetPython | from pipenv.patched.pip._vendor.packaging.tags import Tag
from pipenv.patched.pip._internal.utils.misc import normalize_version_info
import sys
from pipenv.patched.pip._internal.utils.compatibility_tags import get_supported, version_info_to_nodot
from typing import List, Optional, Set, Tuple
class TargetPython:
""... |
class TargetPython:
'''
Encapsulates the properties of a Python interpreter one is targeting
for a package install, download, etc.
'''
def __init__(self, platforms: Optional[List[str]]=None, py_version_info: Optional[Tuple[int, ...]]=None, abis: Optional[List[str]]=None, implementation: Optional[s... | 5 | 5 | 23 | 3 | 14 | 7 | 2 | 0.49 | 0 | 5 | 1 | 0 | 4 | 8 | 4 | 4 | 112 | 15 | 65 | 26 | 54 | 32 | 34 | 20 | 29 | 3 | 0 | 2 | 9 |
14,456 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/models/wheel.py | pipenv.patched.pip._internal.models.wheel.Wheel | import re
from pipenv.patched.pip._vendor.packaging.tags import Tag
from pipenv.patched.pip._internal.exceptions import InvalidWheelFilename
from typing import Dict, Iterable, List, Optional
from pipenv.patched.pip._internal.utils.deprecation import deprecated
from pipenv.patched.pip._vendor.packaging.utils import Inva... |
class Wheel:
'''A wheel file'''
def __init__(self, filename: str) -> None:
pass
@property
def build_tag(self) -> BuildTag:
pass
def get_formatted_file_tags(self) -> List[str]:
'''Return the wheel's tags as a sorted list of strings.'''
pass
def support_index_mi... | 8 | 5 | 17 | 2 | 10 | 6 | 2 | 0.52 | 0 | 7 | 1 | 0 | 5 | 8 | 5 | 5 | 101 | 16 | 56 | 21 | 48 | 29 | 32 | 17 | 26 | 4 | 0 | 2 | 9 |
14,457 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.Credentials | from typing import Any, Dict, List, NamedTuple, Optional, Tuple
class Credentials(NamedTuple):
url: str
username: str
password: str |
class Credentials(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,458 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.KeyRingBaseProvider | from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInfo
from abc import ABC, abstractmethod
from typing import Any, Dict, List, NamedTuple, Optional, Tuple
class KeyRingBaseProvider(ABC):
"""Keyring base provider interface"""
has_keyring: bool
@abstractmethod
def get_auth_info(self, url: ... |
class KeyRingBaseProvider(ABC):
'''Keyring base provider interface'''
@abstractmethod
def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
pass
@abstractmethod
def save_auth_info(self, url: str, username: str, password: str) -> None: | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.13 | 1 | 1 | 0 | 3 | 2 | 0 | 2 | 22 | 12 | 3 | 8 | 7 | 3 | 1 | 6 | 3 | 3 | 1 | 4 | 0 | 2 |
14,459 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.KeyRingCliProvider | import os
from typing import Any, Dict, List, NamedTuple, Optional, Tuple
from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInfo
import subprocess
class KeyRingCliProvider(KeyRingBaseProvider):
"""Provider which uses `keyring` cli
Instead of calling the keyring package installed alongside pip
... | null | 6 | 3 | 8 | 0 | 7 | 1 | 2 | 0.26 | 1 | 1 | 0 | 0 | 5 | 1 | 5 | 27 | 57 | 8 | 39 | 13 | 33 | 10 | 29 | 13 | 23 | 3 | 5 | 2 | 10 |
14,460 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.KeyRingNullProvider | from typing import Any, Dict, List, NamedTuple, Optional, Tuple
from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInfo
class KeyRingNullProvider(KeyRingBaseProvider):
"""Keyring null provider"""
has_keyring = False
def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthIn... |
class KeyRingNullProvider(KeyRingBaseProvider):
'''Keyring null provider'''
def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
pass
def save_auth_info(self, url: str, username: str, password: str) -> None: | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.17 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 24 | 10 | 3 | 6 | 4 | 3 | 1 | 6 | 4 | 3 | 1 | 5 | 0 | 2 |
14,461 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.KeyRingPythonProvider | from pipenv.patched.pip._internal.vcs.versioncontrol import AuthInfo
from typing import Any, Dict, List, NamedTuple, Optional, Tuple
class KeyRingPythonProvider(KeyRingBaseProvider):
"""Keyring interface which uses locally imported `keyring`"""
has_keyring = True
def __init__(self) -> None:
import... |
class KeyRingPythonProvider(KeyRingBaseProvider):
'''Keyring interface which uses locally imported `keyring`'''
def __init__(self) -> None:
pass
def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
pass
def save_auth_info(self, url: str, username: str, pa... | 4 | 1 | 8 | 1 | 6 | 1 | 2 | 0.2 | 1 | 1 | 0 | 0 | 3 | 1 | 3 | 25 | 30 | 6 | 20 | 9 | 15 | 4 | 20 | 9 | 15 | 5 | 5 | 2 | 7 |
14,462 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/auth.py | pipenv.patched.pip._internal.network.auth.MultiDomainBasicAuth | from pipenv.patched.pip._vendor.requests.models import Request, Response
from typing import Any, Dict, List, NamedTuple, Optional, Tuple
from os.path import commonprefix
from pipenv.patched.pip._vendor.requests.utils import get_netrc_auth
import urllib.parse
from pipenv.patched.pip._internal.vcs.versioncontrol import A... | null | 18 | 6 | 23 | 3 | 14 | 6 | 4 | 0.4 | 1 | 9 | 5 | 0 | 14 | 5 | 14 | 15 | 343 | 56 | 205 | 70 | 167 | 83 | 145 | 47 | 129 | 10 | 1 | 2 | 49 |
14,463 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/cache.py | pipenv.patched.pip._internal.network.cache.SafeFileCache | from typing import BinaryIO, Generator, Optional, Union
from pipenv.patched.pip._vendor.cachecontrol.cache import SeparateBodyBaseCache
from pipenv.patched.pip._internal.utils.misc import ensure_dir
from pipenv.patched.pip._vendor.cachecontrol.caches import SeparateBodyFileCache
from pipenv.patched.pip._internal.utils.... |
class SafeFileCache(SeparateBodyBaseCache):
'''
A file based cache which is safe to use even when the target directory may
not be accessible or writable.
There is a race condition when two processes try to write and/or read the
same entry at the same time, since each entry consists of two separate
... | 9 | 1 | 6 | 0 | 5 | 1 | 1 | 0.43 | 1 | 8 | 1 | 0 | 8 | 1 | 8 | 14 | 75 | 12 | 44 | 23 | 33 | 19 | 42 | 19 | 33 | 2 | 2 | 2 | 10 |
14,464 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/download.py | pipenv.patched.pip._internal.network.download.BatchDownloader | from typing import BinaryIO, Iterable, Optional, Tuple
from pipenv.patched.pip._internal.models.link import Link
from pipenv.patched.pip._internal.network.session import PipSession
class BatchDownloader:
def __init__(self, session: PipSession, progress_bar: str, resume_retries: int) -> None:
self._downloa... |
class BatchDownloader:
def __init__(self, session: PipSession, progress_bar: str, resume_retries: int) -> None:
pass
def __call__(self, links: Iterable[Link], location: str) -> Iterable[Tuple[Link, Tuple[str, str]]]:
'''Download the files given by links into location.'''
pass | 3 | 1 | 16 | 1 | 15 | 1 | 3 | 0.03 | 0 | 4 | 3 | 0 | 2 | 2 | 2 | 2 | 34 | 3 | 30 | 20 | 21 | 1 | 20 | 12 | 17 | 4 | 0 | 3 | 5 |
14,465 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/download.py | pipenv.patched.pip._internal.network.download.Downloader | from pipenv.patched.pip._internal.exceptions import IncompleteDownloadError, NetworkConnectionError
import os
from pipenv.patched.pip._vendor.requests.models import Response
from pipenv.patched.pip._internal.utils.misc import format_size, redact_auth_from_url, splitext
from typing import BinaryIO, Iterable, Optional, T... |
class Downloader:
def __init__(self, session: PipSession, progress_bar: str, resume_retries: int) -> None:
pass
def __call__(self, link: Link, location: str) -> Tuple[str, str]:
'''Download the file given by link into location.'''
pass
def _process_response(self, resp: Response, ... | 7 | 5 | 14 | 1 | 12 | 1 | 2 | 0.04 | 0 | 4 | 3 | 0 | 2 | 2 | 2 | 2 | 29 | 3 | 25 | 17 | 18 | 1 | 19 | 11 | 16 | 3 | 0 | 2 | 4 |
14,466 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/lazy_wheel.py | pipenv.patched.pip._internal.network.lazy_wheel.LazyZipOverHTTP | from bisect import bisect_left, bisect_right
from pipenv.patched.pip._internal.network.session import PipSession
from pipenv.patched.pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
from zipfile import BadZipFile, ZipFile
from contextlib import contextmanager
from typing import Any, Dict, Generator, List... |
class LazyZipOverHTTP:
'''File-like object mapped to a ZIP file over HTTP.
This uses HTTP range requests to lazily fetch the file's content,
which is supposed to be fed to ZipFile. If such requests are not
supported by the server, raise HTTPRangeRequestUnsupported
during initialization.
'''
... | 24 | 17 | 7 | 0 | 5 | 2 | 1 | 0.46 | 0 | 13 | 3 | 0 | 19 | 7 | 19 | 19 | 171 | 26 | 99 | 50 | 69 | 46 | 88 | 40 | 68 | 4 | 0 | 3 | 28 |
14,467 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.CacheControlAdapter | from pipenv.patched.pip._vendor.cachecontrol import CacheControlAdapter as _BaseCacheControlAdapter
class CacheControlAdapter(_SSLContextAdapterMixin, _BaseCacheControlAdapter):
pass |
class CacheControlAdapter(_SSLContextAdapterMixin, _BaseCacheControlAdapter):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 24 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
14,468 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.HTTPAdapter | from pipenv.patched.pip._vendor.requests.adapters import HTTPAdapter as _BaseHTTPAdapter
class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter):
pass |
class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 20 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
14,469 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.InsecureCacheControlAdapter | from pipenv.patched.pip._vendor.urllib3.connectionpool import ConnectionPool
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Mapping, Optional, Sequence, Tuple, Union
from pipenv.patched.pip._vendor.cachecontrol import CacheControlAdapter as _BaseCacheControlAdapter
class InsecureCacheControlAdapter(Cach... |
class InsecureCacheControlAdapter(CacheControlAdapter):
def cert_verify(self, conn: ConnectionPool, url: str, verify: Union[bool, str], cert: Optional[Union[str, Tuple[str, str]]]) -> None:
pass | 2 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 4 | 1 | 0 | 1 | 0 | 1 | 25 | 9 | 0 | 9 | 8 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
14,470 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.InsecureHTTPAdapter | from pipenv.patched.pip._vendor.requests.adapters import HTTPAdapter as _BaseHTTPAdapter
from pipenv.patched.pip._vendor.urllib3.connectionpool import ConnectionPool
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Mapping, Optional, Sequence, Tuple, Union
class InsecureHTTPAdapter(HTTPAdapter):
def ... |
class InsecureHTTPAdapter(HTTPAdapter):
def cert_verify(self, conn: ConnectionPool, url: str, verify: Union[bool, str], cert: Optional[Union[str, Tuple[str, str]]]) -> None:
pass | 2 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 4 | 1 | 0 | 1 | 0 | 1 | 21 | 9 | 0 | 9 | 8 | 1 | 0 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
14,471 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.LocalFSAdapter | from typing import TYPE_CHECKING, Any, Dict, Generator, List, Mapping, Optional, Sequence, Tuple, Union
import mimetypes
import email.utils
from pipenv.patched.pip._vendor.requests.models import PreparedRequest, Response
from pipenv.patched.pip._vendor.requests.adapters import DEFAULT_POOLBLOCK, BaseAdapter
from pipenv... |
class LocalFSAdapter(BaseAdapter):
def send(self, request: PreparedRequest, stream: bool=False, timeout: Optional[Union[float, Tuple[float, float]]]=None, verify: Union[bool, str]=True, cert: Optional[Union[str, Tuple[str, str]]]=None, proxies: Optional[Mapping[str, str]]=None) -> Response:
pass
def ... | 3 | 0 | 20 | 2 | 17 | 1 | 2 | 0.06 | 1 | 8 | 3 | 0 | 2 | 0 | 2 | 5 | 42 | 5 | 35 | 17 | 24 | 2 | 21 | 8 | 18 | 2 | 1 | 1 | 3 |
14,472 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session.PipSession | import urllib.parse
from pipenv.patched.pip._vendor.requests.models import PreparedRequest, Response
from pipenv.patched.pip._internal.network.cache import SafeFileCache
from pipenv.patched.pip._vendor.cachecontrol import CacheControlAdapter as _BaseCacheControlAdapter
from pipenv.patched.pip._internal.network.auth imp... |
class PipSession(requests.Session):
def __init__(self, *args: Any, retries: int=0, cache: Optional[str]=None, trusted_hosts: Sequence[str]=(), index_urls:
'''
:param trusted_hosts: Domains not to emit warnings for when not using
HTTPS.
'''
pass
def update_index_url... | 7 | 3 | 33 | 3 | 19 | 11 | 4 | 0.57 | 1 | 16 | 10 | 0 | 6 | 3 | 6 | 31 | 203 | 25 | 114 | 34 | 96 | 65 | 67 | 23 | 60 | 7 | 2 | 3 | 21 |
14,473 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/session.py | pipenv.patched.pip._internal.network.session._SSLContextAdapterMixin | from pipenv.patched.pip._vendor.requests.adapters import DEFAULT_POOLBLOCK, BaseAdapter
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Mapping, Optional, Sequence, Tuple, Union
class _SSLContextAdapterMixin:
"""Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.
The addition... |
class _SSLContextAdapterMixin:
'''Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.
The additional argument is forwarded directly to the pool manager. This allows us
to dynamically decide what SSL store to use at runtime, which is used to implement
the optional ``truststore`` back... | 3 | 1 | 12 | 0 | 12 | 1 | 2 | 0.25 | 0 | 4 | 0 | 2 | 2 | 1 | 2 | 2 | 32 | 3 | 24 | 15 | 10 | 6 | 8 | 4 | 5 | 2 | 0 | 1 | 3 |
14,474 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/network/xmlrpc.py | pipenv.patched.pip._internal.network.xmlrpc.PipXmlrpcTransport | import xmlrpc.client
import urllib.parse
from pipenv.patched.pip._internal.exceptions import NetworkConnectionError
from pipenv.patched.pip._internal.network.session import PipSession
from typing import TYPE_CHECKING, Tuple
from pipenv.patched.pip._internal.network.utils import raise_for_status
class PipXmlrpcTranspor... |
class PipXmlrpcTransport(xmlrpc.client.Transport):
'''Provide a `xmlrpclib.Transport` implementation via a `PipSession`
object.
'''
def __init__(self, index_url: str, session: PipSession, use_datetime: bool=False) -> None:
pass
def request(self, host: '_HostType', handler: str, request_bo... | 3 | 1 | 18 | 0 | 18 | 0 | 2 | 0.08 | 1 | 5 | 2 | 0 | 2 | 3 | 2 | 13 | 42 | 2 | 37 | 20 | 26 | 3 | 20 | 11 | 17 | 2 | 1 | 1 | 3 |
14,475 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/build/build_tracker.py | pipenv.patched.pip._internal.operations.build.build_tracker.BuildTracker | from types import TracebackType
import hashlib
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from typing import Dict, Generator, Optional, Type, Union
import contextlib
import os
class BuildTracker:
"""Ensure that an sdist cannot request itself as a setup requirement.
When an sdi... |
class BuildTracker:
'''Ensure that an sdist cannot request itself as a setup requirement.
When an sdist is prepared, it identifies its setup requirements in the
context of ``BuildTracker.track()``. If a requirement shows up recursively, this
raises an exception.
This stops fork bombs embedded in ma... | 10 | 4 | 8 | 1 | 6 | 1 | 1 | 0.34 | 0 | 7 | 2 | 0 | 8 | 2 | 8 | 8 | 82 | 19 | 47 | 24 | 32 | 16 | 41 | 17 | 32 | 2 | 0 | 2 | 10 |
14,476 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/build/build_tracker.py | pipenv.patched.pip._internal.operations.build.build_tracker.TrackerId | class TrackerId(str):
"""Uniquely identifying string provided to the build tracker.""" | class TrackerId(str):
'''Uniquely identifying string provided to the build tracker.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 2 | 0 | 0 |
14,477 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/check.py | pipenv.patched.pip._internal.operations.check.PackageDetails | from typing import Callable, Dict, FrozenSet, Generator, Iterable, List, NamedTuple, Optional, Set, Tuple
from pipenv.patched.pip._vendor.packaging.version import Version
from pipenv.patched.pip._vendor.packaging.requirements import Requirement
class PackageDetails(NamedTuple):
version: Version
dependencies: L... |
class PackageDetails(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 |
14,478 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/freeze.py | pipenv.patched.pip._internal.operations.freeze.FrozenRequirement | from dataclasses import dataclass, field
from pipenv.patched.pip._vendor.packaging.utils import NormalizedName, canonicalize_name
from typing import Container, Dict, Generator, Iterable, List, NamedTuple, Optional, Set
from pipenv.patched.pip._internal.utils.direct_url_helpers import direct_url_as_pep440_direct_referen... | @dataclass(frozen=True)
class FrozenRequirement:
@property
def canonical_name(self) -> NormalizedName:
pass
@classmethod
def from_dist(cls, dist: BaseDistribution) -> 'FrozenRequirement':
pass
def __str__(self) -> str:
pass | 7 | 0 | 11 | 0 | 10 | 1 | 2 | 0.06 | 0 | 4 | 1 | 0 | 2 | 5 | 3 | 3 | 36 | 3 | 31 | 20 | 20 | 2 | 22 | 13 | 18 | 3 | 0 | 2 | 6 |
14,479 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/freeze.py | pipenv.patched.pip._internal.operations.freeze._EditableInfo | from typing import Container, Dict, Generator, Iterable, List, NamedTuple, Optional, Set
class _EditableInfo(NamedTuple):
requirement: str
comments: List[str] |
class _EditableInfo(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 |
14,480 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/install/wheel.py | pipenv.patched.pip._internal.operations.install.wheel.File | from typing import IO, Any, BinaryIO, Callable, Dict, Generator, Iterable, Iterator, List, NewType, Optional, Protocol, Sequence, Set, Tuple, Union, cast
class File(Protocol):
src_record_path: 'RecordPath'
dest_path: str
changed: bool
def save(self) -> None:
pass |
class File(Protocol):
def save(self) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 25 | 7 | 1 | 6 | 2 | 4 | 0 | 6 | 2 | 4 | 1 | 5 | 0 | 1 |
14,481 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/install/wheel.py | pipenv.patched.pip._internal.operations.install.wheel.MissingCallableSuffix | from pipenv.patched.pip._internal.exceptions import InstallationError
class MissingCallableSuffix(InstallationError):
def __init__(self, entry_point: str) -> None:
super().__init__(f'Invalid script entry point: {entry_point} - A callable suffix is required. Cf https://packaging.python.org/specifications/e... |
class MissingCallableSuffix(InstallationError):
def __init__(self, entry_point: str) -> None:
pass | 2 | 0 | 7 | 0 | 7 | 1 | 1 | 0.13 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 8 | 0 | 8 | 2 | 6 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
14,482 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/install/wheel.py | pipenv.patched.pip._internal.operations.install.wheel.PipScriptMaker | from pipenv.patched.pip._vendor.distlib.scripts import ScriptMaker
from typing import IO, Any, BinaryIO, Callable, Dict, Generator, Iterable, Iterator, List, NewType, Optional, Protocol, Sequence, Set, Tuple, Union, cast
class PipScriptMaker(ScriptMaker):
def make(self, specification: str, options: Optional[Dict[... |
class PipScriptMaker(ScriptMaker):
def make(self, specification: str, options: Optional[Dict[str, Any]]=None) -> List[str]:
pass | 2 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 18 | 6 | 0 | 6 | 4 | 2 | 0 | 4 | 2 | 2 | 1 | 2 | 0 | 1 |
14,483 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/install/wheel.py | pipenv.patched.pip._internal.operations.install.wheel.ScriptFile | class ScriptFile:
def __init__(self, file: 'File') -> None:
self._file = file
self.src_record_path = self._file.src_record_path
self.dest_path = self._file.dest_path
self.changed = False
def save(self) -> None:
self._file.save()
self.changed = fix_script(self.de... | class ScriptFile:
def __init__(self, file: 'File') -> None:
pass
def save(self) -> None:
pass | 3 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 4 | 2 | 2 | 10 | 1 | 9 | 7 | 6 | 0 | 9 | 7 | 6 | 1 | 0 | 0 | 2 |
14,484 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/install/wheel.py | pipenv.patched.pip._internal.operations.install.wheel.ZipBackedFile | import shutil
from pipenv.patched.pip._internal.utils.unpacking import current_umask, is_within_directory, set_extracted_file_to_default_mode_plus_executable, zip_item_is_executable
from zipfile import ZipFile, ZipInfo
import os.path
class ZipBackedFile:
def __init__(self, src_record_path: RecordPath, dest_path: ... |
class ZipBackedFile:
def __init__(self, src_record_path: RecordPath, dest_path: str, zip_file: ZipFile) -> None:
pass
def _getinfo(self) -> ZipInfo:
pass
def save(self) -> None:
pass | 4 | 0 | 11 | 1 | 7 | 3 | 2 | 0.48 | 0 | 3 | 0 | 0 | 3 | 4 | 3 | 3 | 36 | 5 | 21 | 14 | 15 | 10 | 19 | 10 | 15 | 4 | 0 | 3 | 6 |
14,485 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/prepare.py | pipenv.patched.pip._internal.operations.prepare.File | from typing import Dict, Iterable, List, Optional
import mimetypes
from dataclasses import dataclass
@dataclass
class File:
path: str
content_type: Optional[str] = None
def __post_init__(self) -> None:
if self.content_type is None:
try:
self.content_type = mimetypes.gue... | @dataclass
class File:
def __post_init__(self) -> None:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 7 | 1 | 6 | 3 | 4 | 0 | 6 | 3 | 4 | 2 | 0 | 1 | 2 |
14,486 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/operations/prepare.py | pipenv.patched.pip._internal.operations.prepare.RequirementPreparer | from pipenv.patched.pip._internal.models.link import Link
from pipenv.patched.pip._internal.utils.direct_url_helpers import direct_url_for_editable, direct_url_from_link
from typing import Dict, Iterable, List, Optional
from pipenv.patched.pip._internal.index.package_finder import PackageFinder
from pipenv.patched.pip.... |
class RequirementPreparer:
'''Prepares a Requirement'''
def __init__(self, build_dir: str, download_dir: Optional[str], src_dir: str, build_isolation: bool, check_build_deps: bool, build_tracker: BuildTracker, session: PipSession, progress_bar: str, finder: PackageFinder, require_hashes: bool, use_user_site: ... | 15 | 10 | 36 | 3 | 25 | 8 | 4 | 0.3 | 0 | 27 | 22 | 0 | 14 | 17 | 14 | 14 | 518 | 55 | 356 | 108 | 297 | 108 | 211 | 62 | 196 | 10 | 0 | 3 | 61 |
14,487 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/__init__.py | pipenv.patched.pip._internal.req.InstallationResult | from dataclasses import dataclass
@dataclass(frozen=True)
class InstallationResult:
name: str | @dataclass(frozen=True)
class InstallationResult:
pass | 2 | 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,488 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/constructors.py | pipenv.patched.pip._internal.req.constructors.RequirementParts | from pipenv.patched.pip._vendor.packaging.requirements import InvalidRequirement, Requirement
from pipenv.patched.pip._vendor.packaging.markers import Marker
from typing import Collection, Dict, List, Optional, Set, Tuple, Union
from pipenv.patched.pip._internal.models.link import Link
from dataclasses import dataclass... | @dataclass(frozen=True)
class RequirementParts:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 0 | 0 | 0 |
14,489 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_file.py | pipenv.patched.pip._internal.req.req_file.OptionParsingError | class OptionParsingError(Exception):
def __init__(self, msg: str) -> None:
self.msg = msg | class OptionParsingError(Exception):
def __init__(self, msg: str) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 11 | 3 | 0 | 3 | 3 | 1 | 0 | 3 | 3 | 1 | 1 | 3 | 0 | 1 |
14,490 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_file.py | pipenv.patched.pip._internal.req.req_file.ParsedLine | from optparse import Values
from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, List, NoReturn, Optional, Tuple
from dataclasses import dataclass
@dataclass(frozen=True)
class ParsedLine:
__slots__ = ('filename', 'lineno', 'args', 'opts', 'constraint')
filename: str
lineno: int
... | @dataclass(frozen=True)
class ParsedLine:
@property
def is_editable(self) -> bool:
pass
@property
def requirement(self) -> Optional[str]:
pass | 6 | 0 | 24 | 1 | 22 | 1 | 3 | 0.04 | 0 | 4 | 0 | 0 | 1 | 7 | 1 | 1 | 25 | 1 | 23 | 16 | 14 | 1 | 14 | 9 | 12 | 3 | 0 | 1 | 3 |
14,491 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_file.py | pipenv.patched.pip._internal.req.req_file.ParsedRequirement | from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, List, NoReturn, Optional, Tuple
@dataclass(frozen=True)
class ParsedRequirement:
__slots__ = ('requirement', 'is_editable', 'comes_from', 'constraint', 'options', 'line_source')
requirement: str
is... | @dataclass(frozen=True)
class ParsedRequirement:
pass | 2 | 0 | 15 | 0 | 15 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 1 | 6 | 1 | 1 | 16 | 0 | 16 | 16 | 6 | 0 | 8 | 8 | 6 | 1 | 0 | 0 | 1 |
14,492 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_file.py | pipenv.patched.pip._internal.req.req_file.RequirementsFileParser | from pipenv.patched.pip._internal.exceptions import InstallationError, RequirementsFileParseError
import os
from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, List, NoReturn, Optional, Tuple
import urllib.parse
class RequirementsFileParser:
def __init__(self, session: 'PipSession', line_p... |
class RequirementsFileParser:
def __init__(self, session: 'PipSession', line_parser: LineParser) -> None:
pass
def parse(self, filename: str, constraint: bool) -> Generator[ParsedLine, None, None]:
'''Parse a given file, yielding parsed lines.'''
pass
def _parse_and_recurse(self,... | 5 | 1 | 22 | 1 | 19 | 2 | 3 | 0.12 | 0 | 4 | 2 | 0 | 4 | 2 | 4 | 4 | 91 | 7 | 75 | 33 | 57 | 9 | 36 | 19 | 31 | 8 | 0 | 3 | 13 |
14,493 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_install.py | pipenv.patched.pip._internal.req.req_install.InstallRequirement | from pipenv.patched.pip._internal.build_env import BuildEnvironment, NoOpBuildEnvironment
import shutil
from pipenv.patched.pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
from pipenv.patched.pip._internal.models.direct_url import DirectUrl
from pipenv.patched.pip._internal.metadata import BaseDistribu... |
class InstallRequirement:
'''
Represents something that may be installed later on, may have information
about where to fetch the relevant requirement and also contains logic for
installing the said requirement.
'''
def __init__(self, req: Optional[Requirement], comes_from: Optional[Union[str, ... | 52 | 16 | 20 | 2 | 15 | 3 | 3 | 0.24 | 0 | 22 | 14 | 0 | 37 | 32 | 37 | 37 | 814 | 95 | 581 | 160 | 494 | 140 | 330 | 112 | 291 | 12 | 0 | 3 | 112 |
14,494 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_set.py | pipenv.patched.pip._internal.req.req_set.RequirementSet | from collections import OrderedDict
from typing import Dict, List
from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
class RequirementSet:
def __init__(self, check_supported_wheels: bool=True) -> None:
"""Cre... |
class RequirementSet:
def __init__(self, check_supported_wheels: bool=True) -> None:
'''Create a RequirementSet.'''
pass
def __str__(self) -> str:
pass
def __repr__(self) -> str:
pass
def add_unnamed_requirement(self, install_req: InstallRequirement) -> None:
... | 12 | 2 | 7 | 1 | 5 | 1 | 1 | 0.1 | 0 | 6 | 1 | 0 | 9 | 3 | 9 | 9 | 71 | 16 | 50 | 21 | 38 | 5 | 31 | 19 | 21 | 2 | 0 | 1 | 10 |
14,495 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_uninstall.py | pipenv.patched.pip._internal.req.req_uninstall.StashedUninstallPathSet | import os
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple
from pipenv.patched.pip._internal.utils.temp_dir import AdjacentTempDirectory, TempDirectory
from pipenv.patched.pip._internal.utils.misc import ask, normalize_path, renames, rmtree
class StashedUninstallPathSet:
"""A... |
class StashedUninstallPathSet:
'''A set of file rename operations to stash files while
tentatively uninstalling them.'''
def __init__(self) -> None:
pass
def _get_directory_stash(self, path: str) -> str:
'''Stashes a directory.
Directories are stashed adjacent to their origina... | 9 | 6 | 13 | 1 | 9 | 3 | 3 | 0.36 | 0 | 6 | 2 | 0 | 7 | 2 | 7 | 7 | 103 | 16 | 64 | 21 | 55 | 23 | 61 | 19 | 53 | 6 | 0 | 3 | 19 |
14,496 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_uninstall.py | pipenv.patched.pip._internal.req.req_uninstall.UninstallPathSet | from pipenv.patched.pip._internal.locations import get_bin_prefix, get_bin_user
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple
import os
from importlib.util import cache_from_source
from pipenv.patched.pip._internal.utils.compat import WINDOWS
from pipenv.patched.pip._internal.u... |
class UninstallPathSet:
'''A set of file paths to be removed in the uninstallation of a
requirement.'''
def __init__(self, dist: BaseDistribution) -> None:
pass
def _permitted(self, path: str) -> bool:
'''
Return True if the given path is one we are permitted to
remove... | 13 | 6 | 26 | 3 | 20 | 3 | 5 | 0.19 | 0 | 8 | 3 | 0 | 8 | 6 | 9 | 9 | 281 | 40 | 203 | 52 | 187 | 38 | 141 | 47 | 129 | 21 | 0 | 3 | 50 |
14,497 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/req/req_uninstall.py | pipenv.patched.pip._internal.req.req_uninstall.UninstallPthEntries | import os
from pipenv.patched.pip._internal.utils.compat import WINDOWS
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple
class UninstallPthEntries:
def __init__(self, pth_file: str) -> None:
self.file = pth_file
self.entries: Set[str] = set()
self._sa... |
class UninstallPthEntries:
def __init__(self, pth_file: str) -> None:
pass
def add(self, entry: str) -> None:
pass
def remove(self) -> None:
pass
def rollback(self) -> bool:
pass | 5 | 0 | 13 | 0 | 10 | 3 | 3 | 0.3 | 0 | 5 | 0 | 0 | 4 | 3 | 4 | 4 | 56 | 4 | 40 | 13 | 35 | 12 | 39 | 11 | 34 | 6 | 0 | 2 | 11 |
14,498 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/base.py | pipenv.patched.pip._internal.resolution.base.BaseResolver | from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.req.req_set import RequirementSet
from typing import Callable, List, Optional
class BaseResolver:
def resolve(self, root_reqs: List[InstallRequirement], check_supported_wheels: bool) -> RequirementSet:
... |
class BaseResolver:
def resolve(self, root_reqs: List[InstallRequirement], check_supported_wheels: bool) -> RequirementSet:
pass
def get_installation_order(self, req_set: RequirementSet) -> List[InstallRequirement]:
pass | 3 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 4 | 2 | 2 | 2 | 0 | 2 | 2 | 10 | 1 | 9 | 7 | 2 | 0 | 5 | 3 | 2 | 1 | 0 | 0 | 2 |
14,499 | pypa/pipenv | pypa_pipenv/pipenv/patched/pip/_internal/resolution/legacy/resolver.py | pipenv.patched.pip._internal.resolution.legacy.resolver.Resolver | from pipenv.patched.pip._internal.operations.prepare import RequirementPreparer
from pipenv.patched.pip._internal.index.package_finder import PackageFinder
from pipenv.patched.pip._internal.models.link import Link
from typing import DefaultDict, Iterable, List, Optional, Set, Tuple
from pipenv.patched.pip._internal.uti... |
class Resolver(BaseResolver):
'''Resolves which packages need to be installed/uninstalled to perform the requested operation without breaking the requirements of any package.
'''
def __init__(self, preparer: RequirementPreparer, finder: PackageFinder, wheel_cache: Optional[WheelCache], make_install_re... | 14 | 9 | 38 | 4 | 24 | 10 | 5 | 0.42 | 1 | 23 | 14 | 0 | 11 | 12 | 11 | 13 | 489 | 64 | 299 | 88 | 256 | 126 | 191 | 58 | 177 | 11 | 1 | 3 | 63 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.