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/urllib3/_collections.py
from __future__ import absolute_import try: from collections.abc import Mapping, MutableMapping except ImportError: from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): ...
10,811
30.988166
86
py
pip
pip-main/src/pip/_vendor/urllib3/poolmanager.py
from __future__ import absolute_import import collections import functools import logging from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme from .exceptions import ( LocationValueError, MaxRetryError, ProxySchemeUnknown, ...
19,752
35.715613
100
py
pip
pip-main/src/pip/_vendor/urllib3/exceptions.py
from __future__ import absolute_import from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead # Base Exceptions class HTTPError(Exception): """Base exception used by this module.""" pass class HTTPWarning(Warning): """Base warning used by this module.""" pass clas...
8,217
24.364198
88
py
pip
pip-main/src/pip/_vendor/urllib3/connection.py
from __future__ import absolute_import import datetime import logging import os import re import socket import warnings from socket import error as SocketError from socket import timeout as SocketTimeout from .packages import six from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection from .pack...
20,300
34.429319
101
py
pip
pip-main/src/pip/_vendor/urllib3/filepost.py
from __future__ import absolute_import import binascii import codecs import os from io import BytesIO from .fields import RequestField from .packages import six from .packages.six import b writer = codecs.lookup("utf-8")[3] def choose_boundary(): """ Our embarrassingly-simple replacement for mimetools.choo...
2,440
23.656566
85
py
pip
pip-main/src/pip/_vendor/urllib3/_version.py
# This file is protected via CODEOWNERS __version__ = "1.26.16"
64
20.666667
39
py
pip
pip-main/src/pip/_vendor/urllib3/connectionpool.py
from __future__ import absolute_import import errno import logging import re import socket import sys import warnings from socket import error as SocketError from socket import timeout as SocketTimeout from .connection import ( BaseSSLError, BrokenPipeError, DummyConnection, HTTPConnection, HTTPEx...
39,990
34.296558
106
py
pip
pip-main/src/pip/_vendor/urllib3/response.py
from __future__ import absolute_import import io import logging import sys import warnings import zlib from contextlib import contextmanager from socket import error as SocketError from socket import timeout as SocketTimeout brotli = None from . import util from ._collections import HTTPHeaderDict from .connection i...
30,641
33.820455
110
py
pip
pip-main/src/pip/_vendor/urllib3/__init__.py
""" Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more """ from __future__ import absolute_import # Set default logging handler to avoid "No handler found" warnings. import logging import warnings from logging import NullHandler from . import exceptions from ._version ...
3,333
31.368932
99
py
pip
pip-main/src/pip/_vendor/urllib3/fields.py
from __future__ import absolute_import import email.utils import mimetypes import re from .packages import six def guess_content_type(filename, default="application/octet-stream"): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`m...
8,579
30.2
88
py
pip
pip-main/src/pip/_vendor/urllib3/request.py
from __future__ import absolute_import from .filepost import encode_multipart_formdata from .packages.six.moves.urllib.parse import urlencode __all__ = ["RequestMethods"] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen` method, such as :class:`urllib3.HTTPC...
5,985
34.005848
92
py
pip
pip-main/src/pip/_vendor/urllib3/util/url.py
from __future__ import absolute_import import re from collections import namedtuple from ..exceptions import LocationParseError from ..packages import six url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"] # We only want to normalize urls with an HTTP(S) scheme. # urllib3 infers URLs withou...
14,296
31.791284
87
py
pip
pip-main/src/pip/_vendor/urllib3/util/ssl_.py
from __future__ import absolute_import import hmac import os import sys import warnings from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import ( InsecurePlatformWarning, ProxySchemeUnsupported, SNIMissingWarning, SSLError, ) from ..packages import six fr...
17,177
33.633065
87
py
pip
pip-main/src/pip/_vendor/urllib3/util/proxy.py
from .ssl_ import create_urllib3_context, resolve_cert_reqs, resolve_ssl_version def connection_requires_http_tunnel( proxy_url=None, proxy_config=None, destination_scheme=None ): """ Returns True if the connection requires an HTTP CONNECT through the proxy. :param URL proxy_url: URL of the p...
1,605
26.689655
80
py
pip
pip-main/src/pip/_vendor/urllib3/util/retry.py
from __future__ import absolute_import import email import logging import re import time import warnings from collections import namedtuple from itertools import takewhile from ..exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ProtocolError, ProxyError, ReadTimeoutError,...
22,003
34.433172
94
py
pip
pip-main/src/pip/_vendor/urllib3/util/connection.py
from __future__ import absolute_import import socket from ..contrib import _appengine_environ from ..exceptions import LocationParseError from ..packages import six from .wait import NoWayToWaitForSocketError, wait_for_read def is_connection_dropped(conn): # Platform-specific """ Returns True if the connec...
4,901
31.68
82
py
pip
pip-main/src/pip/_vendor/urllib3/util/queue.py
import collections from ..packages import six from ..packages.six.moves import queue if six.PY2: # Queue is imported for side effects on MS Windows. See issue #229. import Queue as _unused_module_Queue # noqa: F401 class LifoQueue(queue.Queue): def _init(self, _): self.queue = collections.deque...
498
20.695652
71
py
pip
pip-main/src/pip/_vendor/urllib3/util/timeout.py
from __future__ import absolute_import import time # The default socket timeout, used by httplib to indicate that no timeout was; specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout from ..exceptions import TimeoutStateError # A sentinel value to indicate that no timeout was specifie...
10,168
36.386029
100
py
pip
pip-main/src/pip/_vendor/urllib3/util/ssl_match_hostname.py
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re import sys # ipaddress has been backported to 2.6+ in pypi. If it is installed on the # system, us...
5,758
34.99375
88
py
pip
pip-main/src/pip/_vendor/urllib3/util/wait.py
import errno import select import sys from functools import partial try: from time import monotonic except ImportError: from time import time as monotonic __all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"] class NoWayToWaitForSocketError(Exception): pass # How should we wait on...
5,403
34.320261
81
py
pip
pip-main/src/pip/_vendor/urllib3/util/response.py
from __future__ import absolute_import from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect from ..exceptions import HeaderParsingError from ..packages.six.moves import http_client as httplib def is_fp_closed(obj): """ Checks whether a given file-like object is closed. ...
3,510
31.509259
88
py
pip
pip-main/src/pip/_vendor/urllib3/util/__init__.py
from __future__ import absolute_import # For backwards compatibility, provide imports that used to be here. from .connection import is_connection_dropped from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers from .response import is_fp_closed from .retry import Retry from .ssl_ import ( ALPN_PROTOCOLS,...
1,155
22.12
68
py
pip
pip-main/src/pip/_vendor/urllib3/util/request.py
from __future__ import absolute_import from base64 import b64encode from ..exceptions import UnrewindableBodyError from ..packages.six import b, integer_types # Pass as a value within ``headers`` to skip # emitting some HTTP headers that are added automatically. # The only headers that are supported are ``Accept-Enc...
3,997
27.971014
86
py
pip
pip-main/src/pip/_vendor/urllib3/util/ssltransport.py
import io import socket import ssl from ..exceptions import ProxySchemeUnsupported from ..packages import six SSL_BLOCKSIZE = 16384 class SSLTransport: """ The SSLTransport wraps an existing socket and establishes an SSL connection. Contrary to Python's implementation of SSLSocket, it allows you to cha...
6,895
30.063063
86
py
pip
pip-main/src/pip/_vendor/urllib3/packages/six.py
# Copyright (c) 2010-2020 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
34,665
31.187558
87
py
pip
pip-main/src/pip/_vendor/urllib3/packages/__init__.py
0
0
0
py
pip
pip-main/src/pip/_vendor/urllib3/packages/backports/weakref_finalize.py
# -*- coding: utf-8 -*- """ backports.weakref_finalize ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``weakref.finalize`` method. """ from __future__ import absolute_import import itertools import sys from weakref import ref __all__ = ["weakref_finalize"] class weakref_finalize(object): """Class for finalization o...
5,343
33.25641
79
py
pip
pip-main/src/pip/_vendor/urllib3/packages/backports/__init__.py
0
0
0
py
pip
pip-main/src/pip/_vendor/urllib3/packages/backports/makefile.py
# -*- coding: utf-8 -*- """ backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. """ import io from socket import SocketIO def backport_makefile( self, mode="r", buffering=None, encoding=None, errors=None, newli...
1,417
26.269231
76
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/appengine.py
""" This module provides a pool manager that uses Google App Engine's `URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_. Example usage:: from pip._vendor.urllib3 import PoolManager from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox if is_a...
11,036
34.038095
92
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/pyopenssl.py
""" TLS with SNI_-support for Python 2. Follow these instructions if you would like to verify TLS certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * `pyOpenSSL`_ (teste...
17,081
31.913295
88
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/securetransport.py
""" SecureTranport support for urllib3 via ctypes. This makes platform-native TLS available to urllib3 users on macOS without the use of a compiler. This is an important feature because the Python Package Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL that ships with macOS is not capable...
34,448
36.363341
86
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/socks.py
# -*- coding: utf-8 -*- """ This module contains provisional support for SOCKS proxies from within urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and SOCKS5. To enable its functionality, either install PySocks or install this module with the ``socks`` extra. The SOCKS implementation supports t...
7,097
31.709677
85
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/_appengine_environ.py
""" This module provides means to detect the App Engine environment. """ import os def is_appengine(): return is_local_appengine() or is_prod_appengine() def is_appengine_sandbox(): """Reports if the app is running in the first generation sandbox. The second generation runtimes are technically still i...
957
24.891892
78
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/__init__.py
0
0
0
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/ntlmpool.py
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import import warnings from logging import getLogger from ntlm import ntlm from .. import HTTPSConnectionPool from ..packages.six.moves.http_client imp...
4,528
33.572519
88
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/_securetransport/bindings.py
""" This module uses ctypes to bind a whole bunch of functions and constants from SecureTransport. The goal here is to provide the low-level API to SecureTransport. These are essentially the C-level functions and constants, and they're pretty gross to work with. This code is a bastardised version of the code found in ...
17,632
32.909615
96
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/_securetransport/low_level.py
""" Low-level helpers for the SecureTransport bindings. These are Python functions that are not directly related to the high-level APIs but are necessary to get them to work. They include a whole bunch of low-level CoreFoundation messing about and memory management. The concerns in this module are almost entirely abou...
13,922
33.982412
88
py
pip
pip-main/src/pip/_vendor/urllib3/contrib/_securetransport/__init__.py
0
0
0
py
pip
pip-main/src/pip/_vendor/msgpack/ext.py
# coding: utf-8 from collections import namedtuple import datetime import sys import struct PY2 = sys.version_info[0] == 2 if PY2: int_types = (int, long) _utc = None else: int_types = int try: _utc = datetime.timezone.utc except AttributeError: _utc = datetime.timezone(datetime.t...
6,079
30.340206
105
py
pip
pip-main/src/pip/_vendor/msgpack/exceptions.py
class UnpackException(Exception): """Base class for some exceptions raised while unpacking. NOTE: unpack may raise exception other than subclass of UnpackException. If you want to catch all error, catch Exception instead. """ class BufferFull(UnpackException): pass class OutOfData(UnpackEx...
1,081
21.081633
75
py
pip
pip-main/src/pip/_vendor/msgpack/fallback.py
"""Fallback pure Python implementation of msgpack""" from datetime import datetime as _DateTime import sys import struct PY2 = sys.version_info[0] == 2 if PY2: int_types = (int, long) def dict_iteritems(d): return d.iteritems() else: int_types = int unicode = str xrange = range def ...
34,544
33.169139
94
py
pip
pip-main/src/pip/_vendor/msgpack/__init__.py
# coding: utf-8 from .exceptions import * from .ext import ExtType, Timestamp import os import sys version = (1, 0, 5) __version__ = "1.0.5" if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2: from .fallback import Packer, unpackb, Unpacker else: try: from ._cmsgpack import Packer,...
1,132
18.534483
68
py
pip
pip-main/src/pip/_vendor/packaging/_musllinux.py
"""PEP 656 support. This module implements logic to detect if the currently running Python is linked against musl, and what musl version is used. """ import contextlib import functools import operator import os import re import struct import subprocess import sys from typing import IO, Iterator, NamedTuple, Optional,...
4,378
30.963504
80
py
pip
pip-main/src/pip/_vendor/packaging/requirements.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import re import string import urllib.parse from typing import List, Optional as TOptional, Set from pip._vendor.pyparsing import ( # noq...
4,676
30.816327
87
py
pip
pip-main/src/pip/_vendor/packaging/utils.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import re from typing import FrozenSet, NewType, Tuple, Union, cast from .tags import Tag, parse_tag from .version import InvalidVersion, ...
4,200
29.664234
88
py
pip
pip-main/src/pip/_vendor/packaging/_structures.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. class InfinityType: def __repr__(self) -> str: return "Infinity" def __hash__(self) -> int: return hash(repr(self...
1,431
22.096774
79
py
pip
pip-main/src/pip/_vendor/packaging/tags.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import logging import platform import sys import sysconfig from importlib.machinery import EXTENSION_SUFFIXES from typing import ( Dict...
15,699
31.172131
88
py
pip
pip-main/src/pip/_vendor/packaging/specifiers.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import abc import functools import itertools import re import warnings from typing import ( Callable, Dict, Iterable, Itera...
30,110
36.498132
88
py
pip
pip-main/src/pip/_vendor/packaging/markers.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import operator import os import platform import sys from typing import Any, Callable, Dict, List, Optional, Tuple, Union from pip._vendor...
8,487
26.829508
81
py
pip
pip-main/src/pip/_vendor/packaging/version.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import collections import itertools import re import warnings from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Un...
14,665
28.041584
88
py
pip
pip-main/src/pip/_vendor/packaging/_manylinux.py
import collections import functools import os import re import struct import sys import warnings from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple # Python does not provide platform information at sufficient granularity to # identify the architecture of the running executable in some cases, so we # d...
11,488
37.043046
88
py
pip
pip-main/src/pip/_vendor/packaging/__init__.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from .__about__ import ( __author__, __copyright__, __email__, __license__, __summary__, __title__, __uri__, ...
497
18.153846
79
py
pip
pip-main/src/pip/_vendor/packaging/__about__.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", ...
661
23.518519
79
py
pip
pip-main/src/pip/_vendor/tenacity/nap.py
# Copyright 2016 Étienne Bersac # Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
1,382
30.431818
74
py
pip
pip-main/src/pip/_vendor/tenacity/tornadoweb.py
# Copyright 2017 Elisey Zanko # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
2,142
34.716667
119
py
pip
pip-main/src/pip/_vendor/tenacity/retry.py
# Copyright 2016–2021 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
8,744
31.032967
108
py
pip
pip-main/src/pip/_vendor/tenacity/_utils.py
# Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
2,179
27.311688
94
py
pip
pip-main/src/pip/_vendor/tenacity/wait.py
# Copyright 2016–2021 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
8,022
34.034934
103
py
pip
pip-main/src/pip/_vendor/tenacity/before_sleep.py
# Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
2,372
31.958333
103
py
pip
pip-main/src/pip/_vendor/tenacity/stop.py
# Copyright 2016–2021 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
3,084
28.663462
86
py
pip
pip-main/src/pip/_vendor/tenacity/after.py
# Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
1,682
31.365385
93
py
pip
pip-main/src/pip/_vendor/tenacity/__init__.py
# Copyright 2016-2018 Julien Danjou # Copyright 2017 Elisey Zanko # Copyright 2016 Étienne Bersac # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy...
20,492
32.650246
116
py
pip
pip-main/src/pip/_vendor/tenacity/_asyncio.py
# Copyright 2016 Étienne Bersac # Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
3,550
36.378947
104
py
pip
pip-main/src/pip/_vendor/tenacity/before.py
# Copyright 2016 Julien Danjou # Copyright 2016 Joshua Harlow # Copyright 2013-2014 Ray Holder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
1,562
32.255319
102
py
pip
pip-main/src/pip/_vendor/pygments/__main__.py
""" pygments.__main__ ~~~~~~~~~~~~~~~~~ Main entry point for ``python -m pygments``. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys from pip._vendor.pygments.cmdline import main try: sys.exit(main(sys.argv)) except Ke...
353
18.666667
70
py
pip
pip-main/src/pip/_vendor/pygments/filter.py
""" pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ def apply_filters(stream, filters, lexer=None): """ Use this method to apply an iterable of filter...
1,938
25.930556
70
py
pip
pip-main/src/pip/_vendor/pygments/scanner.py
""" pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like the `RegexLexer`. ...
3,092
28.457143
70
py
pip
pip-main/src/pip/_vendor/pygments/style.py
""" pygments.style ~~~~~~~~~~~~~~ Basic style object. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.token import Token, STANDARD_TYPES # Default mapping of ansixxx to RGB colors. _ansimap = { # dark ...
6,257
30.606061
70
py
pip
pip-main/src/pip/_vendor/pygments/lexer.py
""" pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import time from pip._vendor.pygments.filter import apply_filters, Filter from pip._vendor.pygments.filters im...
34,618
35.672669
86
py
pip
pip-main/src/pip/_vendor/pygments/plugin.py
""" pygments.plugin ~~~~~~~~~~~~~~~ Pygments plugin interface. By default, this tries to use ``importlib.metadata``, which is in the Python standard library since Python 3.8, or its ``importlib_metadata`` backport for earlier versions of Python. It falls back on ``pkg_resources`` if not fou...
2,591
28.123596
71
py
pip
pip-main/src/pip/_vendor/pygments/cmdline.py
""" pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys import shutil import argparse from textwrap import dedent from pip._vendor.pygments import __version__...
23,684
34.403587
104
py
pip
pip-main/src/pip/_vendor/pygments/modeline.py
""" pygments.modeline ~~~~~~~~~~~~~~~~~ A simple modeline parser (based on pymodeline). :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re __all__ = ['get_filetype_from_buffer'] modeline_re = re.compile(r''' (?: vi | vim...
986
21.431818
70
py
pip
pip-main/src/pip/_vendor/pygments/formatter.py
""" pygments.formatter ~~~~~~~~~~~~~~~~~~ Base formatter class. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs from pip._vendor.pygments.util import get_bool_opt from pip._vendor.pygments.styles import get_style_by_nam...
4,178
32.432
81
py
pip
pip-main/src/pip/_vendor/pygments/util.py
""" pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from io import TextIOWrapper split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r''' <!DOCTYPE\s+( ...
10,230
29.909366
80
py
pip
pip-main/src/pip/_vendor/pygments/token.py
""" pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] node = self ...
6,184
27.901869
70
py
pip
pip-main/src/pip/_vendor/pygments/regexopt.py
""" pygments.regexopt ~~~~~~~~~~~~~~~~~ An algorithm that generates optimized regexes for matching long lists of literal strings. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from re import escape from os.path import ...
3,072
32.402174
82
py
pip
pip-main/src/pip/_vendor/pygments/unistring.py
""" pygments.unistring ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. ...
63,223
409.545455
10,457
py
pip
pip-main/src/pip/_vendor/pygments/__init__.py
""" Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a wide range of common lan...
2,983
34.951807
90
py
pip
pip-main/src/pip/_vendor/pygments/console.py
""" pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" codes["bold"] = esc + "01m" codes["faint...
1,697
22.915493
88
py
pip
pip-main/src/pip/_vendor/pygments/sphinxext.py
""" pygments.sphinxext ~~~~~~~~~~~~~~~~~~ Sphinx extension to generate automatic documentation of lexers, formatters and filters. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys from docutils import nodes from docutils...
6,882
30.573394
101
py
pip
pip-main/src/pip/_vendor/pygments/styles/__init__.py
""" pygments.styles ~~~~~~~~~~~~~~~ Contains built-in styles. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.plugin import find_plugin_styles from pip._vendor.pygments.util import ClassNotFound #: A diction...
3,700
34.586538
83
py
pip
pip-main/src/pip/_vendor/pygments/filters/__init__.py
""" pygments.filters ~~~~~~~~~~~~~~~~ Module containing filter lookup functions and default filters. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pip._vendor.pygments.token import String, Comment, Keyword, Name,...
40,380
41.912859
91
py
pip
pip-main/src/pip/_vendor/pygments/lexers/python.py
""" pygments.lexers.python ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Python and related languages. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import keyword from pip._vendor.pygments.lexer import DelegatingLexer, Lexer, RegexL...
53,424
43.557965
97
py
pip
pip-main/src/pip/_vendor/pygments/lexers/__init__.py
""" pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pip._vendor.pygments.lexers._mapping import LEXER...
12,130
32.418733
81
py
pip
pip-main/src/pip/_vendor/pygments/lexers/_mapping.py
# Automatically generated by scripts/gen_mapfiles.py. # DO NOT EDIT BY HAND; run `tox -e mapfiles` instead. LEXERS = { 'ABAPLexer': ('pip._vendor.pygments.lexers.business', 'ABAP', ('abap',), ('*.abap', '*.ABAP'), ('text/x-abap',)), 'AMDGPULexer': ('pip._vendor.pygments.lexers.amdgpu', 'AMDGPU', ('amdgpu',), (...
72,281
128.075
371
py
pip
pip-main/src/pip/_vendor/pygments/formatters/terminal.py
""" pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pyg...
4,674
35.523438
84
py
pip
pip-main/src/pip/_vendor/pygments/formatters/groff.py
""" pygments.formatters.groff ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for groff output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import math from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.util import...
5,094
28.795322
83
py
pip
pip-main/src/pip/_vendor/pygments/formatters/irc.py
""" pygments.formatters.irc ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for IRC output :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.token import Keyword, Name, Co...
4,981
31.141935
101
py
pip
pip-main/src/pip/_vendor/pygments/formatters/html.py
""" pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import functools import os import sys import os.path from io import StringIO from pip._vendor.pygments.f...
35,610
34.970707
93
py
pip
pip-main/src/pip/_vendor/pygments/formatters/bbcode.py
""" pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ BBcode formatter. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.util import get_bool_opt __al...
3,314
29.412844
78
py
pip
pip-main/src/pip/_vendor/pygments/formatters/img.py
""" pygments.formatters.img ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for Pixmap output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.util...
21,938
32.9613
108
py
pip
pip-main/src/pip/_vendor/pygments/formatters/terminal256.py
""" pygments.formatters.terminal256 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for 256-color terminal output with ANSI sequences. RGB-to-XTERM color conversion routines adapted from xterm256-conv tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2) by Wolfgang Frisch. Formatt...
11,753
33.672566
88
py
pip
pip-main/src/pip/_vendor/pygments/formatters/latex.py
""" pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from io import StringIO from pip._vendor.pygments.formatter import Formatter from pip._vendo...
19,351
36.072797
85
py
pip
pip-main/src/pip/_vendor/pygments/formatters/rtf.py
""" pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ A formatter that generates RTF files. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.util import get_i...
5,014
33.115646
81
py
pip
pip-main/src/pip/_vendor/pygments/formatters/svg.py
""" pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for SVG output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments.token import Comment from pip...
7,335
37.814815
90
py
pip
pip-main/src/pip/_vendor/pygments/formatters/__init__.py
""" pygments.formatters ~~~~~~~~~~~~~~~~~~~ Pygments formatters. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pip._vendor.pygments.formatters._mapp...
5,424
33.119497
87
py
pip
pip-main/src/pip/_vendor/pygments/formatters/pangomarkup.py
""" pygments.formatters.pangomarkup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for Pango markup output. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter __all__ = ['PangoMarkupForma...
2,212
25.345238
74
py
pip
pip-main/src/pip/_vendor/pygments/formatters/_mapping.py
# Automatically generated by scripts/gen_mapfiles.py. # DO NOT EDIT BY HAND; run `tox -e mapfiles` instead. FORMATTERS = { 'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight you...
4,176
173.041667
341
py
pip
pip-main/src/pip/_vendor/pygments/formatters/other.py
""" pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pip._vendor.pygments.formatter import Formatter from pip._vendor.pygments...
5,073
30.320988
77
py