-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
stdlib: Add several missing @abstractmethod
decorators
#7443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6767315
stdlib: Add several missing `@abstractmethod` decorators
AlexWaygood cd862ea
Update contextlib.pyi
AlexWaygood 8984332
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5dc1a8e
Update contextlib.pyi
AlexWaygood 53163d3
Update contextlib.pyi
AlexWaygood 17bf72d
Update stdlib/mmap.pyi
AlexWaygood 67e51a0
Update stdlib/multiprocessing/synchronize.pyi
AlexWaygood 8d181e6
Update stdlib/mmap.pyi
AlexWaygood 92adb46
Update stdlib/multiprocessing/synchronize.pyi
AlexWaygood 910f7ee
Update stdlib/multiprocessing/synchronize.pyi
AlexWaygood 95b75bf
Update stdlib/os/__init__.pyi
AlexWaygood 413929d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 12f7c45
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cf1447b
Improve `_AsyncGeneratorContextManager.__aexit__`
AlexWaygood 8825f97
Update mmap.pyi
AlexWaygood 247fedb
Update __init__.pyi
AlexWaygood ee35c18
Revert! Revert!
AlexWaygood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import sys | |
import threading | ||
from contextlib import AbstractContextManager | ||
from multiprocessing.context import BaseContext | ||
from types import TracebackType | ||
from typing import Any, Callable, Union | ||
|
||
__all__ = ["Lock", "RLock", "Semaphore", "BoundedSemaphore", "Condition", "Event"] | ||
|
@@ -28,8 +29,11 @@ class Condition(AbstractContextManager[bool]): | |
def wait_for(self, predicate: Callable[[], bool], timeout: float | None = ...) -> bool: ... | ||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ... | ||
def release(self) -> None: ... | ||
def __exit__( | ||
self, __exc_type: type[BaseException] | None, __exc_val: BaseException | None, __exc_tb: TracebackType | None | ||
) -> None: ... | ||
|
||
class Event(AbstractContextManager[bool]): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class doesn't seem to be a context manager at runtime, and doesn't seem to have ever been a context manager at runtime. |
||
class Event: | ||
def __init__(self, lock: _LockLike | None = ..., *, ctx: BaseContext) -> None: ... | ||
def is_set(self) -> bool: ... | ||
def set(self) -> None: ... | ||
|
@@ -49,3 +53,6 @@ class Semaphore(SemLock): | |
class SemLock(AbstractContextManager[bool]): | ||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ... | ||
def release(self) -> None: ... | ||
def __exit__( | ||
self, __exc_type: type[BaseException] | None, __exc_val: BaseException | None, __exc_tb: TracebackType | None | ||
) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.