forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source commit: python/typeshed@9eae1ae
- Loading branch information
Showing
123 changed files
with
1,750 additions
and
936 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any, SupportsIndex | ||
|
||
class QueueError(RuntimeError): ... | ||
class QueueNotFoundError(QueueError): ... | ||
|
||
def bind(qid: SupportsIndex) -> None: ... | ||
def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ... | ||
def destroy(qid: SupportsIndex) -> None: ... | ||
def get(qid: SupportsIndex) -> tuple[Any, int]: ... | ||
def get_count(qid: SupportsIndex) -> int: ... | ||
def get_maxsize(qid: SupportsIndex) -> int: ... | ||
def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ... | ||
def is_full(qid: SupportsIndex) -> bool: ... | ||
def list_all() -> list[tuple[int, int]]: ... | ||
def put(qid: SupportsIndex, obj: Any, fmt: SupportsIndex) -> None: ... | ||
def release(qid: SupportsIndex) -> 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import types | ||
from collections.abc import Callable, Mapping | ||
from typing import Final, Literal, SupportsIndex | ||
from typing_extensions import TypeAlias | ||
|
||
_Configs: TypeAlias = Literal["default", "isolated", "legacy", "empty", ""] | ||
|
||
class InterpreterError(Exception): ... | ||
class InterpreterNotFoundError(InterpreterError): ... | ||
class NotShareableError(Exception): ... | ||
|
||
class CrossInterpreterBufferView: | ||
def __buffer__(self, flags: int, /) -> memoryview: ... | ||
|
||
def new_config(name: _Configs = "isolated", /, **overides: object) -> types.SimpleNamespace: ... | ||
def create(config: types.SimpleNamespace | _Configs | None = "isolated", *, reqrefs: bool = False) -> int: ... | ||
def destroy(id: SupportsIndex, *, restrict: bool = False) -> None: ... | ||
def list_all(*, require_ready: bool) -> list[tuple[int, int]]: ... | ||
def get_current() -> tuple[int, int]: ... | ||
def get_main() -> tuple[int, int]: ... | ||
def is_running(id: SupportsIndex, *, restrict: bool = False) -> bool: ... | ||
def get_config(id: SupportsIndex, *, restrict: bool = False) -> types.SimpleNamespace: ... | ||
def whence(id: SupportsIndex) -> int: ... | ||
def exec(id: SupportsIndex, code: str, shared: bool | None = None, *, restrict: bool = False) -> None: ... | ||
def call( | ||
id: SupportsIndex, | ||
callable: Callable[..., object], | ||
args: tuple[object, ...] | None = None, | ||
kwargs: dict[str, object] | None = None, | ||
*, | ||
restrict: bool = False, | ||
) -> object: ... | ||
def run_string( | ||
id: SupportsIndex, script: str | types.CodeType | Callable[[], object], shared: bool | None = None, *, restrict: bool = False | ||
) -> None: ... | ||
def run_func( | ||
id: SupportsIndex, func: types.CodeType | Callable[[], object], shared: bool | None = None, *, restrict: bool = False | ||
) -> None: ... | ||
def set___main___attrs(id: SupportsIndex, updates: Mapping[str, object], *, restrict: bool = False) -> None: ... | ||
def incref(id: SupportsIndex, *, implieslink: bool = False, restrict: bool = False) -> None: ... | ||
def decref(id: SupportsIndex, *, restrict: bool = False) -> None: ... | ||
def is_shareable(obj: object) -> bool: ... | ||
def capture_exception(exc: BaseException | None = None) -> types.SimpleNamespace: ... | ||
|
||
WHENCE_UNKNOWN: Final = 0 | ||
WHENCE_RUNTIME: Final = 1 | ||
WHENCE_LEGACY_CAPI: Final = 2 | ||
WHENCE_CAPI: Final = 3 | ||
WHENCE_XI: Final = 4 | ||
WHENCE_STDLIB: Final = 5 |
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.