-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove some pytype workarounds from stdlib #14470
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 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a3c0895
Remove some pytype workarounds from stdlib
srittau 47ba77d
Remove an stubtest allowlist entry
srittau 87b6999
Don't re-export protected members
srittau cb3a2ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ae46df6
Update stubtest allowlist
srittau 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
Next
Next commit
Remove some pytype workarounds from stdlib
- Loading branch information
commit a3c08952b0aa51327b54bb33b0efbd2d284b60a2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
from _asyncio import Future | ||
from collections.abc import Callable, Sequence | ||
from contextvars import Context | ||
from typing import Any, Final | ||
from typing_extensions import TypeIs | ||
|
||
from . import futures | ||
|
||
__all__ = () | ||
|
||
# asyncio defines 'isfuture()' in base_futures.py and re-imports it in futures.py | ||
# but it leads to circular import error in pytype tool. | ||
# That's why the import order is reversed. | ||
from .futures import isfuture as isfuture | ||
|
||
_PENDING: Final = "PENDING" # undocumented | ||
_CANCELLED: Final = "CANCELLED" # undocumented | ||
_FINISHED: Final = "FINISHED" # undocumented | ||
|
||
def isfuture(obj: object) -> TypeIs[Future[Any]]: ... | ||
def _format_callbacks(cb: Sequence[tuple[Callable[[futures.Future[Any]], None], Context]]) -> str: ... # undocumented | ||
def _future_repr_info(future: futures.Future[Any]) -> list[str]: ... # undocumented |
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
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
Oops, something went wrong.
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.