basedpyright 1.31.7 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/ast.pyi +29 -10
- package/dist/typeshed-fallback/stdlib/builtins.pyi +79 -62
- package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/copy.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +4 -9
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/operator.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/pdb.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +160 -69
- package/dist/typeshed-fallback/stdlib/turtle.pyi +18 -14
- package/dist/typeshed-fallback/stdlib/types.pyi +21 -16
- package/dist/typeshed-fallback/stdlib/typing.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +16 -3
- package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +3 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +7 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +6 -4
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/constants.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi +2 -21
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_cdev.pyi +11 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pin_data.pyi +22 -3
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pinmux_lookup.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/PySocks/sockshandler.pyi +0 -5
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +15 -4
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +11 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi +13 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi +8 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi +18 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +4 -3
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +2 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/receiver.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/sender.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transaction_us_bank_account_request.pyi +17 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transfer.pyi +4 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/us_bank_account_verification.pyi +1 -0
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +36 -5
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/func.pyi +45 -10
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/keys.pyi +2 -2
- package/dist/typeshed-fallback/stubs/django-filter/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/django-filter/django_filters/filters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/swarm.pyi +12 -9
- package/dist/typeshed-fallback/stubs/docker/docker/credentials/store.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +9 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/services.pyi +4 -6
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipeconn.pyi +16 -16
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipesocket.pyi +40 -32
- package/dist/typeshed-fallback/stubs/docker/docker/transport/sshconn.pyi +30 -24
- package/dist/typeshed-fallback/stubs/docker/docker/transport/unixconn.pyi +22 -19
- package/dist/typeshed-fallback/stubs/docker/docker/types/networks.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/types/services.pyi +16 -10
- package/dist/typeshed-fallback/stubs/docker/docker/types/swarm.pyi +2 -7
- package/dist/typeshed-fallback/stubs/docker/docker/utils/decorators.pyi +8 -4
- package/dist/typeshed-fallback/stubs/docker/docker/utils/utils.pyi +4 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +2 -2
- package/dist/typeshed-fallback/stubs/flake8-rst-docstrings/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/grpcio/grpc/__init__.pyi +32 -34
- package/dist/typeshed-fallback/stubs/grpcio/grpc/aio/__init__.pyi +40 -21
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/base.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +0 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/config.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/glogging.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/message.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/unreader.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/wsgi.pyi +0 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/instrument/statsd.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/reloader.pyi +1 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/sock.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/geventlet.pyi +1 -8
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/ggevent.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/gtornado.pyi +1 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/sync.pyi +0 -3
- package/dist/typeshed-fallback/stubs/html5lib/html5lib/html5parser.pyi +5 -5
- package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/exceptions.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +11 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +4 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +10 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +26 -19
- package/dist/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +8 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +10 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +22 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/rcm.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stubs/psycopg2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +3 -0
- package/dist/typeshed-fallback/stubs/pyserial/serial/rfc2217.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports_windows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/urlhandler/protocol_spy.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/rrule.pyi +30 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32pipe.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/www-authenticate/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/www-authenticate/www_authenticate.pyi +34 -0
- package/dist/typeshed-fallback/stubs/xlrd/xlrd/sheet.pyi +5 -5
- package/dist/typeshed-fallback/stubs/xmldiff/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/actions.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff.pyi +36 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff_match_patch.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/formatting.pyi +80 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/main.pyi +70 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/patch.pyi +12 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/utils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/common.pyi +48 -32
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonmistakes.pyi +5 -3
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonprotocols.pyi +5 -3
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ from _typeshed import Unused
|
|
|
3
3
|
from collections.abc import Callable, Collection, Iterable, Iterator, Mapping, Sequence
|
|
4
4
|
from functools import cached_property
|
|
5
5
|
from json.decoder import JSONDecoder
|
|
6
|
-
from typing import Any, Literal, TypedDict, TypeVar, type_check_only
|
|
7
|
-
from typing_extensions import Required, TypeAlias
|
|
6
|
+
from typing import Any, ClassVar, Literal, TypedDict, TypeVar, overload, type_check_only
|
|
7
|
+
from typing_extensions import Never, Required, TypeAlias, deprecated
|
|
8
8
|
from urllib.request import Request, _DataType
|
|
9
9
|
from xml.etree import ElementTree as ET
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ from ..cache import Cache
|
|
|
12
12
|
from ..cookies import LenientSimpleCookie, YoutubeDLCookieJar
|
|
13
13
|
from ..networking.common import Response, _RequestData
|
|
14
14
|
from ..networking.impersonate import ImpersonateTarget
|
|
15
|
-
from ..utils._utils import NO_DEFAULT, RetryManager as _RetryManager
|
|
15
|
+
from ..utils._utils import NO_DEFAULT, ExtractorError, FormatSorter, RetryManager as _RetryManager, classproperty
|
|
16
16
|
from ..YoutubeDL import YoutubeDL
|
|
17
17
|
|
|
18
18
|
@type_check_only
|
|
@@ -37,9 +37,9 @@ _StrNoDefaultOrNone: TypeAlias = str | None | type[NO_DEFAULT]
|
|
|
37
37
|
_T = TypeVar("_T")
|
|
38
38
|
|
|
39
39
|
class InfoExtractor:
|
|
40
|
-
IE_DESC: str | bool
|
|
41
|
-
SEARCH_KEY: str
|
|
42
|
-
def _login_hint(self, method: _StrNoDefaultOrNone
|
|
40
|
+
IE_DESC: ClassVar[str | bool | None]
|
|
41
|
+
SEARCH_KEY: ClassVar[str | None]
|
|
42
|
+
def _login_hint(self, method: _StrNoDefaultOrNone = ..., netrc: str | None = None) -> dict[str, str]: ...
|
|
43
43
|
def __init__(self, downloader: YoutubeDL | None = None) -> None: ...
|
|
44
44
|
@classmethod
|
|
45
45
|
def _match_valid_url(cls, url: str) -> re.Match[str] | None: ...
|
|
@@ -82,8 +82,8 @@ class InfoExtractor:
|
|
|
82
82
|
fatal: bool = True,
|
|
83
83
|
encoding: str | None = None,
|
|
84
84
|
data: _DataType | None = None,
|
|
85
|
-
headers: Mapping[str, str] | None =
|
|
86
|
-
query: str | Mapping[str, str] | None =
|
|
85
|
+
headers: Mapping[str, str] | None = {},
|
|
86
|
+
query: str | Mapping[str, str] | None = {},
|
|
87
87
|
expected_status: int | None = None,
|
|
88
88
|
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
89
89
|
require_impersonation: bool = False,
|
|
@@ -128,14 +128,21 @@ class InfoExtractor:
|
|
|
128
128
|
parse_constant: Callable[[str], Any] | None = None,
|
|
129
129
|
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
|
130
130
|
) -> Any: ...
|
|
131
|
-
|
|
131
|
+
# *args and **kwargs are passed to self._downloader.report_warning().
|
|
132
|
+
def report_warning(
|
|
133
|
+
self, msg: str, video_id: str | None = None, *args: Any, only_once: bool = False, **kwargs: Any
|
|
134
|
+
) -> None: ...
|
|
132
135
|
def to_screen(
|
|
133
136
|
self, msg: str, message: str, skip_eol: bool = False, quiet: bool | None = None, only_once: bool = False
|
|
134
137
|
) -> None: ...
|
|
135
138
|
def write_debug(self, msg: str, only_once: bool = False) -> None: ...
|
|
136
139
|
# *args and **kwargs are passed to .params.get() where params is normally a mapping but is not required to be.
|
|
137
140
|
def get_param(self, name: str, default: Any = None, *args: Any, **kwargs: Any) -> Any: ...
|
|
138
|
-
|
|
141
|
+
@overload
|
|
142
|
+
def report_drm(self, video_id: str, partial: type[NO_DEFAULT] = ...) -> None: ...
|
|
143
|
+
@overload
|
|
144
|
+
@deprecated("InfoExtractor.report_drm no longer accepts the argument partial")
|
|
145
|
+
def report_drm(self, video_id: str, partial: bool) -> None: ...
|
|
139
146
|
def report_extraction(self, id_or_name: str) -> None: ...
|
|
140
147
|
def report_download_webpage(self, video_id: str) -> None: ...
|
|
141
148
|
def report_age_confirmation(self) -> None: ...
|
|
@@ -149,7 +156,12 @@ class InfoExtractor:
|
|
|
149
156
|
def raise_geo_restricted(
|
|
150
157
|
self, msg: str = ..., countries: Collection[str] | None = None, metadata_available: bool = False
|
|
151
158
|
) -> None: ...
|
|
152
|
-
|
|
159
|
+
@overload
|
|
160
|
+
def raise_no_formats(
|
|
161
|
+
self, msg: str | ExtractorError, expected: Literal[False] = False, video_id: str | None = None
|
|
162
|
+
) -> Never: ...
|
|
163
|
+
@overload
|
|
164
|
+
def raise_no_formats(self, msg: str | ExtractorError, expected: Literal[True], video_id: str | None = None) -> None: ...
|
|
153
165
|
@staticmethod
|
|
154
166
|
def url_result(
|
|
155
167
|
url: str,
|
|
@@ -169,7 +181,6 @@ class InfoExtractor:
|
|
|
169
181
|
getter: Callable[..., Any] = ...,
|
|
170
182
|
ie: InfoExtractor | None = None,
|
|
171
183
|
video_kwargs: Mapping[str, Any] | None = None,
|
|
172
|
-
multi_video: bool = False,
|
|
173
184
|
**kwargs: Any, # Added to the dict return value.
|
|
174
185
|
) -> dict[str, Any]: ...
|
|
175
186
|
@staticmethod
|
|
@@ -212,7 +223,7 @@ class InfoExtractor:
|
|
|
212
223
|
headers: Mapping[str, str] = {},
|
|
213
224
|
query: Mapping[str, str] = {},
|
|
214
225
|
expected_status: int | None = None,
|
|
215
|
-
impersonate: str | None = None,
|
|
226
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
216
227
|
require_impersonation: bool = False,
|
|
217
228
|
) -> tuple[ET.ElementTree, Response]: ...
|
|
218
229
|
def _download_xml(
|
|
@@ -228,7 +239,7 @@ class InfoExtractor:
|
|
|
228
239
|
headers: Mapping[str, str] = {},
|
|
229
240
|
query: Mapping[str, str] = {},
|
|
230
241
|
expected_status: int | None = None,
|
|
231
|
-
impersonate: str | None = None,
|
|
242
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
232
243
|
require_impersonation: bool = False,
|
|
233
244
|
) -> ET.ElementTree: ...
|
|
234
245
|
def _download_socket_json_handle(
|
|
@@ -244,7 +255,7 @@ class InfoExtractor:
|
|
|
244
255
|
headers: Mapping[str, str] = {},
|
|
245
256
|
query: Mapping[str, str] = {},
|
|
246
257
|
expected_status: int | None = None,
|
|
247
|
-
impersonate: str | None = None,
|
|
258
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
248
259
|
require_impersonation: bool = False,
|
|
249
260
|
) -> tuple[dict[str, Any], Response]: ...
|
|
250
261
|
def _download_socket_json(
|
|
@@ -260,7 +271,7 @@ class InfoExtractor:
|
|
|
260
271
|
headers: Mapping[str, str] = {},
|
|
261
272
|
query: Mapping[str, str] = {},
|
|
262
273
|
expected_status: int | None = None,
|
|
263
|
-
impersonate: str | None = None,
|
|
274
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
264
275
|
require_impersonation: bool = False,
|
|
265
276
|
) -> dict[str, Any]: ...
|
|
266
277
|
def _download_json_handle(
|
|
@@ -276,7 +287,7 @@ class InfoExtractor:
|
|
|
276
287
|
headers: Mapping[str, str] = {},
|
|
277
288
|
query: Mapping[str, str] = {},
|
|
278
289
|
expected_status: int | None = None,
|
|
279
|
-
impersonate: str | None = None,
|
|
290
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
280
291
|
require_impersonation: bool = False,
|
|
281
292
|
) -> tuple[dict[str, Any], Response]: ...
|
|
282
293
|
def _download_json(
|
|
@@ -292,7 +303,7 @@ class InfoExtractor:
|
|
|
292
303
|
headers: Mapping[str, str] = {},
|
|
293
304
|
query: Mapping[str, str] = {},
|
|
294
305
|
expected_status: int | None = None,
|
|
295
|
-
impersonate: str | None = None,
|
|
306
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
296
307
|
require_impersonation: bool = False,
|
|
297
308
|
) -> dict[str, Any]: ...
|
|
298
309
|
def _download_webpage(
|
|
@@ -301,14 +312,17 @@ class InfoExtractor:
|
|
|
301
312
|
video_id: str,
|
|
302
313
|
note: str | None = None,
|
|
303
314
|
errnote: str | None = None,
|
|
304
|
-
transform_source: Callable[..., str] | None = ...,
|
|
305
315
|
fatal: bool = True,
|
|
316
|
+
tries: int = 1,
|
|
317
|
+
timeout: float | type[NO_DEFAULT] = ...,
|
|
318
|
+
# Remaining arguments are collected with *args, **kwargs and
|
|
319
|
+
# forwarded to _download_webpage_handle().
|
|
306
320
|
encoding: str | None = ...,
|
|
307
321
|
data: _DataType | None = ...,
|
|
308
322
|
headers: Mapping[str, str] = ...,
|
|
309
323
|
query: Mapping[str, str] = ...,
|
|
310
324
|
expected_status: int | None = ...,
|
|
311
|
-
impersonate: str | None = ...,
|
|
325
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = ...,
|
|
312
326
|
require_impersonation: bool = ...,
|
|
313
327
|
) -> str: ...
|
|
314
328
|
def _parse_xml(
|
|
@@ -333,7 +347,7 @@ class InfoExtractor:
|
|
|
333
347
|
) -> Literal["needs_auth", "premium_only", "private", "public", "subscriber_only", "unlisted"] | None: ...
|
|
334
348
|
def _request_webpage(
|
|
335
349
|
self,
|
|
336
|
-
|
|
350
|
+
url_or_request: str | Request,
|
|
337
351
|
video_id: str,
|
|
338
352
|
note: str | None = None,
|
|
339
353
|
errnote: str | None = None,
|
|
@@ -342,6 +356,8 @@ class InfoExtractor:
|
|
|
342
356
|
headers: Mapping[str, str] | None = None,
|
|
343
357
|
query: Mapping[str, str] | None = None,
|
|
344
358
|
expected_status: int | None = None,
|
|
359
|
+
impersonate: ImpersonateTarget | str | bool | Collection[str | ImpersonateTarget] | None = None,
|
|
360
|
+
require_impersonation: bool = False,
|
|
345
361
|
) -> Response | Literal[False]: ...
|
|
346
362
|
@classmethod
|
|
347
363
|
def _match_id(cls, url: str) -> str: ...
|
|
@@ -418,15 +434,7 @@ class InfoExtractor:
|
|
|
418
434
|
group: tuple[int, ...] | list[int] | None = None,
|
|
419
435
|
fatal: bool = False,
|
|
420
436
|
) -> str | None: ...
|
|
421
|
-
def _html_search_meta(
|
|
422
|
-
self,
|
|
423
|
-
name: str,
|
|
424
|
-
html: str,
|
|
425
|
-
display_name: str | None = None,
|
|
426
|
-
fatal: bool = False,
|
|
427
|
-
flags: int = 0,
|
|
428
|
-
group: tuple[int, ...] | list[int] | None = None,
|
|
429
|
-
) -> str | None: ...
|
|
437
|
+
def _html_search_meta(self, name: str, html: str, display_name: str | None = None, fatal: bool = False) -> str | None: ...
|
|
430
438
|
def _dc_search_uploader(self, html: str) -> str | None: ...
|
|
431
439
|
@staticmethod
|
|
432
440
|
def _rta_search(html: str) -> int: ...
|
|
@@ -464,6 +472,11 @@ class InfoExtractor:
|
|
|
464
472
|
@staticmethod
|
|
465
473
|
def _hidden_inputs(html: str) -> dict[str, Any]: ...
|
|
466
474
|
def _form_hidden_inputs(self, form_id: str, html: str) -> dict[str, Any]: ...
|
|
475
|
+
@classproperty
|
|
476
|
+
@deprecated(
|
|
477
|
+
"yt_dlp.InfoExtractor.FormatSort is deprecated and may be removed in the future. Use yt_dlp.utils.FormatSorter instead"
|
|
478
|
+
)
|
|
479
|
+
def FormatSort(self) -> FormatSorter: ...
|
|
467
480
|
def _check_formats(self, formats: list[dict[str, Any]], video_id: str) -> None: ...
|
|
468
481
|
@staticmethod
|
|
469
482
|
def _remove_duplicate_formats(formats: list[dict[str, Any]]) -> None: ...
|
|
@@ -792,7 +805,7 @@ class InfoExtractor:
|
|
|
792
805
|
def _live_title(self, name: _T) -> _T: ...
|
|
793
806
|
def _get_cookies(self, url: str) -> LenientSimpleCookie: ...
|
|
794
807
|
def _apply_first_set_cookie_header(self, url_handle: Response, cookie: str) -> None: ...
|
|
795
|
-
@
|
|
808
|
+
@classproperty
|
|
796
809
|
def _RETURN_TYPE(cls) -> str: ...
|
|
797
810
|
def _get_subtitles(self, *args: Any, **kwargs: Any) -> list[dict[str, Any]]: ... # Not implemented here.
|
|
798
811
|
# Passes *args and **kwargs to _get_comments.
|
|
@@ -864,5 +877,8 @@ class SearchInfoExtractor(InfoExtractor):
|
|
|
864
877
|
def _real_extract(self, query: str) -> _InfoDict: ...
|
|
865
878
|
def _get_n_results(self, query: str, n: int) -> list[_InfoDict]: ...
|
|
866
879
|
def _search_results(self, query: str) -> list[_InfoDict]: ...
|
|
880
|
+
@classproperty
|
|
881
|
+
def SEARCH_KEY(self) -> str | None: ...
|
|
867
882
|
|
|
868
|
-
class UnsupportedURLIE(InfoExtractor):
|
|
883
|
+
class UnsupportedURLIE(InfoExtractor):
|
|
884
|
+
IE_DESC: ClassVar[bool]
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
1
3
|
from .common import InfoExtractor
|
|
2
4
|
|
|
3
5
|
class CommonMistakesIE(InfoExtractor):
|
|
4
|
-
IE_DESC: bool
|
|
6
|
+
IE_DESC: ClassVar[bool]
|
|
5
7
|
|
|
6
8
|
class UnicodeBOMIE(InfoExtractor):
|
|
7
|
-
IE_DESC: bool
|
|
9
|
+
IE_DESC: ClassVar[bool]
|
|
8
10
|
|
|
9
11
|
class BlobIE(InfoExtractor):
|
|
10
|
-
IE_DESC: bool
|
|
12
|
+
IE_DESC: ClassVar[bool]
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
1
3
|
from .common import InfoExtractor
|
|
2
4
|
|
|
3
5
|
class RtmpIE(InfoExtractor):
|
|
4
|
-
IE_DESC: bool
|
|
6
|
+
IE_DESC: ClassVar[bool]
|
|
5
7
|
|
|
6
8
|
class MmsIE(InfoExtractor):
|
|
7
|
-
IE_DESC: bool
|
|
9
|
+
IE_DESC: ClassVar[bool]
|
|
8
10
|
|
|
9
11
|
class ViewSourceIE(InfoExtractor):
|
|
10
|
-
IE_DESC: bool
|
|
12
|
+
IE_DESC: ClassVar[bool]
|
package/package.json
CHANGED