diff --git a/stdlib/shutil.pyi b/stdlib/shutil.pyi index cfcfad374b20..3052723adeaa 100644 --- a/stdlib/shutil.pyi +++ b/stdlib/shutil.pyi @@ -103,11 +103,11 @@ def register_archive_format( def unregister_archive_format(name: str) -> None: ... if sys.version_info >= (3, 7): - def unpack_archive(filename: StrPath, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ... + def unpack_archive(filename: StrOrBytesPath, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ... else: # See http://bugs.python.org/issue30218 - def unpack_archive(filename: str, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ... + def unpack_archive(filename: str | bytes, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ... def register_unpack_format( name: str, extensions: list[str], function: Any, extra_args: Sequence[tuple[str, Any]] | None = ..., description: str = ...