shutil: update rmtree for py311 (#7925)

This commit is contained in:
Shantanu
2022-05-22 15:40:06 -07:00
committed by GitHub
parent c0aafb9a34
commit ceda368abc
2 changed files with 11 additions and 2 deletions

View File

@@ -82,7 +82,17 @@ else:
ignore_dangling_symlinks: bool = ...,
) -> _PathReturn: ...
def rmtree(path: StrOrBytesPath, ignore_errors: bool = ..., onerror: Callable[[Any, Any, Any], Any] | None = ...) -> None: ...
if sys.version_info >= (3, 11):
def rmtree(
path: StrOrBytesPath,
ignore_errors: bool = ...,
onerror: Callable[[Any, Any, Any], Any] | None = ...,
*,
dir_fd: int | None = ...,
) -> None: ...
else:
def rmtree(path: StrOrBytesPath, ignore_errors: bool = ..., onerror: Callable[[Any, Any, Any], Any] | None = ...) -> None: ...
_CopyFn: TypeAlias = Callable[[str, str], None] | Callable[[StrPath, StrPath], None]