mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Update shutil.unpack_archive for 3.7 and up (#3558)
This commit is contained in:
@@ -132,9 +132,13 @@ def register_archive_format(name: str, function: Callable[..., Any],
|
||||
def unregister_archive_format(name: str) -> None: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
# Should be _Path once http://bugs.python.org/issue30218 is fixed
|
||||
def unpack_archive(filename: str, extract_dir: Optional[_Path] = ...,
|
||||
format: Optional[str] = ...) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def unpack_archive(filename: _Path, extract_dir: Optional[_Path] = ...,
|
||||
format: Optional[str] = ...) -> None: ...
|
||||
else:
|
||||
# See http://bugs.python.org/issue30218
|
||||
def unpack_archive(filename: str, extract_dir: Optional[_Path] = ...,
|
||||
format: Optional[str] = ...) -> None: ...
|
||||
def register_unpack_format(name: str, extensions: List[str], function: Any,
|
||||
extra_args: Sequence[Tuple[str, Any]] = ...,
|
||||
description: str = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user