forked from facebookincubator/ft_utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.pyi
116 lines (108 loc) · 4.91 KB
/
local.pyi
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Copyright (c) Meta Platforms, Inc. and affiliates.
# pyre-unsafe
from typing import Any, Callable, Iterator, Optional, SupportsIndex
__all__ = ["LocalWrapper", "get_local_wrapper", "release_local_wrapper", "__version__"]
class LocalWrapper:
wrapped: Any
def __init__(self, wrapped: Any) -> None: ...
def __getitem__(self, index: Any) -> Any: ...
def __setitem__(self, index: Any, value: Any) -> None: ...
def __delitem__(self, index: Any) -> None: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[Any]: ...
def __next__(self) -> Any: ...
def __add__(self, other: Any) -> Any: ...
def __sub__(self, other: Any) -> Any: ...
def __mul__(self, other: Any) -> Any: ...
def __matmul__(self, other: Any) -> Any: ...
def __truediv__(self, other: Any) -> Any: ...
def __floordiv__(self, other: Any) -> Any: ...
def __mod__(self, other: Any) -> Any: ...
def __divmod__(self, other: Any) -> Any: ...
def __pow__(self, other: Any, modulo: Optional[Any] = None) -> Any: ...
def __lshift__(self, other: Any) -> Any: ...
def __rshift__(self, other: Any) -> Any: ...
def __and__(self, other: Any) -> Any: ...
def __xor__(self, other: Any) -> Any: ...
def __or__(self, other: Any) -> Any: ...
def __radd__(self, other: Any) -> Any: ...
def __rsub__(self, other: Any) -> Any: ...
def __rmul__(self, other: Any) -> Any: ...
def __rmatmul__(self, other: Any) -> Any: ...
def __rtruediv__(self, other: Any) -> Any: ...
def __rfloordiv__(self, other: Any) -> Any: ...
def __rmod__(self, other: Any) -> Any: ...
def __rdivmod__(self, other: Any) -> Any: ...
def __rpow__(self, other: Any, modulo: Optional[Any] = None) -> Any: ...
def __rlshift__(self, other: Any) -> Any: ...
def __rrshift__(self, other: Any) -> Any: ...
def __rand__(self, other: Any) -> Any: ...
def __rxor__(self, other: Any) -> Any: ...
def __ror__(self, other: Any) -> Any: ...
def __iadd__(self, other: Any) -> Any: ...
def __isub__(self, other: Any) -> Any: ...
def __imul__(self, other: Any) -> Any: ...
def __imatmul__(self, other: Any) -> Any: ...
def __itruediv__(self, other: Any) -> Any: ...
def __ifloordiv__(self, other: Any) -> Any: ...
def __imod__(self, other: Any) -> Any: ...
def __ipow__(self, other: Any, modulo: Optional[Any] = None) -> Any: ...
def __ilshift__(self, other: Any) -> Any: ...
def __irshift__(self, other: Any) -> Any: ...
def __iand__(self, other: Any) -> Any: ...
def __ixor__(self, other: Any) -> Any: ...
def __ior__(self, other: Any) -> Any: ...
def __neg__(self) -> Any: ...
def __pos__(self) -> Any: ...
def __abs__(self) -> Any: ...
def __invert__(self) -> Any: ...
def __int__(self) -> int: ...
def __float__(self) -> float: ...
def __bool__(self) -> bool: ...
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __delattr__(self, name: str) -> None: ...
def __hash__(self) -> int: ...
def __eq__(self, other: Any) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
def __lt__(self, other: Any) -> bool: ...
def __le__(self, other: Any) -> bool: ...
def __gt__(self, other: Any) -> bool: ...
def __ge__(self, other: Any) -> bool: ...
def __enter__(self) -> "LocalWrapper": ...
def __exit__(
self,
exc_type: Optional[type],
exc_value: Optional[Exception],
traceback: Optional[Any],
) -> Optional[bool]: ...
def __contains__(self, item: Any) -> bool: ...
def __concat__(self, other: Any) -> "LocalWrapper": ...
def __repeat__(self, count: int) -> "LocalWrapper": ...
def __getitem__(self, index: int | slice) -> Any: ...
def __setitem__(self, index: int | slice, value: Any) -> None: ...
def __delitem__(self, index: int | slice) -> None: ...
def __get__(self, instance: Any, owner: Any) -> Any: ...
def __set__(self, instance: Any, value: Any) -> None: ...
def __delete__(self, instance: Any) -> None: ...
def __copy__(self) -> "LocalWrapper": ...
def __deepcopy__(self, memo: dict) -> "LocalWrapper": ...
def __reduce__(self) -> tuple: ...
def __reduce_ex__(self, protocol: SupportsIndex) -> tuple: ...
def __sizeof__(self) -> int: ...
# Custom methods specific to LocalWrapper
def get_wrapped(self) -> Any: ...
def set_wrapped(self, value: Any) -> None: ...
def del_wrapped(self) -> None: ...
class BatchExecutor:
def __init__(self, source: Callable[[], Any], size: int) -> None: ...
def load(self) -> Any: ...
def as_local(self) -> LocalWrapper: ...
# Module level functions
def get_local_wrapper(wrapped: Any) -> LocalWrapper: ...
def release_local_wrapper(wrapper: LocalWrapper) -> None: ...
# Constants
__version__: str