From 1a837277234f12b546d4aa1252e4b44863c0a862 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Fri, 2 Aug 2024 12:14:08 -0400 Subject: [PATCH] Add signature for `pathlib.Path.rmtree()` (#12474) --- stdlib/pathlib.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/pathlib.pyi b/stdlib/pathlib.pyi index 116bf6431..fd05c937d 100644 --- a/stdlib/pathlib.pyi +++ b/stdlib/pathlib.pyi @@ -266,6 +266,9 @@ class Path(PurePath): self, top_down: bool = ..., on_error: Callable[[OSError], object] | None = ..., follow_symlinks: bool = ... ) -> Iterator[tuple[Self, list[str], list[str]]]: ... + if sys.version_info >= (3, 14): + def rmtree(self, ignore_errors: bool = False, on_error: Callable[[OSError], object] | None = None) -> None: ... + class PosixPath(Path, PurePosixPath): ... class WindowsPath(Path, PureWindowsPath): ...