diff --git a/stdlib/shutil.pyi b/stdlib/shutil.pyi index b367a46fe..ae62ea4b6 100644 --- a/stdlib/shutil.pyi +++ b/stdlib/shutil.pyi @@ -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] diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index 73edaa004..4471f2c14 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -73,7 +73,6 @@ platform.uname_result.__new__ platform.uname_result._fields platform.uname_result.processor queue.SimpleQueue.__init__ -shutil.rmtree socketserver.UDPServer.allow_reuse_port string.Template.get_identifiers string.Template.is_valid