mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Add missing defaults to third-party stubs (#14617)
This commit is contained in:
@@ -9,7 +9,7 @@ BOTH_EDGE: Final = 3
|
||||
def add_edge_detect(
|
||||
chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, poll_time: float
|
||||
) -> Literal[1, 2, 0]: ...
|
||||
def remove_edge_detect(chip_name: str, channel: int, timeout: float = ...) -> None: ...
|
||||
def remove_edge_detect(chip_name: str, channel: int, timeout: float = 0.3) -> None: ...
|
||||
def add_edge_callback(chip_name: str, channel: int, callback: Callable[[int], None]) -> None: ...
|
||||
def edge_event_detected(chip_name: str, channel: int) -> bool: ...
|
||||
def gpio_event_added(chip_name: str, channel: int) -> Any: ...
|
||||
|
||||
@@ -62,24 +62,26 @@ class Emitter:
|
||||
def __init__(
|
||||
self,
|
||||
stream: _WriteStream[Any],
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
) -> None: ...
|
||||
def dispose(self) -> None: ...
|
||||
def emit(self, event: Event) -> None: ...
|
||||
def need_more_events(self) -> bool: ...
|
||||
def need_events(self, count: int) -> bool: ...
|
||||
def increase_indent(self, flow: bool = ..., indentless: bool = ...) -> None: ...
|
||||
def increase_indent(self, flow: bool = False, indentless: bool = False) -> None: ...
|
||||
def expect_stream_start(self) -> None: ...
|
||||
def expect_nothing(self) -> NoReturn: ...
|
||||
def expect_first_document_start(self) -> None: ...
|
||||
def expect_document_start(self, first: bool = False) -> None: ...
|
||||
def expect_document_end(self) -> None: ...
|
||||
def expect_document_root(self) -> None: ...
|
||||
def expect_node(self, root: bool = ..., sequence: bool = ..., mapping: bool = ..., simple_key: bool = ...) -> None: ...
|
||||
def expect_node(
|
||||
self, root: bool = False, sequence: bool = False, mapping: bool = False, simple_key: bool = False
|
||||
) -> None: ...
|
||||
def expect_alias(self) -> None: ...
|
||||
def expect_scalar(self) -> None: ...
|
||||
def expect_flow_sequence(self) -> None: ...
|
||||
@@ -92,10 +94,10 @@ class Emitter:
|
||||
def expect_flow_mapping_value(self) -> None: ...
|
||||
def expect_block_sequence(self) -> None: ...
|
||||
def expect_first_block_sequence_item(self) -> None: ...
|
||||
def expect_block_sequence_item(self, first: bool = ...) -> None: ...
|
||||
def expect_block_sequence_item(self, first: bool = False) -> None: ...
|
||||
def expect_block_mapping(self) -> None: ...
|
||||
def expect_first_block_mapping_key(self) -> None: ...
|
||||
def expect_block_mapping_key(self, first: bool = ...) -> None: ...
|
||||
def expect_block_mapping_key(self, first: bool = False) -> None: ...
|
||||
def expect_block_mapping_simple_value(self) -> None: ...
|
||||
def expect_block_mapping_value(self) -> None: ...
|
||||
def check_empty_sequence(self) -> bool: ...
|
||||
@@ -115,17 +117,19 @@ class Emitter:
|
||||
def flush_stream(self) -> None: ...
|
||||
def write_stream_start(self) -> None: ...
|
||||
def write_stream_end(self) -> None: ...
|
||||
def write_indicator(self, indicator: str, need_whitespace: bool, whitespace: bool = ..., indention: bool = ...) -> None: ...
|
||||
def write_indicator(
|
||||
self, indicator: str, need_whitespace: bool, whitespace: bool = False, indention: bool = False
|
||||
) -> None: ...
|
||||
def write_indent(self) -> None: ...
|
||||
def write_line_break(self, data: str | None = ...) -> None: ...
|
||||
def write_line_break(self, data: str | None = None) -> None: ...
|
||||
def write_version_directive(self, version_text: str) -> None: ...
|
||||
def write_tag_directive(self, handle_text: str, prefix_text: str) -> None: ...
|
||||
def write_single_quoted(self, text: str, split: bool = ...) -> None: ...
|
||||
def write_single_quoted(self, text: str, split: bool = True) -> None: ...
|
||||
ESCAPE_REPLACEMENTS: dict[str, str]
|
||||
def write_double_quoted(self, text: str, split: bool = ...) -> None: ...
|
||||
def write_double_quoted(self, text: str, split: bool = True) -> None: ...
|
||||
def determine_block_hints(self, text: str) -> str: ...
|
||||
def write_folded(self, text: str) -> None: ...
|
||||
def write_literal(self, text: str) -> None: ...
|
||||
def write_plain(self, text: str, split: bool = ...) -> None: ...
|
||||
def write_plain(self, text: str, split: bool = True) -> None: ...
|
||||
|
||||
__all__ = ["Emitter", "EmitterError"]
|
||||
|
||||
@@ -14,7 +14,10 @@ class UpdateDict(dict[str, Any]):
|
||||
updated_args: tuple[Any, ...] | None
|
||||
|
||||
class exists_property(Generic[_ScopeT]):
|
||||
def __init__(self, prop: str, type: _ScopeT = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self: exists_property[None], prop: str) -> None: ...
|
||||
@overload
|
||||
def __init__(self, prop: str, type: _ScopeT) -> None: ...
|
||||
@overload
|
||||
def __get__(self, obj: None, type: type[CacheControl[Any]] | None = None) -> Self: ...
|
||||
@overload
|
||||
@@ -31,7 +34,7 @@ class exists_property(Generic[_ScopeT]):
|
||||
def __delete__(self, obj: CacheControl[_ScopeT]) -> None: ...
|
||||
|
||||
class value_property(Generic[_T, _DefaultT, _NoneLiteral, _ScopeT]):
|
||||
def __init__(self, prop: str, default: _DefaultT = ..., none: _NoneLiteral = ..., type: _ScopeT = ...) -> None: ...
|
||||
def __init__(self, prop: str, default: _DefaultT = None, none: _NoneLiteral = None, type: _ScopeT = None) -> None: ... # type: ignore[assignment]
|
||||
@overload
|
||||
def __get__(self, obj: None, type: type[CacheControl[Any]] | None = None) -> Self: ...
|
||||
@overload
|
||||
|
||||
@@ -69,7 +69,7 @@ async def remove(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
) -> None: ...
|
||||
async def unlink(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
) -> None: ...
|
||||
async def mkdir(
|
||||
path: StrOrBytesPath,
|
||||
@@ -91,23 +91,23 @@ async def link(
|
||||
src: StrOrBytesPath,
|
||||
dst: StrOrBytesPath,
|
||||
*,
|
||||
src_dir_fd: int | None = ...,
|
||||
dst_dir_fd: int | None = ...,
|
||||
follow_symlinks: bool = ...,
|
||||
src_dir_fd: int | None = None,
|
||||
dst_dir_fd: int | None = None,
|
||||
follow_symlinks: bool = True,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Executor | None = ...,
|
||||
) -> None: ...
|
||||
async def symlink(
|
||||
src: StrOrBytesPath,
|
||||
dst: StrOrBytesPath,
|
||||
target_is_directory: bool = ...,
|
||||
target_is_directory: bool = False,
|
||||
*,
|
||||
dir_fd: int | None = ...,
|
||||
dir_fd: int | None = None,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Executor | None = ...,
|
||||
) -> None: ...
|
||||
async def readlink(
|
||||
path: AnyStr, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
path: AnyStr, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
) -> AnyStr: ...
|
||||
async def rmdir(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = None, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
|
||||
@@ -157,9 +157,9 @@ if sys.platform != "win32":
|
||||
in_fd: int,
|
||||
offset: int,
|
||||
count: int,
|
||||
headers: Sequence[ReadableBuffer] = ...,
|
||||
trailers: Sequence[ReadableBuffer] = ...,
|
||||
flags: int = ...,
|
||||
headers: Sequence[ReadableBuffer] = (),
|
||||
trailers: Sequence[ReadableBuffer] = (),
|
||||
flags: int = 0,
|
||||
*,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Executor | None = ...,
|
||||
|
||||
@@ -11,11 +11,11 @@ class SymmetricSignatureVerifier(SignatureVerifier):
|
||||
|
||||
class JwksFetcher:
|
||||
CACHE_TTL: ClassVar[int]
|
||||
def __init__(self, jwks_url: str, cache_ttl: int = ...) -> None: ...
|
||||
def __init__(self, jwks_url: str, cache_ttl: int = 600) -> None: ...
|
||||
def get_key(self, key_id: str): ...
|
||||
|
||||
class AsymmetricSignatureVerifier(SignatureVerifier):
|
||||
def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = ...) -> None: ...
|
||||
def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = 600) -> None: ...
|
||||
|
||||
class TokenVerifier:
|
||||
iss: str
|
||||
|
||||
@@ -30,7 +30,7 @@ class OrderedMultiDict(dict[_KT, _VT]):
|
||||
def popall(self, k: _KT, default: _VT = ...) -> list[_VT]: ...
|
||||
def poplast(self, k: _KT = ..., default: _VT = ...) -> _VT: ...
|
||||
@overload # type: ignore[override]
|
||||
def setdefault(self, k: _KT, default: None = ...) -> _VT | None: ...
|
||||
def setdefault(self, k: _KT, default: None = None) -> _VT | None: ...
|
||||
@overload
|
||||
def setdefault(self, k: _KT, default: _VT) -> _VT: ...
|
||||
def sorted(self, key: _KT | None = None, reverse: bool = False) -> Self: ...
|
||||
|
||||
@@ -29,7 +29,7 @@ class FFI:
|
||||
if sys.platform == "win32":
|
||||
def dlopen(self, name: str, flags: int = ...) -> _cffi_backend.Lib: ...
|
||||
else:
|
||||
def dlopen(self, name: str | None, flags: int = ...) -> _cffi_backend.Lib: ...
|
||||
def dlopen(self, name: str | None, flags: int = 0) -> _cffi_backend.Lib: ...
|
||||
|
||||
def dlclose(self, lib: _cffi_backend.Lib) -> None: ...
|
||||
def typeof(self, cdecl: str | CData | types.BuiltinFunctionType | types.FunctionType) -> CType: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Sequence
|
||||
|
||||
def merge_flags(cfg1: dict[str, list[str]], cfg2: dict[str, list[str]]) -> dict[str, list[str]]: ...
|
||||
def call(libname: str, flag: str, encoding: str = ...) -> str: ...
|
||||
def call(libname: str, flag: str, encoding: str = "utf-8") -> str: ...
|
||||
def flags_from_pkgconfig(libs: Sequence[str]) -> dict[str, list[str]]: ...
|
||||
|
||||
@@ -72,7 +72,7 @@ class InMemoryChannelLayer(BaseChannelLayer):
|
||||
expiry: int = 60,
|
||||
group_expiry: int = 86400,
|
||||
capacity: int = 100,
|
||||
channel_capacity: _ChannelCapacityDict | None = ...,
|
||||
channel_capacity: _ChannelCapacityDict | None = None,
|
||||
) -> None: ...
|
||||
|
||||
extensions: list[str]
|
||||
@@ -86,6 +86,6 @@ class InMemoryChannelLayer(BaseChannelLayer):
|
||||
async def group_discard(self, group: str, channel: str) -> None: ...
|
||||
async def group_send(self, group: str, message: dict[str, Any]) -> None: ...
|
||||
|
||||
def get_channel_layer(alias: str = ...) -> BaseChannelLayer | None: ...
|
||||
def get_channel_layer(alias: str = "default") -> BaseChannelLayer | None: ...
|
||||
|
||||
channel_layers: ChannelLayerManager
|
||||
|
||||
@@ -30,12 +30,12 @@ class _ElementBase: ...
|
||||
class RestrictedElement(_ElementBase):
|
||||
blacklist: Incomplete
|
||||
def __iter__(self): ...
|
||||
def iterchildren(self, tag: Incomplete | None = ..., reversed: bool = ...): ...
|
||||
def iter(self, tag: Incomplete | None = ..., *tags): ...
|
||||
def iterdescendants(self, tag: Incomplete | None = ..., *tags): ...
|
||||
def itersiblings(self, tag: Incomplete | None = ..., preceding: bool = ...): ...
|
||||
def iterchildren(self, tag=None, reversed: bool = False): ...
|
||||
def iter(self, tag=None, *tags): ...
|
||||
def iterdescendants(self, tag=None, *tags): ...
|
||||
def itersiblings(self, tag=None, preceding: bool = False): ...
|
||||
def getchildren(self): ...
|
||||
def getiterator(self, tag: Incomplete | None = ...): ...
|
||||
def getiterator(self, tag=None): ...
|
||||
|
||||
class GlobalParserTLS(threading.local):
|
||||
parser_config: Incomplete
|
||||
@@ -46,16 +46,8 @@ class GlobalParserTLS(threading.local):
|
||||
|
||||
def getDefaultParser(): ...
|
||||
def check_docinfo(elementtree, forbid_dtd: bool = False, forbid_entities: bool = True) -> None: ...
|
||||
def parse(
|
||||
source,
|
||||
parser: Incomplete | None = ...,
|
||||
base_url: Incomplete | None = ...,
|
||||
forbid_dtd: bool = ...,
|
||||
forbid_entities: bool = ...,
|
||||
): ...
|
||||
def fromstring(
|
||||
text, parser: Incomplete | None = ..., base_url: Incomplete | None = ..., forbid_dtd: bool = ..., forbid_entities: bool = ...
|
||||
): ...
|
||||
def parse(source, parser=None, base_url=None, forbid_dtd: bool = False, forbid_entities: bool = True): ...
|
||||
def fromstring(text, parser=None, base_url=None, forbid_dtd: bool = False, forbid_entities: bool = True): ...
|
||||
|
||||
XML = fromstring
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class Resource(Generic[_ModelT], metaclass=DeclarativeMetaclass):
|
||||
@overload
|
||||
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[True]) -> NoReturn: ...
|
||||
@overload
|
||||
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[False] = ...) -> None: ...
|
||||
def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[False] = False) -> None: ...
|
||||
def import_row(self, row: dict[str, Any], instance_loader: BaseInstanceLoader, **kwargs: Any) -> RowResult: ...
|
||||
def import_data(
|
||||
self,
|
||||
|
||||
@@ -42,6 +42,6 @@ class SSHHTTPAdapter(BaseHTTPAdapter):
|
||||
timeout: Incomplete
|
||||
max_pool_size: Incomplete
|
||||
pools: Incomplete
|
||||
def __init__(self, base_url, timeout: int = 60, pool_connections=..., max_pool_size=..., shell_out: bool = False) -> None: ...
|
||||
def __init__(self, base_url, timeout: int = 60, pool_connections=25, max_pool_size=10, shell_out: bool = False) -> None: ...
|
||||
def get_connection(self, url, proxies=None): ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
@@ -90,7 +90,7 @@ def publish_cmdline(
|
||||
config_section: str | None = None,
|
||||
enable_exit_status: bool = True,
|
||||
argv: list[str] | None = None,
|
||||
usage: str = ...,
|
||||
usage: str = "%prog [options] [<source> [<destination>]]",
|
||||
description: str = ...,
|
||||
): ...
|
||||
def publish_file(
|
||||
@@ -182,7 +182,7 @@ def publish_cmdline_to_binary(
|
||||
config_section: str | None = None,
|
||||
enable_exit_status: bool = True,
|
||||
argv: list[str] | None = None,
|
||||
usage: str = ...,
|
||||
usage: str = "%prog [options] [<source> [<destination>]]",
|
||||
description: str = ...,
|
||||
destination=None,
|
||||
destination_class=...,
|
||||
|
||||
@@ -186,10 +186,10 @@ class ConfigParser(RawConfigParser):
|
||||
old_warning: ClassVar[str]
|
||||
not_utf8_error: ClassVar[str]
|
||||
@overload # type: ignore[override]
|
||||
def read(self, filenames: str | Sequence[str], option_parser: None = None) -> list[str]: ...
|
||||
def read(self, filenames: str | Sequence[str]) -> list[str]: ...
|
||||
@overload
|
||||
@deprecated("The `option_parser` parameter is deprecated and will be removed in Docutils 0.24.")
|
||||
def read(self, filenames: str | Sequence[str], option_parser: OptionParser = ...) -> list[str]: ...
|
||||
def read(self, filenames: str | Sequence[str], option_parser: OptionParser | None) -> list[str]: ...
|
||||
def handle_old_config(self, filename: str) -> None: ...
|
||||
def validate_settings(self, filename: str, option_parser: OptionParser) -> None: ...
|
||||
def optionxform(self, optionstr: str) -> str: ...
|
||||
|
||||
@@ -286,10 +286,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
def visit_docinfo(self, node: nodes.docinfo) -> None: ...
|
||||
def depart_docinfo(self, node: nodes.docinfo) -> None: ...
|
||||
@overload
|
||||
def visit_docinfo_item(self, node, name: None = None) -> None: ...
|
||||
def visit_docinfo_item(self, node) -> None: ...
|
||||
@overload
|
||||
@deprecated("The `name` parameter is deprecated and will be removed in Docutils 0.24.")
|
||||
def visit_docinfo_item(self, node, name: str = ...) -> None: ...
|
||||
def visit_docinfo_item(self, node, name: str | None) -> None: ...
|
||||
def depart_docinfo_item(self, node) -> None: ...
|
||||
def visit_doctest_block(self, node: nodes.doctest_block) -> None: ...
|
||||
def depart_doctest_block(self, node: nodes.doctest_block) -> None: ...
|
||||
|
||||
@@ -188,7 +188,7 @@ class NeededResources:
|
||||
recompute_hashes: bool = True,
|
||||
base_url: str | None = None,
|
||||
script_name: str | None = None,
|
||||
publisher_signature: str = ...,
|
||||
publisher_signature: str = "fanstatic",
|
||||
resources: Iterable[Dependable] | None = None,
|
||||
) -> None: ...
|
||||
def has_resources(self) -> bool: ...
|
||||
|
||||
@@ -41,7 +41,7 @@ class Delegator:
|
||||
publisher: Publisher
|
||||
publisher_signature: str
|
||||
trigger: str
|
||||
def __init__(self, app: WSGIApplication, publisher: Publisher, publisher_signature: str = ...) -> None: ...
|
||||
def __init__(self, app: WSGIApplication, publisher: Publisher, publisher_signature: str = "fanstatic") -> None: ...
|
||||
def is_resource(self, request: Request) -> bool: ...
|
||||
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from webob import Request, Response
|
||||
from webob.dec import wsgify
|
||||
|
||||
def Fanstatic(
|
||||
app: WSGIApplication, publisher_signature: str = ..., injector: InjectorPlugin | None = None, **config: Any
|
||||
app: WSGIApplication, publisher_signature: str = "fanstatic", injector: InjectorPlugin | None = None, **config: Any
|
||||
) -> Delegator: ...
|
||||
def make_fanstatic(app: WSGIApplication, global_config: Any, **local_config: Any) -> Delegator: ...
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ gevent.socket.getnameinfo
|
||||
gevent.socket.socket.closed
|
||||
gevent.socket.wait_readwrite
|
||||
gevent.socket.wait_write
|
||||
gevent.socket.socket.__slots__
|
||||
|
||||
# we have punted on ssl, the gevent version of these functions have an additional
|
||||
# argument for timeouts/blocking and there are some with different default values
|
||||
|
||||
@@ -19,7 +19,7 @@ class _SupportsHandleError(Protocol):
|
||||
_ErrorHandler: TypeAlias = _ErrorHandlerFunc | _SupportsHandleError
|
||||
|
||||
def assign_standard_callbacks(
|
||||
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ...
|
||||
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ()
|
||||
) -> object: ...
|
||||
|
||||
class AbstractLoop:
|
||||
@@ -28,7 +28,7 @@ class AbstractLoop:
|
||||
starting_timer_may_update_loop_time: bool
|
||||
# internal API, this __init__ will only be called from subclasses
|
||||
def __init__(
|
||||
self, ffi: object, lib: object, watchers: object, flags: int | None = ..., default: bool | None = ...
|
||||
self, ffi: object, lib: object, watchers: object, flags: int | None = None, default: bool | None = None
|
||||
) -> None: ...
|
||||
def destroy(self) -> bool | None: ...
|
||||
@property
|
||||
@@ -78,10 +78,10 @@ class AbstractLoop:
|
||||
def install_sigchld(self) -> None: ...
|
||||
|
||||
def async_(self, ref: bool = True, priority: int | None = None) -> _AsyncWatcher: ...
|
||||
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = ...) -> _StatWatcher: ...
|
||||
def stat(self, path: str, interval: float = 0.0, ref: bool = True, priority: bool | None = None) -> _StatWatcher: ...
|
||||
def run_callback(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
|
||||
def run_callback_threadsafe(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
|
||||
def callback(self, priority: float | None = ...) -> _Callback: ...
|
||||
def callback(self, priority: float | None = None) -> _Callback: ...
|
||||
def fileno(self) -> FileDescriptor | None: ...
|
||||
|
||||
__all__ = ["AbstractLoop", "assign_standard_callbacks"]
|
||||
|
||||
@@ -14,7 +14,7 @@ class AbstractWatcherType(type):
|
||||
|
||||
class watcher(metaclass=AbstractWatcherType):
|
||||
loop: _Loop
|
||||
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ...) -> None: ...
|
||||
def __init__(self, _loop: _Loop, ref: bool = True, priority: int | None = None, args: tuple[object, ...] = ()) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
@@ -8,14 +8,19 @@ _T = TypeVar("_T")
|
||||
WRAPPER_ASSIGNMENTS: tuple[str, ...]
|
||||
WRAPPER_UPDATES: tuple[str, ...]
|
||||
|
||||
def update_wrapper(wrapper: _T, wrapped: object, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _T: ...
|
||||
def update_wrapper(
|
||||
wrapper: _T,
|
||||
wrapped: object,
|
||||
assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
|
||||
updated: Sequence[str] = ("__dict__",),
|
||||
) -> _T: ...
|
||||
def copy_globals(
|
||||
source: ModuleType,
|
||||
globs: MutableMapping[str, Any],
|
||||
only_names: Iterable[str] | None = None,
|
||||
ignore_missing_names: bool = False,
|
||||
names_to_ignore: Sequence[str] = ...,
|
||||
dunder_names_to_keep: Sequence[str] = ...,
|
||||
names_to_ignore: Sequence[str] = (),
|
||||
dunder_names_to_keep: Sequence[str] = ("__implements__", "__all__", "__imports__"),
|
||||
cleanup_globs: bool = True,
|
||||
) -> list[str]: ...
|
||||
def import_c_accel(globs: MutableMapping[str, Any], cname: str) -> None: ...
|
||||
|
||||
@@ -43,7 +43,7 @@ if sys.platform != "win32":
|
||||
def reinit(self) -> None: ...
|
||||
def ref(self) -> None: ...
|
||||
def unref(self) -> None: ...
|
||||
def break_(self, how: int = ...) -> None: ...
|
||||
def break_(self, how: int = 1) -> None: ...
|
||||
def verify(self) -> None: ...
|
||||
def now(self) -> float: ...
|
||||
def update_now(self) -> None: ...
|
||||
|
||||
@@ -43,7 +43,7 @@ class channel:
|
||||
flags: int = 0,
|
||||
) -> None: ...
|
||||
def gethostbyaddr(self, callback: Callable[[Result[ares_host_result]], object], addr: str) -> Any: ...
|
||||
def gethostbyname(self, callback: Callable[[Result[ares_host_result]], object], name: str, family: int = ...) -> None: ...
|
||||
def gethostbyname(self, callback: Callable[[Result[ares_host_result]], object], name: str, family: int = 2) -> None: ...
|
||||
def getnameinfo(self, callback: Callable[[Result[_NameinfoResult]], object], sockaddr: _SockAddr, flags: int) -> None: ...
|
||||
def set_servers(self, servers: Sequence[str] | str | None = None) -> None: ...
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ def unescape_list_or_string(val: str) -> str: ...
|
||||
|
||||
class Contentline(str):
|
||||
strict: bool
|
||||
def __new__(cls, value: str | bytes, strict: bool = False, encoding: str = ...) -> Self: ...
|
||||
def __new__(cls, value: str | bytes, strict: bool = False, encoding: str = "utf-8") -> Self: ...
|
||||
@classmethod
|
||||
def from_parts(cls, name: ICAL_TYPE, params: Parameters, values, sorted: bool = True) -> Self: ...
|
||||
def parts(self) -> tuple[str, Parameters, str]: ...
|
||||
|
||||
@@ -12,10 +12,10 @@ ICAL_TYPE: TypeAlias = str | bytes
|
||||
def from_unicode(value: ICAL_TYPE, encoding: str = "utf-8") -> bytes: ...
|
||||
def to_unicode(value: ICAL_TYPE, encoding: str = "utf-8-sig") -> str: ...
|
||||
@overload
|
||||
def data_encode(data: ICAL_TYPE, encoding: str = ...) -> bytes: ...
|
||||
def data_encode(data: ICAL_TYPE, encoding: str = "utf-8") -> bytes: ...
|
||||
@overload
|
||||
def data_encode(data: dict[Any, Any], encoding: str = ...) -> dict[Any, Any]: ...
|
||||
def data_encode(data: dict[Any, Any], encoding: str = "utf-8") -> dict[Any, Any]: ...
|
||||
@overload
|
||||
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = ...) -> list[Any]: ...
|
||||
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = "utf-8") -> list[Any]: ...
|
||||
@overload
|
||||
def data_encode(data: _T, encoding: str = ...) -> _T: ...
|
||||
def data_encode(data: _T, encoding: str = "utf-8") -> _T: ...
|
||||
|
||||
@@ -91,7 +91,7 @@ class LuaRuntime:
|
||||
def require(self, modulename: str) -> object: ...
|
||||
def globals(self) -> _LuaTable: ...
|
||||
def table(self, *items: Any, **kwargs: Any) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = ...) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = False) -> _LuaTable: ...
|
||||
def nogc(self) -> _LuaNoGC: ...
|
||||
def gccollect(self) -> None: ...
|
||||
def set_max_memory(self, max_memory: int, total: bool = False) -> None: ...
|
||||
|
||||
@@ -91,7 +91,7 @@ class LuaRuntime:
|
||||
def require(self, modulename: str) -> object: ...
|
||||
def globals(self) -> _LuaTable: ...
|
||||
def table(self, *items: Any, **kwargs: Any) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = ...) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = False) -> _LuaTable: ...
|
||||
def nogc(self) -> _LuaNoGC: ...
|
||||
def gccollect(self) -> None: ...
|
||||
def set_max_memory(self, max_memory: int, total: bool = False) -> None: ...
|
||||
|
||||
@@ -91,7 +91,7 @@ class LuaRuntime:
|
||||
def require(self, modulename: str) -> object: ...
|
||||
def globals(self) -> _LuaTable: ...
|
||||
def table(self, *items: Any, **kwargs: Any) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = ...) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = False) -> _LuaTable: ...
|
||||
def nogc(self) -> _LuaNoGC: ...
|
||||
def gccollect(self) -> None: ...
|
||||
def set_max_memory(self, max_memory: int, total: bool = False) -> None: ...
|
||||
|
||||
@@ -91,7 +91,7 @@ class LuaRuntime:
|
||||
def require(self, modulename: str) -> object: ...
|
||||
def globals(self) -> _LuaTable: ...
|
||||
def table(self, *items: Any, **kwargs: Any) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = ...) -> _LuaTable: ...
|
||||
def table_from(self, *args: Any, recursive: bool = False) -> _LuaTable: ...
|
||||
def nogc(self) -> _LuaNoGC: ...
|
||||
def gccollect(self) -> None: ...
|
||||
def set_max_memory(self, max_memory: int, total: bool = False) -> None: ...
|
||||
|
||||
@@ -417,7 +417,7 @@ class ConditionalFormatList(Serialisable):
|
||||
tagname: ClassVar[str]
|
||||
conditionalFormat: Incomplete
|
||||
__attrs__: ClassVar[tuple[str, ...]]
|
||||
def __init__(self, conditionalFormat=..., count: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, conditionalFormat=(), count=None) -> None: ...
|
||||
def by_priority(self): ...
|
||||
@property
|
||||
def count(self) -> int: ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from logging import Logger
|
||||
|
||||
from pika.adapters.base_connection import BaseConnection
|
||||
@@ -10,17 +9,15 @@ LOGGER: Logger
|
||||
class GeventConnection(BaseConnection):
|
||||
def __init__(
|
||||
self,
|
||||
parameters: Incomplete | None = ...,
|
||||
on_open_callback: Incomplete | None = ...,
|
||||
on_open_error_callback: Incomplete | None = ...,
|
||||
on_close_callback: Incomplete | None = ...,
|
||||
custom_ioloop: Incomplete | None = ...,
|
||||
internal_connection_workflow: bool = ...,
|
||||
parameters=None,
|
||||
on_open_callback=None,
|
||||
on_open_error_callback=None,
|
||||
on_close_callback=None,
|
||||
custom_ioloop=None,
|
||||
internal_connection_workflow: bool = True,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def create_connection(
|
||||
cls, connection_configs, on_done, custom_ioloop: Incomplete | None = ..., workflow: Incomplete | None = ...
|
||||
): ...
|
||||
def create_connection(cls, connection_configs, on_done, custom_ioloop=None, workflow=None): ...
|
||||
|
||||
class _TSafeCallbackQueue:
|
||||
def __init__(self) -> None: ...
|
||||
@@ -33,7 +30,7 @@ class _GeventSelectorIOLoop(AbstractSelectorIOLoop):
|
||||
READ: int
|
||||
WRITE: int
|
||||
ERROR: int
|
||||
def __init__(self, gevent_hub: Incomplete | None = ...) -> None: ...
|
||||
def __init__(self, gevent_hub=None) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
@@ -45,7 +42,7 @@ class _GeventSelectorIOLoop(AbstractSelectorIOLoop):
|
||||
def remove_handler(self, fd) -> None: ...
|
||||
|
||||
class _GeventSelectorIOServicesAdapter(SelectorIOServicesAdapter):
|
||||
def getaddrinfo(self, host, port, on_done, family: int = ..., socktype: int = ..., proto: int = ..., flags: int = ...): ...
|
||||
def getaddrinfo(self, host, port, on_done, family: int = 0, socktype: int = 0, proto: int = 0, flags: int = 0): ...
|
||||
|
||||
class _GeventIOLoopIOHandle(AbstractIOReference):
|
||||
def __init__(self, subject) -> None: ...
|
||||
|
||||
@@ -244,11 +244,11 @@ def wait_procs(
|
||||
) -> tuple[list[Process], list[Process]]: ...
|
||||
def cpu_count(logical: bool = True) -> int | None: ...
|
||||
@overload
|
||||
def cpu_freq(percpu: Literal[False] = ...) -> scpufreq: ...
|
||||
def cpu_freq(percpu: Literal[False] = False) -> scpufreq: ...
|
||||
@overload
|
||||
def cpu_freq(percpu: Literal[True]) -> list[scpufreq]: ...
|
||||
@overload
|
||||
def cpu_times(percpu: Literal[False] = ...) -> scputimes: ...
|
||||
def cpu_times(percpu: Literal[False] = False) -> scputimes: ...
|
||||
@overload
|
||||
def cpu_times(percpu: Literal[True]) -> list[scputimes]: ...
|
||||
@overload
|
||||
|
||||
@@ -61,13 +61,13 @@ def cpu_freq(): ...
|
||||
disk_usage: Any
|
||||
disk_io_counters: Any
|
||||
|
||||
def disk_partitions(all: bool = ...): ...
|
||||
def disk_partitions(all: bool = False): ...
|
||||
def sensors_battery(): ...
|
||||
|
||||
net_io_counters: Any
|
||||
net_if_addrs: Any
|
||||
|
||||
def net_connections(kind: str = ...): ...
|
||||
def net_connections(kind: str = "inet"): ...
|
||||
def net_if_stats(): ...
|
||||
def boot_time(): ...
|
||||
def users(): ...
|
||||
@@ -99,9 +99,9 @@ class Process:
|
||||
def num_ctx_switches(self): ...
|
||||
def num_threads(self): ...
|
||||
def open_files(self): ...
|
||||
def net_connections(self, kind: str = ...): ...
|
||||
def net_connections(self, kind: str = "inet"): ...
|
||||
def num_fds(self): ...
|
||||
def wait(self, timeout: Incomplete | None = ...): ...
|
||||
def wait(self, timeout=None): ...
|
||||
def nice_get(self): ...
|
||||
def nice_set(self, value): ...
|
||||
def status(self): ...
|
||||
|
||||
@@ -16,7 +16,7 @@ def iou(
|
||||
gt: _NDArrayUInt32 | list[float] | list[_EncodedRLE],
|
||||
pyiscrowd: list[int] | _NDArrayUInt8,
|
||||
) -> list[Any] | _NDArrayFloat64: ...
|
||||
def merge(rleObjs: list[_EncodedRLE], intersect: int = ...) -> _EncodedRLE: ...
|
||||
def merge(rleObjs: list[_EncodedRLE], intersect: int = 0) -> _EncodedRLE: ...
|
||||
|
||||
# ignore an "overlapping overloads" error due to _NDArrayInt32 being an alias for `Incomplete` for now
|
||||
@overload
|
||||
|
||||
@@ -71,7 +71,7 @@ class Serial(SerialBase, PlatformSpecific):
|
||||
def write(self, b: ReadableBuffer, /) -> int | None: ...
|
||||
def reset_input_buffer(self) -> None: ...
|
||||
def reset_output_buffer(self) -> None: ...
|
||||
def send_break(self, duration: float = ...) -> None: ...
|
||||
def send_break(self, duration: float = 0.25) -> None: ...
|
||||
@property
|
||||
def cts(self) -> bool: ...
|
||||
@property
|
||||
@@ -82,8 +82,8 @@ class Serial(SerialBase, PlatformSpecific):
|
||||
def cd(self) -> bool: ...
|
||||
@property
|
||||
def out_waiting(self) -> int: ...
|
||||
def set_input_flow_control(self, enable: bool = ...) -> None: ...
|
||||
def set_output_flow_control(self, enable: bool = ...) -> None: ...
|
||||
def set_input_flow_control(self, enable: bool = True) -> None: ...
|
||||
def set_output_flow_control(self, enable: bool = True) -> None: ...
|
||||
def nonblocking(self) -> None: ...
|
||||
|
||||
class PosixPollSerial(Serial): ...
|
||||
|
||||
@@ -33,4 +33,4 @@ if sys.platform == "darwin":
|
||||
|
||||
def scan_interfaces() -> list[SuitableSerialInterface]: ...
|
||||
def search_for_locationID_in_interfaces(serial_interfaces: list[SuitableSerialInterface], locationID: int) -> str | None: ...
|
||||
def comports(include_links: bool = ...) -> list[ListPortInfo]: ...
|
||||
def comports(include_links: bool = False) -> list[ListPortInfo]: ...
|
||||
|
||||
@@ -24,7 +24,7 @@ def GetNumberOfConsoleFonts(): ...
|
||||
def SetConsoleTitle(ConsoleTitle: str) -> None: ...
|
||||
def GetConsoleTitle(): ...
|
||||
@overload
|
||||
def GenerateConsoleCtrlEvent(CtrlEvent: Literal[1], ProcessGroupId: Literal[0] = ...) -> NoReturn: ...
|
||||
def GenerateConsoleCtrlEvent(CtrlEvent: Literal[1], ProcessGroupId: Literal[0] = 0) -> NoReturn: ...
|
||||
@overload
|
||||
def GenerateConsoleCtrlEvent(CtrlEvent: Literal[0, 1], ProcessGroupId: int) -> None: ...
|
||||
def GetStdHandle(StdHandle: int) -> _win32typing.PyConsoleScreenBuffer: ...
|
||||
|
||||
@@ -98,7 +98,7 @@ def SHCreateShellItem(
|
||||
) -> _win32typing.PyIShellItem: ...
|
||||
def SHOpenFolderAndSelectItems(Folder: _win32typing.PyIDL, Items: tuple[_win32typing.PyIDL, ...], Flags=...) -> None: ...
|
||||
def SHCreateStreamOnFileEx(
|
||||
File: str, Mode: int, Attributes: int, Create: bool, Template: None = ...
|
||||
File: str, Mode: int, Attributes: int, Create: bool, Template: None = None
|
||||
) -> _win32typing.PyIStream: ...
|
||||
def SetCurrentProcessExplicitAppUserModelID(AppID: str, /) -> None: ...
|
||||
def GetCurrentProcessExplicitAppUserModelID() -> str: ...
|
||||
|
||||
@@ -183,4 +183,4 @@ class ShapedStr(str):
|
||||
def shapeStr(s: str, fontName: str, fontSize: float, force: bool = False): ...
|
||||
def freshTTFont(ttfn, ttfpath, **kwds) -> TTFont: ...
|
||||
def makeShapedFragWord(w, K: list[Incomplete] = [], V: list[Incomplete] = []) -> type[ShapedFragWord]: ...
|
||||
def shapeFragWord(w, features=..., force: bool = False): ...
|
||||
def shapeFragWord(w, features=None, force: bool = False): ...
|
||||
|
||||
@@ -9,7 +9,7 @@ class FileList:
|
||||
files: list[str]
|
||||
def __init__(self, warn: Unused = None, debug_print: Unused = None) -> None: ...
|
||||
def set_allfiles(self, allfiles: Iterable[str]) -> None: ...
|
||||
def findall(self, dir: StrPath = ...) -> None: ...
|
||||
def findall(self, dir: StrPath = ".") -> None: ...
|
||||
def debug_print(self, msg: object) -> None: ...
|
||||
def append(self, item: str) -> None: ...
|
||||
def extend(self, items: Iterable[str]) -> None: ...
|
||||
|
||||
@@ -15,156 +15,156 @@ _T = TypeVar("_T")
|
||||
@overload
|
||||
def dumps(
|
||||
obj: Any,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
skipkeys: bool = False,
|
||||
ensure_ascii: bool = True,
|
||||
check_circular: bool = True,
|
||||
allow_nan: bool = False,
|
||||
*,
|
||||
cls: type[JSONEncoder],
|
||||
indent: str | int | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
encoding: str | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
namedtuple_as_object: bool = ...,
|
||||
tuple_as_array: bool = ...,
|
||||
bigint_as_string: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = ...,
|
||||
for_json: bool = ...,
|
||||
ignore_nan: bool = ...,
|
||||
int_as_string_bitcount: int | None = ...,
|
||||
iterable_as_array: bool = ...,
|
||||
indent: str | int | None = None,
|
||||
separators: tuple[str, str] | None = None,
|
||||
encoding: str | None = "utf-8",
|
||||
default: Callable[[Any], Any] | None = None,
|
||||
use_decimal: bool = True,
|
||||
namedtuple_as_object: bool = True,
|
||||
tuple_as_array: bool = True,
|
||||
bigint_as_string: bool = False,
|
||||
sort_keys: bool = False,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = None,
|
||||
for_json: bool = False,
|
||||
ignore_nan: bool = False,
|
||||
int_as_string_bitcount: int | None = None,
|
||||
iterable_as_array: bool = False,
|
||||
**kw: Any,
|
||||
) -> str: ...
|
||||
@overload
|
||||
def dumps(
|
||||
obj: Any,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: type[JSONEncoder] | None = ...,
|
||||
indent: str | int | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
encoding: str | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
namedtuple_as_object: bool = ...,
|
||||
tuple_as_array: bool = ...,
|
||||
bigint_as_string: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = ...,
|
||||
for_json: bool = ...,
|
||||
ignore_nan: bool = ...,
|
||||
int_as_string_bitcount: int | None = ...,
|
||||
iterable_as_array: bool = ...,
|
||||
skipkeys: bool = False,
|
||||
ensure_ascii: bool = True,
|
||||
check_circular: bool = True,
|
||||
allow_nan: bool = False,
|
||||
cls: type[JSONEncoder] | None = None,
|
||||
indent: str | int | None = None,
|
||||
separators: tuple[str, str] | None = None,
|
||||
encoding: str | None = "utf-8",
|
||||
default: Callable[[Any], Any] | None = None,
|
||||
use_decimal: bool = True,
|
||||
namedtuple_as_object: bool = True,
|
||||
tuple_as_array: bool = True,
|
||||
bigint_as_string: bool = False,
|
||||
sort_keys: bool = False,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = None,
|
||||
for_json: bool = False,
|
||||
ignore_nan: bool = False,
|
||||
int_as_string_bitcount: int | None = None,
|
||||
iterable_as_array: bool = False,
|
||||
) -> str: ...
|
||||
@overload
|
||||
def dump(
|
||||
obj: Any,
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
skipkeys: bool = False,
|
||||
ensure_ascii: bool = True,
|
||||
check_circular: bool = True,
|
||||
allow_nan: bool = False,
|
||||
*,
|
||||
cls: type[JSONEncoder],
|
||||
indent: str | int | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
encoding: str | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
namedtuple_as_object: bool = ...,
|
||||
tuple_as_array: bool = ...,
|
||||
bigint_as_string: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = ...,
|
||||
for_json: bool = ...,
|
||||
ignore_nan: bool = ...,
|
||||
int_as_string_bitcount: int | None = ...,
|
||||
iterable_as_array: bool = ...,
|
||||
indent: str | int | None = None,
|
||||
separators: tuple[str, str] | None = None,
|
||||
encoding: str | None = "utf-8",
|
||||
default: Callable[[Any], Any] | None = None,
|
||||
use_decimal: bool = True,
|
||||
namedtuple_as_object: bool = True,
|
||||
tuple_as_array: bool = True,
|
||||
bigint_as_string: bool = False,
|
||||
sort_keys: bool = False,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = None,
|
||||
for_json: bool = False,
|
||||
ignore_nan: bool = False,
|
||||
int_as_string_bitcount: int | None = None,
|
||||
iterable_as_array: bool = False,
|
||||
**kw: Any,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def dump(
|
||||
obj: Any,
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: type[JSONEncoder] | None = ...,
|
||||
indent: str | int | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
encoding: str | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
namedtuple_as_object: bool = ...,
|
||||
tuple_as_array: bool = ...,
|
||||
bigint_as_string: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = ...,
|
||||
for_json: bool = ...,
|
||||
ignore_nan: bool = ...,
|
||||
int_as_string_bitcount: int | None = ...,
|
||||
iterable_as_array: bool = ...,
|
||||
skipkeys: bool = False,
|
||||
ensure_ascii: bool = True,
|
||||
check_circular: bool = True,
|
||||
allow_nan: bool = False,
|
||||
cls: type[JSONEncoder] | None = None,
|
||||
indent: str | int | None = None,
|
||||
separators: tuple[str, str] | None = None,
|
||||
encoding: str | None = "utf-8",
|
||||
default: Callable[[Any], Any] | None = None,
|
||||
use_decimal: bool = True,
|
||||
namedtuple_as_object: bool = True,
|
||||
tuple_as_array: bool = True,
|
||||
bigint_as_string: bool = False,
|
||||
sort_keys: bool = False,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = None,
|
||||
for_json: bool = False,
|
||||
ignore_nan: bool = False,
|
||||
int_as_string_bitcount: int | None = None,
|
||||
iterable_as_array: bool = False,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def loads(
|
||||
s: _LoadsString,
|
||||
encoding: str | None = ...,
|
||||
encoding: str | None = None,
|
||||
*,
|
||||
cls: type[JSONDecoder],
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
|
||||
parse_float: Callable[[str], Any] | None = ...,
|
||||
parse_int: Callable[[str], Any] | None = ...,
|
||||
parse_constant: Callable[[str], Any] | None = ...,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = None,
|
||||
parse_float: Callable[[str], Any] | None = None,
|
||||
parse_int: Callable[[str], Any] | None = None,
|
||||
parse_constant: Callable[[str], Any] | None = None,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
||||
use_decimal: bool = False,
|
||||
allow_nan: bool = False,
|
||||
**kw: Any,
|
||||
) -> Any: ...
|
||||
@overload
|
||||
def loads(
|
||||
s: _LoadsString,
|
||||
encoding: str | None = ...,
|
||||
cls: type[JSONDecoder] | None = ...,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
|
||||
parse_float: Callable[[str], Any] | None = ...,
|
||||
parse_int: Callable[[str], Any] | None = ...,
|
||||
parse_constant: Callable[[str], Any] | None = ...,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
encoding: str | None = None,
|
||||
cls: type[JSONDecoder] | None = None,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = None,
|
||||
parse_float: Callable[[str], Any] | None = None,
|
||||
parse_int: Callable[[str], Any] | None = None,
|
||||
parse_constant: Callable[[str], Any] | None = None,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
||||
use_decimal: bool = False,
|
||||
allow_nan: bool = False,
|
||||
) -> Any: ...
|
||||
@overload
|
||||
def load(
|
||||
fp: IO[str],
|
||||
encoding: str | None = ...,
|
||||
encoding: str | None = None,
|
||||
*,
|
||||
cls: type[JSONDecoder],
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
|
||||
parse_float: Callable[[str], Any] | None = ...,
|
||||
parse_int: Callable[[str], Any] | None = ...,
|
||||
parse_constant: Callable[[str], Any] | None = ...,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = None,
|
||||
parse_float: Callable[[str], Any] | None = None,
|
||||
parse_int: Callable[[str], Any] | None = None,
|
||||
parse_constant: Callable[[str], Any] | None = None,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
||||
use_decimal: bool = False,
|
||||
allow_nan: bool = False,
|
||||
**kw: Any,
|
||||
) -> Any: ...
|
||||
@overload
|
||||
def load(
|
||||
fp: IO[str],
|
||||
encoding: str | None = ...,
|
||||
cls: type[JSONDecoder] | None = ...,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
|
||||
parse_float: Callable[[str], Any] | None = ...,
|
||||
parse_int: Callable[[str], Any] | None = ...,
|
||||
parse_constant: Callable[[str], Any] | None = ...,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
encoding: str | None = None,
|
||||
cls: type[JSONDecoder] | None = None,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = None,
|
||||
parse_float: Callable[[str], Any] | None = None,
|
||||
parse_int: Callable[[str], Any] | None = None,
|
||||
parse_constant: Callable[[str], Any] | None = None,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
||||
use_decimal: bool = False,
|
||||
allow_nan: bool = False,
|
||||
) -> Any: ...
|
||||
def simple_first(kv: tuple[_T, object]) -> tuple[bool, _T]: ...
|
||||
|
||||
|
||||
@@ -15,18 +15,18 @@ class JSONDecoder:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
encoding: str | None = ...,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
|
||||
parse_float: Callable[[str], Any] | None = ...,
|
||||
parse_int: Callable[[str], Any] | None = ...,
|
||||
parse_constant: Callable[[str], Any] | None = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
|
||||
allow_nan: bool = ...,
|
||||
encoding: str | None = None,
|
||||
object_hook: Callable[[dict[Any, Any]], Any] | None = None,
|
||||
parse_float: Callable[[str], Any] | None = None,
|
||||
parse_int: Callable[[str], Any] | None = None,
|
||||
parse_constant: Callable[[str], Any] | None = None,
|
||||
strict: bool = True,
|
||||
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
|
||||
allow_nan: bool = False,
|
||||
) -> None: ...
|
||||
def decode(self, s: str, _w: Callable[[str, int], Match[str]] = ..., _PY3: Literal[True] = ...) -> Any: ...
|
||||
def decode(self, s: str, _w: Callable[[str, int], Match[str]] = ..., _PY3: Literal[True] = True) -> Any: ...
|
||||
def raw_decode(
|
||||
self, s: str, idx: int = ..., _w: Callable[[str, int], Match[str]] = ..., _PY3: Literal[True] = ...
|
||||
self, s: str, idx: int = 0, _w: Callable[[str, int], Match[str]] = ..., _PY3: Literal[True] = True
|
||||
) -> tuple[Any, int]: ...
|
||||
|
||||
__all__ = ["JSONDecoder"]
|
||||
|
||||
@@ -31,24 +31,24 @@ class JSONEncoder:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: str | int | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
encoding: str = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
use_decimal: bool = ...,
|
||||
namedtuple_as_object: bool = ...,
|
||||
tuple_as_array: bool = ...,
|
||||
bigint_as_string: bool = ...,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = ...,
|
||||
for_json: bool = ...,
|
||||
ignore_nan: bool = ...,
|
||||
int_as_string_bitcount: int | None = ...,
|
||||
iterable_as_array: bool = ...,
|
||||
skipkeys: bool = False,
|
||||
ensure_ascii: bool = True,
|
||||
check_circular: bool = True,
|
||||
allow_nan: bool = False,
|
||||
sort_keys: bool = False,
|
||||
indent: str | int | None = None,
|
||||
separators: tuple[str, str] | None = None,
|
||||
encoding: str = "utf-8",
|
||||
default: Callable[[Any], Any] | None = None,
|
||||
use_decimal: bool = True,
|
||||
namedtuple_as_object: bool = True,
|
||||
tuple_as_array: bool = True,
|
||||
bigint_as_string: bool = False,
|
||||
item_sort_key: Callable[[Any], SupportsRichComparison] | None = None,
|
||||
for_json: bool = False,
|
||||
ignore_nan: bool = False,
|
||||
int_as_string_bitcount: int | None = None,
|
||||
iterable_as_array: bool = False,
|
||||
) -> None: ...
|
||||
def encode(self, o: Any) -> str: ...
|
||||
def default(self, o: Any) -> NoReturn: ...
|
||||
@@ -56,5 +56,5 @@ class JSONEncoder:
|
||||
|
||||
class JSONEncoderForHTML(JSONEncoder): ...
|
||||
|
||||
def encode_basestring(s: str | bytes, _PY3: Literal[True] = ..., _q: str = ...) -> str: ...
|
||||
def encode_basestring(s: str | bytes, _PY3: Literal[True] = True, _q: str = '"') -> str: ...
|
||||
def encode_basestring_ascii(s: str | bytes, /) -> str: ...
|
||||
|
||||
@@ -51,7 +51,7 @@ class Watch:
|
||||
self,
|
||||
*,
|
||||
callback: Callable[[FrameType, WatchElement, tuple[str, str, int | None]], None] = ...,
|
||||
pdb: Literal[True] = ...,
|
||||
pdb: Literal[True] = True,
|
||||
file: str | SupportsWrite[str] = ...,
|
||||
stack_limit: int | None = 5,
|
||||
custom_printer: Callable[[Any], None] = ..., # User-defined printing callback
|
||||
|
||||
@@ -16,8 +16,8 @@ class WatchPrint:
|
||||
def __init__(
|
||||
self,
|
||||
file: str | SupportsWrite[str] | None = ...,
|
||||
stack_limit: int | None = ...,
|
||||
custom_printer: Callable[[Any], None] | None = ..., # User-defined printing callback
|
||||
stack_limit: int | None = None,
|
||||
custom_printer: Callable[[Any], None] | None = None, # User-defined printing callback
|
||||
) -> None: ...
|
||||
def __call__(self, frame: FrameType, elem: WatchElement, exec_info: tuple[str, str, int | None]) -> None: ...
|
||||
def getsourceline(self, exec_info: tuple[str, str, int | None]) -> str: ...
|
||||
|
||||
@@ -23,7 +23,7 @@ class YoutubeDL:
|
||||
cache: Cache
|
||||
format_selector: _FormatSelector
|
||||
archive: set[str]
|
||||
def __init__(self, params: _Params | None = ..., auto_init: bool = ...) -> None: ...
|
||||
def __init__(self, params: _Params | None = None, auto_init: bool = True) -> None: ...
|
||||
def warn_if_short_id(self, argv: list[str]) -> None: ...
|
||||
def add_info_extractor(self, ie: InfoExtractor) -> None: ...
|
||||
def get_info_extractor(self, ie_key: str) -> InfoExtractor: ...
|
||||
|
||||
@@ -252,5 +252,5 @@ class _ParsedOptions(NamedTuple):
|
||||
urls: Collection[str]
|
||||
ydl_opts: _Params
|
||||
|
||||
def parse_options(argv: Collection[str] | None = ...) -> _ParsedOptions: ...
|
||||
def main(argv: list[str] | None = ...) -> int: ...
|
||||
def parse_options(argv: Collection[str] | None = None) -> _ParsedOptions: ...
|
||||
def main(argv: list[str] | None = None) -> int: ...
|
||||
|
||||
@@ -32,8 +32,8 @@ class YDLLogger(_LoggerProtocol):
|
||||
class CookieLoadError(YoutubeDLError): ...
|
||||
|
||||
class YoutubeDLCookieJar(MozillaCookieJar):
|
||||
def __init__(self, filename: str | None = ..., delayload: bool = False, policy: CookiePolicy | None = None) -> None: ...
|
||||
def open(self, file: str, *, write: bool = ...) -> Iterator[TextIO]: ...
|
||||
def __init__(self, filename: str | None = None, delayload: bool = False, policy: CookiePolicy | None = None) -> None: ...
|
||||
def open(self, file: str, *, write: bool = False) -> Iterator[TextIO]: ...
|
||||
def get_cookie_header(self, url: str) -> str: ...
|
||||
def get_cookies_for_url(self, url: str) -> list[Cookie]: ...
|
||||
def load(self, filename: str | None = None, ignore_discard: bool = True, ignore_expires: bool = True) -> None: ...
|
||||
@@ -42,11 +42,11 @@ class YoutubeDLCookieJar(MozillaCookieJar):
|
||||
def load_cookies(cookie_file: str, browser_specification: str | None, ydl: YoutubeDL) -> YoutubeDLCookieJar: ...
|
||||
def extract_cookies_from_browser(
|
||||
browser_name: str,
|
||||
profile: str | None = ...,
|
||||
profile: str | None = None,
|
||||
logger: _LoggerProtocol = ...,
|
||||
*,
|
||||
keyring: _LinuxKeyring | None = ...,
|
||||
container: str | None = ...,
|
||||
keyring: _LinuxKeyring | None = None,
|
||||
container: str | None = None,
|
||||
) -> YoutubeDLCookieJar: ...
|
||||
|
||||
_T = TypeVar("_T", bound=MozillaCookieJar)
|
||||
@@ -62,8 +62,8 @@ class LinuxChromeCookieDecryptor(ChromeCookieDecryptor):
|
||||
browser_keyring_name: str,
|
||||
logger: _LoggerProtocol,
|
||||
*,
|
||||
keyring: _LinuxKeyring | None = ...,
|
||||
meta_version: int | None = ...,
|
||||
keyring: _LinuxKeyring | None = None,
|
||||
meta_version: int | None = None,
|
||||
) -> None: ...
|
||||
@staticmethod
|
||||
def derive_key(password: bytes) -> bytes: ...
|
||||
@@ -81,8 +81,8 @@ def get_cookie_decryptor(
|
||||
browser_keyring_name: str,
|
||||
logger: _LoggerProtocol,
|
||||
*,
|
||||
keyring: _LinuxKeyring | None = ...,
|
||||
meta_version: int | None = ...,
|
||||
keyring: _LinuxKeyring | None = None,
|
||||
meta_version: int | None = None,
|
||||
) -> ChromeCookieDecryptor: ...
|
||||
|
||||
class ParserError(Exception): ...
|
||||
|
||||
@@ -23,7 +23,7 @@ _Protocol: TypeAlias = Literal[
|
||||
|
||||
def get_suitable_downloader(
|
||||
info_dict: _InfoDict,
|
||||
params: Mapping[str, Any] = ...,
|
||||
params: Mapping[str, Any] = {},
|
||||
default: FileDownloader | type[NO_DEFAULT] = ...,
|
||||
protocol: _Protocol | None = None,
|
||||
to_stdout: bool = False,
|
||||
|
||||
@@ -175,11 +175,11 @@ class InfoExtractor:
|
||||
@staticmethod
|
||||
def playlist_result(
|
||||
entries: Iterable[_InfoDict],
|
||||
playlist_id: str | None = ...,
|
||||
playlist_title: str | None = ...,
|
||||
playlist_description: str | None = ...,
|
||||
playlist_id: str | None = None,
|
||||
playlist_title: str | None = None,
|
||||
playlist_description: str | None = None,
|
||||
*,
|
||||
multi_video: bool = ...,
|
||||
multi_video: bool = False,
|
||||
**kwargs: Any, # Added to the dict return value.
|
||||
) -> _InfoDict: ...
|
||||
def http_scheme(self) -> str: ...
|
||||
@@ -197,112 +197,112 @@ class InfoExtractor:
|
||||
def description(cls, *, markdown: bool = True, search_examples: Sequence[str] | None = None) -> str: ...
|
||||
# Calls _get_subtitles which only raises NotImplementedError here.
|
||||
def extract_subtitles(self, *args: Any, **kwargs: Any) -> list[dict[str, Any]]: ...
|
||||
def _configuration_arg(self, key: str, default: Any = ..., *, ie_key: str | None = ..., casesense: bool = ...) -> Any: ...
|
||||
def _configuration_arg(self, key: str, default: Any = ..., *, ie_key: str | None = None, casesense: bool = False) -> Any: ...
|
||||
# These are dynamically created.
|
||||
def _download_xml_handle(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Downloading XML",
|
||||
errnote: str | None = "Unable to download XML",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> tuple[ET.ElementTree, Response]: ...
|
||||
def _download_xml(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Downloading XML",
|
||||
errnote: str | None = "Unable to download XML",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> ET.ElementTree: ...
|
||||
def _download_socket_json_handle(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Polling socket",
|
||||
errnote: str | None = "Unable to poll socket",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> tuple[dict[str, Any], Response]: ...
|
||||
def _download_socket_json(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Polling socket",
|
||||
errnote: str | None = "Unable to poll socket",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> dict[str, Any]: ...
|
||||
def _download_json_handle(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Downloading JSON metadata",
|
||||
errnote: str | None = "Unable to download JSON metadata",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> tuple[dict[str, Any], Response]: ...
|
||||
def _download_json(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
impersonate: str | None = ...,
|
||||
require_impersonation: bool = ...,
|
||||
note: str | None = "Downloading JSON metadata",
|
||||
errnote: str | None = "Unable to download JSON metadata",
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = None,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] = {},
|
||||
query: Mapping[str, str] = {},
|
||||
expected_status: int | None = None,
|
||||
impersonate: str | None = None,
|
||||
require_impersonation: bool = False,
|
||||
) -> dict[str, Any]: ...
|
||||
def _download_webpage(
|
||||
self,
|
||||
url_or_request: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
note: str | None = None,
|
||||
errnote: str | None = None,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
fatal: bool = True,
|
||||
encoding: str | None = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
@@ -315,9 +315,9 @@ class InfoExtractor:
|
||||
self,
|
||||
xml_string: str,
|
||||
video_id: str,
|
||||
transform_source: Callable[..., str] | None = ...,
|
||||
fatal: bool = ...,
|
||||
errnote: str | None = ...,
|
||||
transform_source: Callable[..., str] | None = None,
|
||||
fatal: bool = True,
|
||||
errnote: str | None = None,
|
||||
) -> ET.Element: ...
|
||||
def _parse_mpd_formats(
|
||||
self, mpd_doc: ET.Element, mpd_id: str | None = ..., mpd_base_url: str = ..., mpd_url: str | None = ...
|
||||
@@ -325,23 +325,23 @@ class InfoExtractor:
|
||||
def _real_extract(self, url: str) -> _InfoDict: ...
|
||||
@staticmethod
|
||||
def _availability(
|
||||
is_private: bool | None = ...,
|
||||
needs_premium: bool | None = ...,
|
||||
needs_subscription: bool | None = ...,
|
||||
needs_auth: bool | None = ...,
|
||||
is_unlisted: bool | None = ...,
|
||||
is_private: bool | None = None,
|
||||
needs_premium: bool | None = None,
|
||||
needs_subscription: bool | None = None,
|
||||
needs_auth: bool | None = None,
|
||||
is_unlisted: bool | None = None,
|
||||
) -> Literal["needs_auth", "premium_only", "private", "public", "subscriber_only", "unlisted"] | None: ...
|
||||
def _request_webpage(
|
||||
self,
|
||||
url_or_req: str | Request,
|
||||
video_id: str,
|
||||
note: str | None = ...,
|
||||
errnote: str | None = ...,
|
||||
fatal: bool = ...,
|
||||
data: _DataType | None = ...,
|
||||
headers: Mapping[str, str] = ...,
|
||||
query: Mapping[str, str] = ...,
|
||||
expected_status: int | None = ...,
|
||||
note: str | None = None,
|
||||
errnote: str | None = None,
|
||||
fatal: bool = True,
|
||||
data: _DataType | None = None,
|
||||
headers: Mapping[str, str] | None = None,
|
||||
query: Mapping[str, str] | None = None,
|
||||
expected_status: int | None = None,
|
||||
) -> Response | Literal[False]: ...
|
||||
@classmethod
|
||||
def _match_id(cls, url: str) -> str: ...
|
||||
@@ -467,7 +467,7 @@ class InfoExtractor:
|
||||
def _check_formats(self, formats: list[dict[str, Any]], video_id: str) -> None: ...
|
||||
@staticmethod
|
||||
def _remove_duplicate_formats(formats: list[dict[str, Any]]) -> None: ...
|
||||
def _is_valid_url(self, url: str, video_id: str, item: str = "video", headers: Mapping[str, Any] = ...) -> bool: ...
|
||||
def _is_valid_url(self, url: str, video_id: str, item: str = "video", headers: Mapping[str, Any] = {}) -> bool: ...
|
||||
def _proto_relative_url(self, url: str, scheme: str | None = None) -> str: ...
|
||||
def _sleep(self, timeout: float, video_id: str, msg_template: str | None = None) -> None: ...
|
||||
def _extract_f4m_formats(
|
||||
@@ -481,8 +481,8 @@ class InfoExtractor:
|
||||
fatal: bool = True,
|
||||
m3u8_id: str | None = None,
|
||||
data: str | None = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> list[dict[str, Any]]: ...
|
||||
def _parse_f4m_formats(
|
||||
self,
|
||||
@@ -531,8 +531,8 @@ class InfoExtractor:
|
||||
fatal: bool = True,
|
||||
live: bool = False,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]: ...
|
||||
def _parse_m3u8_formats_and_subtitles(
|
||||
self,
|
||||
@@ -548,8 +548,8 @@ class InfoExtractor:
|
||||
errnote: str | None = None,
|
||||
fatal: bool = True,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
video_id: str | None = None,
|
||||
) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]: ...
|
||||
def _extract_m3u8_vod_duration(
|
||||
@@ -559,8 +559,8 @@ class InfoExtractor:
|
||||
note: str | None = None,
|
||||
errnote: str | None = None,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> int | None: ...
|
||||
def _parse_m3u8_vod_duration(self, m3u8_vod: str, video_id: str) -> int: ...
|
||||
def _extract_mpd_vod_duration(
|
||||
@@ -570,8 +570,8 @@ class InfoExtractor:
|
||||
note: str | None = None,
|
||||
errnote: str | None = None,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> int | None: ...
|
||||
@staticmethod
|
||||
def _xpath_ns(path: str, namespace: str | None = None) -> str: ...
|
||||
@@ -660,8 +660,8 @@ class InfoExtractor:
|
||||
errnote: str | None = None,
|
||||
fatal: bool = True,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> tuple[list[Any], dict[str, Any]]: ...
|
||||
def _parse_mpd_formats_and_subtitles(
|
||||
self,
|
||||
@@ -700,8 +700,8 @@ class InfoExtractor:
|
||||
errnote: str | None = None,
|
||||
fatal: bool = True,
|
||||
data: Any = None,
|
||||
headers: Mapping[str, Any] = ...,
|
||||
query: Mapping[str, Any] = ...,
|
||||
headers: Mapping[str, Any] = {},
|
||||
query: Mapping[str, Any] = {},
|
||||
) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]: ...
|
||||
def _parse_ism_formats_and_subtitles(
|
||||
self, ism_doc: str, ism_url: str, ism_id: str | None = None
|
||||
@@ -722,10 +722,10 @@ class InfoExtractor:
|
||||
self, manifest_url: str, video_id: str, hosts: Mapping[str, Any] = ...
|
||||
) -> list[dict[str, Any]]: ...
|
||||
def _extract_akamai_formats_and_subtitles(
|
||||
self, manifest_url: str, video_id: str, hosts: Mapping[str, Any] = ...
|
||||
self, manifest_url: str, video_id: str, hosts: Mapping[str, Any] = {}
|
||||
) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]: ...
|
||||
def _extract_wowza_formats(
|
||||
self, url: str, video_id: str, m3u8_entry_protocol: str = "m3u8_native", skip_protocols: Collection[str] = ...
|
||||
self, url: str, video_id: str, m3u8_entry_protocol: str = "m3u8_native", skip_protocols: Collection[str] = []
|
||||
) -> list[dict[str, Any]]: ...
|
||||
def _find_jwplayer_data(
|
||||
self, webpage: str, video_id: str | None = None, transform_source: Callable[..., str] = ...
|
||||
@@ -786,7 +786,7 @@ class InfoExtractor:
|
||||
path: str = "/",
|
||||
secure: bool = False,
|
||||
discard: bool = False,
|
||||
rest: dict[str, Any] = ...,
|
||||
rest: dict[str, Any] = {},
|
||||
**kwargs: Unused,
|
||||
) -> None: ...
|
||||
def _live_title(self, name: _T) -> _T: ...
|
||||
@@ -841,7 +841,12 @@ class InfoExtractor:
|
||||
) -> bool: ...
|
||||
def _error_or_warning(self, err: str, _count: int | None = None, _retries: int = 0, *, fatal: bool = True) -> None: ...
|
||||
def _extract_generic_embeds(
|
||||
self, url: str, *args: Unused, info_dict: _InfoDict = ..., note: str = "Extracting generic embeds", **kwargs: Unused
|
||||
self,
|
||||
url: str,
|
||||
*args: Unused,
|
||||
info_dict: _InfoDict = {}, # type: ignore[typeddict-item] # pyright: ignore[reportArgumentType]
|
||||
note: str = "Extracting generic embeds",
|
||||
**kwargs: Unused,
|
||||
) -> list[dict[str, Any]]: ...
|
||||
@classmethod
|
||||
def _extract_from_webpage(cls, url: str, webpage: str) -> Iterator[_InfoDict]: ...
|
||||
|
||||
@@ -7,7 +7,7 @@ CONTROL_SEQUENCES: dict[str, str] = ...
|
||||
def format_text(text: str, f: str) -> str: ...
|
||||
|
||||
class MultilinePrinterBase:
|
||||
def __init__(self, stream: TextIO | None = None, lines: int = ...) -> None: ...
|
||||
def __init__(self, stream: TextIO | None = None, lines: int = 1) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def print_at_line(self, text: str, pos: int) -> None: ...
|
||||
@@ -19,5 +19,5 @@ class MultilineLogger(MultilinePrinterBase): ...
|
||||
class BreaklineStatusPrinter(MultilinePrinterBase): ...
|
||||
|
||||
class MultilinePrinter(MultilinePrinterBase):
|
||||
def __init__(self, stream: TextIO | None = None, lines: int = ..., preserve_output: bool = ...) -> None: ...
|
||||
def __init__(self, stream: TextIO | None = None, lines: int = 1, preserve_output: bool = True) -> None: ...
|
||||
def lock(func: Callable[..., object]) -> Callable[..., object]: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
||||
|
||||
@@ -8,6 +8,6 @@ def bytes_to_intlist(bs: bytes) -> list[int]: ...
|
||||
@deprecated("Use `bytes` instead.")
|
||||
def intlist_to_bytes(xs: list[int]) -> bytes: ...
|
||||
@deprecated("Use `yt_dlp.utils.jwt_encode` instead.")
|
||||
def jwt_encode_hs256(payload_data: Any, key: str, headers: Mapping[str, Any] = ...) -> bytes: ... # Passed to json.dumps().
|
||||
def jwt_encode_hs256(payload_data: Any, key: str, headers: Mapping[str, Any] = {}) -> bytes: ... # Passed to json.dumps().
|
||||
|
||||
compiled_regex_type: type[re.Pattern[Any]]
|
||||
|
||||
@@ -355,7 +355,7 @@ def strftime_or_none(timestamp: int, date_format: str = "%Y%m%d", default: str |
|
||||
def parse_duration(s: str | None) -> float: ...
|
||||
def prepend_extension(filename: str, ext: str, expected_real_ext: str | None = None) -> str: ...
|
||||
def replace_extension(filename: str, ext: str, expected_real_ext: str | None = None) -> str: ...
|
||||
def check_executable(exe: str, args: Iterable[str] = ...) -> str | None: ...
|
||||
def check_executable(exe: str, args: Iterable[str] = []) -> str | None: ...
|
||||
def detect_exe_version(output: str, version_re: str | Pattern[str] | None = None, unrecognized: str = "present") -> str: ...
|
||||
def get_exe_version(
|
||||
exe: str,
|
||||
@@ -444,8 +444,8 @@ def variadic(x: _T, allowed_types: Collection[type[Any]] | type[NO_DEFAULT] = ..
|
||||
def try_call(
|
||||
*funcs: Callable[..., _T],
|
||||
expected_type: type[_T] | None = None,
|
||||
args: Iterable[Any] = ...,
|
||||
kwargs: Mapping[Hashable, Any] = ...,
|
||||
args: Iterable[Any] = [],
|
||||
kwargs: Mapping[Hashable, Any] = {},
|
||||
) -> _T | None: ...
|
||||
def try_get(src: Any, getter: Callable[..., _T] | Collection[Callable[..., _T]], expected_type: type[_T] | None = None) -> _T: ...
|
||||
def filter_dict(dct: Mapping[_K, _V], cndn: Callable[[_K, _V], bool] = ...) -> dict[_K, _V]: ...
|
||||
@@ -457,7 +457,7 @@ TV_PARENTAL_GUIDELINES: Mapping[str, int]
|
||||
|
||||
def parse_age_limit(s: int) -> int | None: ...
|
||||
def strip_jsonp(code: str) -> str: ...
|
||||
def js_to_json(code: str, vars: Mapping[str, Any] = ..., *, strict: bool = False) -> str: ...
|
||||
def js_to_json(code: str, vars: Mapping[str, Any] = {}, *, strict: bool = False) -> str: ...
|
||||
def qualities(quality_ids: Sequence[int]) -> Callable[[int], int]: ...
|
||||
|
||||
POSTPROCESS_WHEN: tuple[str, ...]
|
||||
@@ -520,7 +520,7 @@ def cli_bool_option(
|
||||
separator: str | None = None,
|
||||
) -> Any: ...
|
||||
def cli_valueless_option(params: _Params, command_option: str, param: str, expected_value: bool = True) -> Any: ...
|
||||
def cli_configuration_args(argdict: dict[str, Any], keys: Iterable[str], default: Any = ..., use_compat: bool = True) -> Any: ...
|
||||
def cli_configuration_args(argdict: dict[str, Any], keys: Iterable[str], default: Any = [], use_compat: bool = True) -> Any: ...
|
||||
|
||||
class ISO639Utils:
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user