-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync vendored typeshed stubs (#12116)
- Loading branch information
1 parent
d1aeadc
commit db6ee74
Showing
22 changed files
with
418 additions
and
231 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
crates/red_knot_module_resolver/vendor/typeshed/source_commit.txt
This file contains 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 +1 @@ | ||
114409d49b43ba62a179ebb856fa70a5161f751e | ||
dcab6e88883c629ede9637fb011958f8b4918f52 |
This file contains 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
84 changes: 84 additions & 0 deletions
84
crates/red_knot_module_resolver/vendor/typeshed/stdlib/_interpchannels.pyi
This file contains 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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
from _typeshed import structseq | ||
from typing import Final, Literal, SupportsIndex, final | ||
from typing_extensions import Buffer, Self | ||
|
||
class ChannelError(RuntimeError): ... | ||
class ChannelClosedError(ChannelError): ... | ||
class ChannelEmptyError(ChannelError): ... | ||
class ChannelNotEmptyError(ChannelError): ... | ||
class ChannelNotFoundError(ChannelError): ... | ||
|
||
# Mark as final, since instantiating ChannelID is not supported. | ||
@final | ||
class ChannelID: | ||
@property | ||
def end(self) -> Literal["send", "recv", "both"]: ... | ||
@property | ||
def send(self) -> Self: ... | ||
@property | ||
def recv(self) -> Self: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __ge__(self, other: ChannelID) -> bool: ... | ||
def __gt__(self, other: ChannelID) -> bool: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __le__(self, other: ChannelID) -> bool: ... | ||
def __lt__(self, other: ChannelID) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
|
||
@final | ||
class ChannelInfo(structseq[int], tuple[bool, bool, bool, int, int, int, int, int]): | ||
__match_args__: Final = ( | ||
"open", | ||
"closing", | ||
"closed", | ||
"count", | ||
"num_interp_send", | ||
"num_interp_send_released", | ||
"num_interp_recv", | ||
"num_interp_recv_released", | ||
) | ||
@property | ||
def open(self) -> bool: ... | ||
@property | ||
def closing(self) -> bool: ... | ||
@property | ||
def closed(self) -> bool: ... | ||
@property | ||
def count(self) -> int: ... # type: ignore[override] | ||
@property | ||
def num_interp_send(self) -> int: ... | ||
@property | ||
def num_interp_send_released(self) -> int: ... | ||
@property | ||
def num_interp_recv(self) -> int: ... | ||
@property | ||
def num_interp_recv_released(self) -> int: ... | ||
@property | ||
def num_interp_both(self) -> int: ... | ||
@property | ||
def num_interp_both_recv_released(self) -> int: ... | ||
@property | ||
def num_interp_both_send_released(self) -> int: ... | ||
@property | ||
def num_interp_both_released(self) -> int: ... | ||
@property | ||
def recv_associated(self) -> bool: ... | ||
@property | ||
def recv_released(self) -> bool: ... | ||
@property | ||
def send_associated(self) -> bool: ... | ||
@property | ||
def send_released(self) -> bool: ... | ||
|
||
def create() -> ChannelID: ... | ||
def destroy(cid: SupportsIndex) -> None: ... | ||
def list_all() -> list[ChannelID]: ... | ||
def list_interpreters(cid: SupportsIndex, *, send: bool) -> list[int]: ... | ||
def send(cid: SupportsIndex, obj: object, *, blocking: bool = True, timeout: float | None = None) -> None: ... | ||
def send_buffer(cid: SupportsIndex, obj: Buffer, *, blocking: bool = True, timeout: float | None = None) -> None: ... | ||
def recv(cid: SupportsIndex, default: object = ...) -> object: ... | ||
def close(cid: SupportsIndex, *, send: bool = False, recv: bool = False) -> None: ... | ||
def get_info(cid: SupportsIndex) -> ChannelInfo: ... | ||
def release(cid: SupportsIndex, *, send: bool = False, recv: bool = False, force: bool = False) -> None: ... |
This file contains 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 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 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 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.