From 6b751ef408a54244fc4b2fe671d64b3711b983ca Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Dec 2019 12:29:59 -0800 Subject: [PATCH] shutil: Fix rmtree type (#3536) See my comment in https://github.com/python/typeshed/issues/3533#issuecomment-563366251. --- stdlib/2and3/shutil.pyi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/stdlib/2and3/shutil.pyi b/stdlib/2and3/shutil.pyi index b4c6cc129..9aba6852b 100644 --- a/stdlib/2and3/shutil.pyi +++ b/stdlib/2and3/shutil.pyi @@ -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: ...