From 65002d2e69a8bcfc3609fe7cc47344563aaef434 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 14 Feb 2022 01:41:17 +0000 Subject: [PATCH] `threading`: `Semaphore.__exit__` & `_RLock.__exit__` always return `None` (#7195) `_RLock.__exit__`: https://github.com/python/cpython/blob/1d6ce67c29aa2166ef326952cb605b908fb4f987/Lib/threading.py#L199 `Semaphore.__exit__`: https://github.com/python/cpython/blob/1d6ce67c29aa2166ef326952cb605b908fb4f987/Lib/threading.py#L487 --- stdlib/threading.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/threading.pyi b/stdlib/threading.pyi index b9b44e0be..0ed292f4c 100644 --- a/stdlib/threading.pyi +++ b/stdlib/threading.pyi @@ -168,7 +168,7 @@ class _RLock: __enter__ = acquire def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> bool | None: ... + ) -> None: ... RLock = _RLock @@ -190,7 +190,7 @@ class Semaphore: def __init__(self, value: int = ...) -> None: ... def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> bool | None: ... + ) -> None: ... def acquire(self, blocking: bool = ..., timeout: float | None = ...) -> bool: ... def __enter__(self, blocking: bool = ..., timeout: float | None = ...) -> bool: ... if sys.version_info >= (3, 9):