repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
pip
pip-main/src/pip/_vendor/chardet/langbulgarianmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative BULGARIAN_LANG_MODEL = { 63: { # 'e' 63: 1, # 'e' 45: 0, # '\xad' 31: 0, # 'А' 32: 0, # 'Б' 35: 0, # 'В' 43: 0, # 'Г' 37: 0, ...
100,236
20.556344
76
py
pip
pip-main/src/pip/_vendor/chardet/gb2312freq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
20,735
71.757895
91
py
pip
pip-main/src/pip/_vendor/chardet/codingstatemachine.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
3,732
40.021978
80
py
pip
pip-main/src/pip/_vendor/chardet/mbcssm.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
30,391
44.909366
227
py
pip
pip-main/src/pip/_vendor/chardet/jisfreq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
25,796
78.131902
98
py
pip
pip-main/src/pip/_vendor/chardet/escsm.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
12,176
45.477099
177
py
pip
pip-main/src/pip/_vendor/chardet/latin1prober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
5,380
35.358108
85
py
pip
pip-main/src/pip/_vendor/chardet/sbcharsetprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
6,400
38.269939
88
py
pip
pip-main/src/pip/_vendor/chardet/codingstatemachinedict.py
from typing import TYPE_CHECKING, Tuple if TYPE_CHECKING: # TypedDict was introduced in Python 3.8. # # TODO: Remove the else block and TYPE_CHECKING check when dropping support # for Python 3.7. from typing import TypedDict class CodingStateMachineDict(TypedDict, total=False): class_t...
542
26.15
79
py
pip
pip-main/src/pip/_vendor/chardet/enums.py
""" All of the Enums that are used throughout the chardet package. :author: Dan Blanchard (dan.blanchard@gmail.com) """ from enum import Enum, Flag class InputState: """ This enum represents the different states a universal detector can be in. """ PURE_ASCII = 0 ESC_ASCII = 1 HIGH_BYTE = 2 ...
1,683
18.581395
82
py
pip
pip-main/src/pip/_vendor/chardet/eucjpprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
3,934
37.203883
86
py
pip
pip-main/src/pip/_vendor/chardet/langturkishmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative TURKISH_LANG_MODEL = { 23: { # 'A' 23: 0, # 'A' 37: 0, # 'B' 47: 0, # 'C' 39: 0, # 'D' 29: 0, # 'E' 52: 0, # 'F' 36: 0, # 'G'...
94,364
20.539603
80
py
pip
pip-main/src/pip/_vendor/chardet/mbcsgroupprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
2,131
35.758621
82
py
pip
pip-main/src/pip/_vendor/chardet/utf1632prober.py
######################## BEGIN LICENSE BLOCK ######################## # # Contributor(s): # Jason Zavaglia # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the ...
8,505
36.637168
80
py
pip
pip-main/src/pip/_vendor/chardet/euckrprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
1,753
35.541667
69
py
pip
pip-main/src/pip/_vendor/chardet/cp949prober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
1,860
36.22
76
py
pip
pip-main/src/pip/_vendor/chardet/big5prober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
1,763
35.75
69
py
pip
pip-main/src/pip/_vendor/chardet/charsetgroupprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
3,915
35.598131
83
py
pip
pip-main/src/pip/_vendor/chardet/johabprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
1,752
35.520833
69
py
pip
pip-main/src/pip/_vendor/chardet/big5freq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
31,274
79.813953
87
py
pip
pip-main/src/pip/_vendor/chardet/langhebrewmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative HEBREW_LANG_MODEL = { 50: { # 'a' 50: 0, # 'a' 60: 1, # 'c' 61: 1, # 'd' 42: 1, # 'e' 53: 1, # 'i' 56: 2, # 'l' 54: 2, # 'n' ...
94,463
20.5622
70
py
pip
pip-main/src/pip/_vendor/chardet/sjisprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
4,007
36.811321
86
py
pip
pip-main/src/pip/_vendor/chardet/jpcntx.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
27,055
112.205021
254
py
pip
pip-main/src/pip/_vendor/chardet/charsetprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
5,420
35.628378
82
py
pip
pip-main/src/pip/_vendor/chardet/langthaimodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative THAI_LANG_MODEL = { 5: { # 'ก' 5: 2, # 'ก' 30: 2, # 'ข' 24: 2, # 'ค' 8: 2, # 'ง' 26: 2, # 'จ' 52: 0, # 'ฉ' 34: 1, # 'ช' ...
94,362
20.539146
103
py
pip
pip-main/src/pip/_vendor/chardet/utf8prober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
2,812
32.891566
70
py
pip
pip-main/src/pip/_vendor/chardet/johabfreq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
42,498
16.834243
69
py
pip
pip-main/src/pip/_vendor/chardet/langrussianmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative RUSSIAN_LANG_MODEL = { 37: { # 'А' 37: 0, # 'А' 44: 1, # 'Б' 33: 1, # 'В' 46: 1, # 'Г' 41: 1, # 'Д' 48: 1, # 'Е' 56: 1, # 'Ж'...
122,704
20.429445
82
py
pip
pip-main/src/pip/_vendor/chardet/mbcharsetprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
3,715
37.708333
86
py
pip
pip-main/src/pip/_vendor/chardet/version.py
""" This module exists only to simplify retrieving the version number of chardet from within setuptools and from chardet subpackages. :author: Dan Blanchard (dan.blanchard@gmail.com) """ __version__ = "5.1.0" VERSION = __version__.split(".")
244
23.5
76
py
pip
pip-main/src/pip/_vendor/chardet/universaldetector.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
14,848
39.906336
87
py
pip
pip-main/src/pip/_vendor/chardet/euckrfreq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
13,566
67.86802
92
py
pip
pip-main/src/pip/_vendor/chardet/sbcsgroupprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
4,137
45.494382
88
py
pip
pip-main/src/pip/_vendor/chardet/euctwprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
1,753
35.541667
69
py
pip
pip-main/src/pip/_vendor/chardet/hebrewprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
14,537
44.861199
88
py
pip
pip-main/src/pip/_vendor/chardet/escprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
4,006
37.902913
82
py
pip
pip-main/src/pip/_vendor/chardet/macromanprober.py
######################## BEGIN LICENSE BLOCK ######################## # This code was modified from latin1prober.py by Rob Speer <rob@lumino.so>. # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by...
6,077
36.288344
87
py
pip
pip-main/src/pip/_vendor/chardet/chardistribution.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
10,032
37.293893
88
py
pip
pip-main/src/pip/_vendor/chardet/langgreekmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative GREEK_LANG_MODEL = { 60: { # 'e' 60: 2, # 'e' 55: 1, # 'o' 58: 2, # 't' 36: 1, # '·' 61: 0, # 'Ά' 46: 0, # 'Έ' 54: 0, # 'Ό' ...
94,539
20.496135
79
py
pip
pip-main/src/pip/_vendor/chardet/euctwfreq.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
36,913
93.894602
107
py
pip
pip-main/src/pip/_vendor/chardet/__init__.py
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
4,797
40.362069
88
py
pip
pip-main/src/pip/_vendor/chardet/langhungarianmodel.py
from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative HUNGARIAN_LANG_MODEL = { 28: { # 'A' 28: 0, # 'A' 40: 1, # 'B' 54: 1, # 'C' 45: 2, # 'D' 32: 1, # 'E' 50: 1, # 'F' 49: 2, # '...
100,071
20.52086
78
py
pip
pip-main/src/pip/_vendor/chardet/gb2312prober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
1,759
35.666667
69
py
pip
pip-main/src/pip/_vendor/chardet/resultdict.py
from typing import TYPE_CHECKING, Optional if TYPE_CHECKING: # TypedDict was introduced in Python 3.8. # # TODO: Remove the else block and TYPE_CHECKING check when dropping support # for Python 3.7. from typing import TypedDict class ResultDict(TypedDict): encoding: Optional[str] ...
402
22.705882
79
py
pip
pip-main/src/pip/_vendor/chardet/cli/chardetect.py
""" Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ import argparse import sy...
3,242
27.699115
98
py
pip
pip-main/src/pip/_vendor/chardet/cli/__init__.py
0
0
0
py
pip
pip-main/src/pip/_vendor/chardet/metadata/languages.py
""" Metadata about languages used by our model training code for our SingleByteCharSetProbers. Could be used for other things in the future. This code is based on the language metadata from the uchardet project. """ from string import ascii_letters from typing import List, Optional # TODO: Add Ukrainian (KOI8-U) ...
12,470
34.328612
107
py
pip
pip-main/src/pip/_vendor/chardet/metadata/__init__.py
0
0
0
py
pip
pip-main/src/pip/_internal/main.py
from typing import List, Optional def main(args: Optional[List[str]] = None) -> int: """This is preserved for old console scripts that may still be referencing it. For additional details, see https://github.com/pypa/pip/issues/7498. """ from pip._internal.utils.entrypoints import _wrapper re...
340
25.230769
78
py
pip
pip-main/src/pip/_internal/exceptions.py
"""Exceptions used throughout package. This module MUST NOT try to import from anything within `pip._internal` to operate. This is expected to be importable from any/all files within the subpackage and, thus, should not depend on them. """ import configparser import contextlib import locale import logging import path...
23,729
31.3297
88
py
pip
pip-main/src/pip/_internal/self_outdated_check.py
import datetime import functools import hashlib import json import logging import optparse import os.path import sys from dataclasses import dataclass from typing import Any, Callable, Dict, Optional from pip._vendor.packaging.version import parse as parse_version from pip._vendor.rich.console import Group from pip._v...
8,167
32.613169
87
py
pip
pip-main/src/pip/_internal/configuration.py
"""Configuration management setup Some terminology: - name As written in config files. - value Value associated with a name - key Name combined with it's section (section.name) - variant A single word describing where the configuration key-value pair came from """ import configparser import locale import os i...
13,839
35.230366
87
py
pip
pip-main/src/pip/_internal/wheel_builder.py
"""Orchestrator for building wheels from InstallRequirements. """ import logging import os.path import re import shutil from typing import Iterable, List, Optional, Tuple from pip._vendor.packaging.utils import canonicalize_name, canonicalize_version from pip._vendor.packaging.version import InvalidVersion, Version ...
11,842
32.266854
87
py
pip
pip-main/src/pip/_internal/build_env.py
"""Build Environment used for isolation during sdist building """ import logging import os import pathlib import site import sys import textwrap from collections import OrderedDict from types import TracebackType from typing import TYPE_CHECKING, Iterable, List, Optional, Set, Tuple, Type, Union from pip._vendor.cert...
10,243
31.833333
88
py
pip
pip-main/src/pip/_internal/cache.py
"""Cache Management """ import hashlib import json import logging import os from pathlib import Path from typing import Any, Dict, List, Optional from pip._vendor.packaging.tags import Tag, interpreter_name, interpreter_version from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions i...
10,429
34.59727
88
py
pip
pip-main/src/pip/_internal/pyproject.py
import importlib.util import os from collections import namedtuple from typing import Any, List, Optional from pip._vendor import tomli from pip._vendor.packaging.requirements import InvalidRequirement, Requirement from pip._internal.exceptions import ( InstallationError, InvalidPyProjectBuildRequires, Mi...
7,161
38.788889
98
py
pip
pip-main/src/pip/_internal/__init__.py
from typing import List, Optional import pip._internal.utils.inject_securetransport # noqa from pip._internal.utils import _log # init_logging() must be called before any call to logging.getLogger() # which happens at import of most modules. _log.init_logging() def main(args: (Optional[List[str]]) = None) -> int: ...
573
27.7
78
py
pip
pip-main/src/pip/_internal/cli/req_command.py
"""Contains the Command base classes that depend on PipSession. The classes in this module are in a separate module so the commands not needing download / PackageFinder capability don't unnecessarily import the PackageFinder machinery and all its vendored dependencies, etc. """ import logging import os import sys fro...
18,328
35.22332
87
py
pip
pip-main/src/pip/_internal/cli/main.py
"""Primary application entrypoint. """ import locale import logging import os import sys import warnings from typing import List, Optional from pip._internal.cli.autocompletion import autocomplete from pip._internal.cli.main_parser import parse_command from pip._internal.commands import create_command from pip._intern...
2,816
34.2125
78
py
pip
pip-main/src/pip/_internal/cli/autocompletion.py
"""Logic that powers autocompletion installed by ``pip completion``. """ import optparse import os import sys from itertools import chain from typing import Any, Iterable, List, Optional from pip._internal.cli.main_parser import create_main_parser from pip._internal.commands import commands_dict, create_command from ...
6,676
37.819767
87
py
pip
pip-main/src/pip/_internal/cli/parser.py
"""Base option parser setup""" import logging import optparse import shutil import sys import textwrap from contextlib import suppress from typing import Any, Dict, Generator, List, Tuple from pip._internal.cli.status_codes import UNKNOWN_ERROR from pip._internal.configuration import Configuration, ConfigurationError...
10,817
35.671186
85
py
pip
pip-main/src/pip/_internal/cli/base_command.py
"""Base Command class, and related routines""" import functools import logging import logging.config import optparse import os import sys import traceback from optparse import Values from typing import Any, Callable, List, Optional, Tuple from pip._vendor.rich import traceback as rich_traceback from pip._internal.cl...
8,726
35.822785
86
py
pip
pip-main/src/pip/_internal/cli/status_codes.py
SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
116
15.714286
28
py
pip
pip-main/src/pip/_internal/cli/main_parser.py
"""A single place for constructing and exposing the main parser """ import os import subprocess import sys from typing import List, Optional, Tuple from pip._internal.build_env import get_runnable_pip from pip._internal.cli import cmdoptions from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHel...
4,338
31.140741
86
py
pip
pip-main/src/pip/_internal/cli/command_context.py
from contextlib import ExitStack, contextmanager from typing import ContextManager, Generator, TypeVar _T = TypeVar("_T", covariant=True) class CommandContextMixIn: def __init__(self) -> None: super().__init__() self._in_main_context = False self._main_context = ExitStack() @contextm...
774
26.678571
72
py
pip
pip-main/src/pip/_internal/cli/spinners.py
import contextlib import itertools import logging import sys import time from typing import IO, Generator, Optional from pip._internal.utils.compat import WINDOWS from pip._internal.utils.logging import get_indentation logger = logging.getLogger(__name__) class SpinnerInterface: def spin(self) -> None: ...
5,118
30.99375
88
py
pip
pip-main/src/pip/_internal/cli/__init__.py
"""Subpackage containing all of pip's command line interface related code """ # This file intentionally does not import submodules
132
25.6
73
py
pip
pip-main/src/pip/_internal/cli/progress_bars.py
import functools from typing import Callable, Generator, Iterable, Iterator, Optional, Tuple from pip._vendor.rich.progress import ( BarColumn, DownloadColumn, FileSizeColumn, Progress, ProgressColumn, SpinnerColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TransferSp...
1,968
27.536232
82
py
pip
pip-main/src/pip/_internal/cli/cmdoptions.py
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parses general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this de...
30,030
26.935814
88
py
pip
pip-main/src/pip/_internal/vcs/mercurial.py
import configparser import logging import os from typing import List, Optional, Tuple from pip._internal.exceptions import BadCommand, InstallationError from pip._internal.utils.misc import HiddenText, display_path from pip._internal.utils.subprocess import make_command from pip._internal.utils.urls import path_to_url...
5,244
30.981707
87
py
pip
pip-main/src/pip/_internal/vcs/git.py
import logging import os.path import pathlib import re import urllib.parse import urllib.request from typing import List, Optional, Tuple from pip._internal.exceptions import BadCommand, InstallationError from pip._internal.utils.misc import HiddenText, display_path, hide_url from pip._internal.utils.subprocess import...
18,116
33.377609
87
py
pip
pip-main/src/pip/_internal/vcs/bazaar.py
import logging from typing import List, Optional, Tuple from pip._internal.utils.misc import HiddenText, display_path from pip._internal.utils.subprocess import make_command from pip._internal.utils.urls import path_to_url from pip._internal.vcs.versioncontrol import ( AuthInfo, RemoteNotFoundError, RevOpt...
3,519
30.150442
83
py
pip
pip-main/src/pip/_internal/vcs/__init__.py
# Expose a limited set of classes and functions so callers outside of # the vcs package don't need to import deeper than `pip._internal.vcs`. # (The test directory may still need to import from a vcs sub-package.) # Import all vcs modules to register each VCS in the VcsSupport object. import pip._internal.vcs.bazaar im...
596
36.3125
71
py
pip
pip-main/src/pip/_internal/vcs/versioncontrol.py
"""Handles all VCS (version control) support""" import logging import os import shutil import sys import urllib.parse from typing import ( TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Type, Union, ) from pip._internal.cli.spinners import Spi...
22,811
31.311615
87
py
pip
pip-main/src/pip/_internal/vcs/subversion.py
import logging import os import re from typing import List, Optional, Tuple from pip._internal.utils.misc import ( HiddenText, display_path, is_console_interactive, is_installable_dir, split_auth_from_netloc, ) from pip._internal.utils.subprocess import CommandArgs, make_command from pip._internal....
11,729
35.092308
86
py
pip
pip-main/src/pip/_internal/index/collector.py
""" The main purpose of this module is to expose LinkCollector.collect_sources(). """ import collections import email.message import functools import itertools import json import logging import os import urllib.parse import urllib.request from html.parser import HTMLParser from optparse import Values from typing impor...
16,504
31.618577
88
py
pip
pip-main/src/pip/_internal/index/package_finder.py
"""Routines related to PyPI, indexes""" import enum import functools import itertools import logging import re from typing import TYPE_CHECKING, FrozenSet, Iterable, List, Optional, Set, Tuple, Union from pip._vendor.packaging import specifiers from pip._vendor.packaging.tags import Tag from pip._vendor.packaging.uti...
37,873
35.770874
88
py
pip
pip-main/src/pip/_internal/index/__init__.py
"""Index interaction code """
30
9.333333
25
py
pip
pip-main/src/pip/_internal/index/sources.py
import logging import mimetypes import os import pathlib from typing import Callable, Iterable, Optional, Tuple from pip._internal.models.candidate import InstallationCandidate from pip._internal.models.link import Link from pip._internal.utils.urls import path_to_url, url_to_path from pip._internal.vcs import is_url ...
6,556
28.272321
79
py
pip
pip-main/src/pip/_internal/distributions/installed.py
from pip._internal.distributions.base import AbstractDistribution from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata import BaseDistribution class InstalledDistribution(AbstractDistribution): """Represents an installed package. This does not need any preparation as the r...
729
29.416667
78
py
pip
pip-main/src/pip/_internal/distributions/base.py
import abc from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata.base import BaseDistribution from pip._internal.req import InstallRequirement class AbstractDistribution(metaclass=abc.ABCMeta): """A base class for handling installable artifacts. The requirements for anythi...
1,221
29.55
68
py
pip
pip-main/src/pip/_internal/distributions/sdist.py
import logging from typing import Iterable, Set, Tuple from pip._internal.build_env import BuildEnvironment from pip._internal.distributions.base import AbstractDistribution from pip._internal.exceptions import InstallationError from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata i...
6,494
42.013245
88
py
pip
pip-main/src/pip/_internal/distributions/wheel.py
from pip._vendor.packaging.utils import canonicalize_name from pip._internal.distributions.base import AbstractDistribution from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata import ( BaseDistribution, FilesystemWheel, get_wheel_distribution, ) class WheelDistributio...
1,164
32.285714
85
py
pip
pip-main/src/pip/_internal/distributions/__init__.py
from pip._internal.distributions.base import AbstractDistribution from pip._internal.distributions.sdist import SourceDistribution from pip._internal.distributions.wheel import WheelDistribution from pip._internal.req.req_install import InstallRequirement def make_distribution_for_install_requirement( install_req...
858
38.045455
77
py
pip
pip-main/src/pip/_internal/req/req_file.py
""" Requirements file parsing """ import logging import optparse import os import re import shlex import urllib.parse from optparse import Values from typing import ( TYPE_CHECKING, Any, Callable, Dict, Generator, Iterable, List, Optional, Tuple, ) from pip._internal.cli import cmd...
17,872
31.320072
86
py
pip
pip-main/src/pip/_internal/req/req_uninstall.py
import functools import os import sys import sysconfig from importlib.util import cache_from_source from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple from pip._internal.exceptions import UninstallationError from pip._internal.locations import get_bin_prefix, get_bin_user from pip....
24,678
36.90937
87
py
pip
pip-main/src/pip/_internal/req/constructors.py
"""Backing implementation for InstallRequirement's various constructors The idea here is that these formed a major chunk of InstallRequirement's size so, moving them and support code dedicated to them outside of that class helps creates for better understandability for the rest of the code. These are meant to be used...
16,610
31.763314
83
py
pip
pip-main/src/pip/_internal/req/__init__.py
import collections import logging from typing import Generator, List, Optional, Sequence, Tuple from pip._internal.utils.logging import indent_log from .req_file import parse_requirements from .req_install import InstallRequirement from .req_set import RequirementSet __all__ = [ "RequirementSet", "InstallReq...
2,738
28.451613
82
py
pip
pip-main/src/pip/_internal/req/req_set.py
import logging from collections import OrderedDict from typing import Dict, List from pip._vendor.packaging.specifiers import LegacySpecifier from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.packaging.version import LegacyVersion from pip._internal.req.req_install import InstallRequirement f...
4,704
38.208333
85
py
pip
pip-main/src/pip/_internal/req/req_install.py
# The following comment should be removed at some point in the future. # mypy: strict-optional=False import functools import logging import os import shutil import sys import uuid import zipfile from optparse import Values from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Union from pip._v...
33,084
36.811429
88
py
pip
pip-main/src/pip/_internal/models/link.py
import functools import itertools import logging import os import posixpath import re import urllib.parse from dataclasses import dataclass from typing import ( TYPE_CHECKING, Any, Dict, List, Mapping, NamedTuple, Optional, Tuple, Union, ) from pip._internal.utils.deprecation import...
20,819
34.773196
88
py
pip
pip-main/src/pip/_internal/models/target_python.py
import sys from typing import List, Optional, Tuple from pip._vendor.packaging.tags import Tag from pip._internal.utils.compatibility_tags import get_supported, version_info_to_nodot from pip._internal.utils.misc import normalize_version_info class TargetPython: """ Encapsulates the properties of a Python ...
3,858
33.765766
87
py
pip
pip-main/src/pip/_internal/models/wheel.py
"""Represents a wheel file and provides access to the various parts of the name that have meaning. """ import re from typing import Dict, Iterable, List from pip._vendor.packaging.tags import Tag from pip._internal.exceptions import InvalidWheelFilename class Wheel: """A wheel file""" wheel_file_re = re.co...
3,600
37.72043
89
py
pip
pip-main/src/pip/_internal/models/installation_report.py
from typing import Any, Dict, Sequence from pip._vendor.packaging.markers import default_environment from pip import __version__ from pip._internal.req.req_install import InstallRequirement class InstallationReport: def __init__(self, install_requirements: Sequence[InstallRequirement]): self._install_re...
2,609
47.333333
88
py
pip
pip-main/src/pip/_internal/models/selection_prefs.py
from typing import Optional from 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", "for...
1,907
35.692308
78
py
pip
pip-main/src/pip/_internal/models/format_control.py
from typing import FrozenSet, Optional, Set from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import CommandError class FormatControl: """Helper for managing formats from which a package can be installed.""" __slots__ = ["no_binary", "only_binary"] def __init__( ...
2,520
30.123457
86
py
pip
pip-main/src/pip/_internal/models/direct_url.py
""" PEP 610 """ import json import re import urllib.parse from typing import Any, Dict, Iterable, Optional, Type, TypeVar, Union __all__ = [ "DirectUrl", "DirectUrlValidationError", "DirInfo", "ArchiveInfo", "VcsInfo", ] T = TypeVar("T") DIRECT_URL_METADATA_NAME = "direct_url.json" ENV_VAR_RE = r...
6,931
28.12605
86
py
pip
pip-main/src/pip/_internal/models/candidate.py
from pip._vendor.packaging.version import parse as parse_version from pip._internal.models.link import Link from pip._internal.utils.models import KeyBasedCompareMixin class InstallationCandidate(KeyBasedCompareMixin): """Represents a potential "candidate" for installation.""" __slots__ = ["name", "version"...
990
27.314286
68
py
pip
pip-main/src/pip/_internal/models/search_scope.py
import itertools import logging import os import posixpath import urllib.parse from typing import List from pip._vendor.packaging.utils import canonicalize_name from pip._internal.models.index import PyPI from pip._internal.utils.compat import has_tls from pip._internal.utils.misc import normalize_path, redact_auth_f...
4,643
33.917293
85
py
pip
pip-main/src/pip/_internal/models/__init__.py
"""A package that contains models that represent entities. """
63
20.333333
58
py