shutil: Fix rmtree type (#3536)

See my comment in https://github.com/python/typeshed/issues/3533#issuecomment-563366251.
This commit is contained in:
Jelle Zijlstra
2019-12-21 12:29:59 -08:00
committed by GitHub
parent c44a556fb0
commit 6b751ef408

View File

@@ -96,12 +96,8 @@ else:
Iterable[AnyStr]]] = ...) -> _PathReturn: ...
if sys.version_info >= (3,):
@overload
def rmtree(path: bytes, ignore_errors: bool = ...,
onerror: Optional[Callable[[Any, str, Any], Any]] = ...) -> None: ...
@overload
def rmtree(path: _AnyPath, ignore_errors: bool = ...,
onerror: Optional[Callable[[Any, _AnyPath, Any], Any]] = ...) -> None: ...
def rmtree(path: Union[bytes, _Path], ignore_errors: bool = ...,
onerror: Optional[Callable[[Any, Any, Any], Any]] = ...) -> None: ...
else:
def rmtree(path: _AnyPath, ignore_errors: bool = ...,
onerror: Optional[Callable[[Any, _AnyPath, Any], Any]] = ...) -> None: ...