mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 08:34:23 +08:00
function argument in shutil.register_unpack_format must be Callable (#7083)
This commit is contained in:
@@ -101,11 +101,13 @@ def make_archive(
|
||||
logger: Any | None = ...,
|
||||
) -> str: ...
|
||||
def get_archive_formats() -> list[tuple[str, str]]: ...
|
||||
@overload
|
||||
def register_archive_format(
|
||||
name: str,
|
||||
function: Callable[..., Any],
|
||||
extra_args: Sequence[tuple[str, Any] | list[Any]] | None = ...,
|
||||
description: str = ...,
|
||||
name: str, function: Callable[..., object], extra_args: Sequence[tuple[str, Any] | list[Any]], description: str = ...
|
||||
) -> None: ...
|
||||
@overload
|
||||
def register_archive_format(
|
||||
name: str, function: Callable[[str, str], object], extra_args: None = ..., description: str = ...
|
||||
) -> None: ...
|
||||
def unregister_archive_format(name: str) -> None: ...
|
||||
|
||||
@@ -116,8 +118,17 @@ else:
|
||||
# See http://bugs.python.org/issue30218
|
||||
def unpack_archive(filename: str, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ...
|
||||
|
||||
@overload
|
||||
def register_unpack_format(
|
||||
name: str, extensions: list[str], function: Any, extra_args: Sequence[tuple[str, Any]] | None = ..., description: str = ...
|
||||
name: str,
|
||||
extensions: list[str],
|
||||
function: Callable[..., object],
|
||||
extra_args: Sequence[tuple[str, Any]],
|
||||
description: str = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def register_unpack_format(
|
||||
name: str, extensions: list[str], function: Callable[[str, str], object], extra_args: None = ..., description: str = ...
|
||||
) -> None: ...
|
||||
def unregister_unpack_format(name: str) -> None: ...
|
||||
def get_unpack_formats() -> list[tuple[str, list[str], str]]: ...
|
||||
|
||||
Reference in New Issue
Block a user