From c8a9e530780351e0e05b8c5fa7149192fed49c57 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Fri, 2 Aug 2024 11:43:46 -0400 Subject: [PATCH 1/2] Add signature for rmtree() --- stdlib/pathlib.pyi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/pathlib.pyi b/stdlib/pathlib.pyi index 116bf6431831..fe5c7cc920f0 100644 --- a/stdlib/pathlib.pyi +++ b/stdlib/pathlib.pyi @@ -266,6 +266,11 @@ 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): ... From 6261b41f00a48032177311d7e3d39ed50e9ff6b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:46:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/pathlib.pyi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stdlib/pathlib.pyi b/stdlib/pathlib.pyi index fe5c7cc920f0..fd05c937d4a6 100644 --- a/stdlib/pathlib.pyi +++ b/stdlib/pathlib.pyi @@ -267,9 +267,7 @@ class Path(PurePath): ) -> 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: ... + def rmtree(self, ignore_errors: bool = False, on_error: Callable[[OSError], object] | None = None) -> None: ... class PosixPath(Path, PurePosixPath): ... class WindowsPath(Path, PureWindowsPath): ...