From 68e2a74a798f3bc0cd8464bdc6ebb80c4ab9ce97 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 14 Feb 2022 01:14:13 +0000 Subject: [PATCH] `pathlib.Path.__exit__` always returns `None` (#7192) Source code here: https://github.com/python/cpython/blob/0ae40191793da1877a12d512f0116d99301b2c51/Lib/pathlib.py#L893 It has always returned `None`, by the looks of things. --- stdlib/pathlib.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/pathlib.pyi b/stdlib/pathlib.pyi index 348784b94..95e3586f6 100644 --- a/stdlib/pathlib.pyi +++ b/stdlib/pathlib.pyi @@ -65,7 +65,7 @@ class Path(PurePath): def __enter__(self: Self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None - ) -> bool | None: ... + ) -> None: ... @classmethod def cwd(cls: type[Self]) -> Self: ... if sys.version_info >= (3, 10):