Repository navigation
Expand file tree
/
Copy path_runtime.pyi
More file actions
75 lines (69 loc) · 3.02 KB
/
Copy path_runtime.pyi
File metadata and controls
75 lines (69 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from collections.abc import Callable, Iterator
from os import PathLike
from typing import Any
WORKER: str
class Error(Exception):
def __init__(self, type: str | None = None, message: str | None = None, exception: Object | None = None) -> None: ...
type: str | None
message: str | None
exception: Object | None
filename: str | None
lineno: int | None
class WorkerError(RuntimeError):
returncode: int | None
def __init__(self, message: str, returncode: int | None = None) -> None: ...
class Timeout(WorkerError, TimeoutError): ...
class Runtime:
version: str
def __init__(
self,
*,
std: bool = True,
step_limit: int = 0,
memory_limit: int = 0,
output_limit: int = 0,
timeout: float | None = None,
output: Callable[[str], object] | None = None,
loader: Callable[[str], str | None] | None = None,
policy: Callable[[str, tuple[Any, ...]], object] | None = None,
message_limit: int = 67108864,
) -> None: ...
@property
def closed(self) -> bool: ...
def eval(self, source: str, filename: str = "<string>") -> Any: ...
def exec(self, source: str, filename: str = "<string>") -> None: ...
def call(self, function: str | Object | Callable[..., Any], /, *args: Any, **kwargs: Any) -> Any: ...
def define(self, name: str, function: Callable[..., Any]) -> Callable[..., Any]: ...
def function(self, func: Callable[..., Any] | None = None, *, name: str | None = None) -> Any: ...
def register_module(
self, name: str, members: dict[str, Any] | None = None, source: str | None = None
) -> None: ...
def mount(self, directory: str | bytes | PathLike[str] | PathLike[bytes], path: str | None = None,
*, read_only: bool = False) -> None: ...
def load_native(self, name: str, path: str | bytes | PathLike[str] | PathLike[bytes]) -> None: ...
def collect(self) -> int: ...
def usage(self) -> tuple[int, int]: ...
def close(self) -> None: ...
def __enter__(self) -> Runtime: ...
def __exit__(self, *exc: object) -> None: ...
def __getitem__(self, name: str) -> Any: ...
def __setitem__(self, name: str, value: Any) -> None: ...
def __delitem__(self, name: str) -> None: ...
class Object:
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __getitem__(self, key: Any) -> Any: ...
def __setitem__(self, key: Any, value: Any) -> None: ...
def __len__(self) -> int: ...
def __contains__(self, item: Any) -> bool: ...
def __iter__(self) -> Iterator[Any]: ...
def __next__(self) -> Any: ...
def __bool__(self) -> bool: ...
def __hash__(self) -> int: ...
def __eq__(self, other: object) -> Any: ...
def __ne__(self, other: object) -> Any: ...
def __lt__(self, other: Any) -> Any: ...
def __le__(self, other: Any) -> Any: ...
def __gt__(self, other: Any) -> Any: ...
def __ge__(self, other: Any) -> Any: ...