threading: Semaphore.__exit__ & _RLock.__exit__ always return None (#7195)

`_RLock.__exit__`: 1d6ce67c29/Lib/threading.py (L199)
`Semaphore.__exit__`: 1d6ce67c29/Lib/threading.py (L487)
This commit is contained in:
Alex Waygood
2022-02-14 01:41:17 +00:00
committed by GitHub
parent cabfaabd76
commit 65002d2e69

View File

@@ -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):