Skip to content

Commit

Permalink
function argument in shutil.register_unpack_format must be `Calla…
Browse files Browse the repository at this point in the history
…ble` (#7083)
  • Loading branch information
sobolevn committed Jan 30, 2022
1 parent 1365926 commit 9854926
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions stdlib/shutil.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...

Expand All @@ -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: Callable[..., object],
extra_args: Sequence[tuple[str, Any]],
description: str = ...,
) -> 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[[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]]: ...
Expand Down

0 comments on commit 9854926

Please sign in to comment.