|
| 1 | +# (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. |
| 2 | + |
| 3 | +# pyre-strict |
| 4 | + |
| 5 | +from __future__ import annotations |
| 6 | + |
| 7 | +from typing import Iterable, Iterator, NoReturn, TypeVar |
| 8 | + |
| 9 | +TYPED_INT_UNSIGNED: int |
| 10 | +TYPED_INT_SIGNED: int |
| 11 | + |
| 12 | +TYPED_INT_8BIT: int |
| 13 | +TYPED_INT_16BIT: int |
| 14 | +TYPED_INT_32BIT: int |
| 15 | +TYPED_INT_64BIT: int |
| 16 | + |
| 17 | +TYPED_INT8: int |
| 18 | +TYPED_INT16: int |
| 19 | +TYPED_INT32: int |
| 20 | +TYPED_INT64: int |
| 21 | + |
| 22 | +TYPED_UINT8: int |
| 23 | +TYPED_UINT16: int |
| 24 | +TYPED_UINT32: int |
| 25 | +TYPED_UINT64: int |
| 26 | + |
| 27 | +TYPED_OBJECT: int |
| 28 | +TYPED_DOUBLE: int |
| 29 | +TYPED_SINGLE: int |
| 30 | +TYPED_CHAR: int |
| 31 | +TYPED_BOOL: int |
| 32 | +TYPED_VOID: int |
| 33 | +TYPED_STRING: int |
| 34 | +TYPED_ERROR: int |
| 35 | +TYPED_ARRAY: int |
| 36 | + |
| 37 | +SEQ_LIST: int |
| 38 | +SEQ_TUPLE: int |
| 39 | +SEQ_LIST_INEXACT: int |
| 40 | +SEQ_ARRAY_INT64: int |
| 41 | +SEQ_SUBSCR_UNCHECKED: int |
| 42 | + |
| 43 | +SEQ_REPEAT_INEXACT_SEQ: int |
| 44 | +SEQ_REPEAT_INEXACT_NUM: int |
| 45 | +SEQ_REPEAT_REVERSED: int |
| 46 | +SEQ_REPEAT_PRIMITIVE_NUM: int |
| 47 | + |
| 48 | +SEQ_CHECKED_LIST: int |
| 49 | + |
| 50 | +PRIM_OP_EQ_INT: int |
| 51 | +PRIM_OP_NE_INT: int |
| 52 | +PRIM_OP_LT_INT: int |
| 53 | +PRIM_OP_LE_INT: int |
| 54 | +PRIM_OP_GT_INT: int |
| 55 | +PRIM_OP_GE_INT: int |
| 56 | +PRIM_OP_LT_UN_INT: int |
| 57 | +PRIM_OP_LE_UN_INT: int |
| 58 | +PRIM_OP_GT_UN_INT: int |
| 59 | +PRIM_OP_GE_UN_INT: int |
| 60 | +PRIM_OP_EQ_DBL: int |
| 61 | +PRIM_OP_NE_DBL: int |
| 62 | +PRIM_OP_LT_DBL: int |
| 63 | +PRIM_OP_LE_DBL: int |
| 64 | +PRIM_OP_GT_DBL: int |
| 65 | +PRIM_OP_GE_DBL: int |
| 66 | + |
| 67 | +PRIM_OP_ADD_INT: int |
| 68 | +PRIM_OP_SUB_INT: int |
| 69 | +PRIM_OP_MUL_INT: int |
| 70 | +PRIM_OP_DIV_INT: int |
| 71 | +PRIM_OP_DIV_UN_INT: int |
| 72 | +PRIM_OP_MOD_INT: int |
| 73 | +PRIM_OP_MOD_UN_INT: int |
| 74 | +PRIM_OP_POW_INT: int |
| 75 | +PRIM_OP_POW_UN_INT: int |
| 76 | +PRIM_OP_LSHIFT_INT: int |
| 77 | +PRIM_OP_RSHIFT_INT: int |
| 78 | +PRIM_OP_RSHIFT_UN_INT: int |
| 79 | +PRIM_OP_XOR_INT: int |
| 80 | +PRIM_OP_OR_INT: int |
| 81 | +PRIM_OP_AND_INT: int |
| 82 | + |
| 83 | +PRIM_OP_ADD_DBL: int |
| 84 | +PRIM_OP_SUB_DBL: int |
| 85 | +PRIM_OP_MUL_DBL: int |
| 86 | +PRIM_OP_DIV_DBL: int |
| 87 | +PRIM_OP_MOD_DBL: int |
| 88 | +PRIM_OP_POW_DBL: int |
| 89 | + |
| 90 | +PRIM_OP_NEG_INT: int |
| 91 | +PRIM_OP_INV_INT: int |
| 92 | +PRIM_OP_NEG_DBL: int |
| 93 | +PRIM_OP_NOT_INT: int |
| 94 | + |
| 95 | +FAST_LEN_INEXACT: int |
| 96 | +FAST_LEN_LIST: int |
| 97 | +FAST_LEN_DICT: int |
| 98 | +FAST_LEN_SET: int |
| 99 | +FAST_LEN_TUPLE: int |
| 100 | +FAST_LEN_ARRAY: int |
| 101 | +FAST_LEN_STR: int |
| 102 | + |
| 103 | +RAND_MAX: int |
| 104 | + |
| 105 | +T = TypeVar("T") |
| 106 | +K = TypeVar("K") |
| 107 | +V = TypeVar("V") |
| 108 | + |
| 109 | +chklist = list[T] |
| 110 | +chkdict = dict[K, V] |
| 111 | + |
| 112 | +class staticarray(Iterable[int]): |
| 113 | + @classmethod |
| 114 | + def __init__(cls, size: int) -> None: ... |
| 115 | + @classmethod |
| 116 | + def __class_getitem__(cls, key: type[object]) -> type[object]: ... |
| 117 | + def __add__(self, other: staticarray) -> staticarray: ... |
| 118 | + def __mul__(self, repeat: int) -> staticarray: ... |
| 119 | + def __rmul__(self, repeat: int) -> staticarray: ... |
| 120 | + def __delitem__(self, index: int) -> None: ... |
| 121 | + def __getitem__(self, index: int) -> int: ... |
| 122 | + def __setitem__(self, index: int, value: int) -> None: ... |
| 123 | + def __len__(self) -> int: ... |
| 124 | + def __repr__(self) -> str: ... |
| 125 | + |
| 126 | + # This is a lie, staticarray doesn't have an __iter__ method. This is here so that |
| 127 | + # calling `list(static_array)` will work. `list()` is typed as taking an |
| 128 | + # Iterable[T], and that doesn't understand Python's support of __getitem__()-based |
| 129 | + # iterables. |
| 130 | + def __iter__(self) -> Iterator[int]: ... |
| 131 | + |
| 132 | +def __build_cinder_class__( |
| 133 | + func: object, name: str, *bases: object, **kwds: object |
| 134 | +) -> type[object]: ... |
| 135 | +def _clear_dlopen_cache() -> None: ... |
| 136 | +def _clear_dlsym_cache() -> None: ... |
| 137 | +def _property_missing_fdel(base: object, key: object) -> NoReturn: ... |
| 138 | +def _property_missing_fget(base: object) -> NoReturn: ... |
| 139 | +def _property_missing_fset(base: object, key: object) -> NoReturn: ... |
| 140 | +def _sizeof_dlopen_cache() -> int: ... |
| 141 | +def _sizeof_dlsym_cache() -> int: ... |
| 142 | +def init_subclass(ty: type[object]) -> None: ... |
| 143 | +def install_sp_audit_hook() -> None: ... |
| 144 | +def is_static_callable(obj: object) -> bool: ... |
| 145 | +def is_static_module(mod: object) -> bool: ... |
| 146 | +def is_type_static(ty: type[object]) -> bool: ... |
| 147 | +def lookup_native_symbol(lib: str, symbol: str) -> int: ... |
| 148 | +def make_context_decorator_wrapper( |
| 149 | + ctx_wrapper: object, wrapper_func: object, func: object |
| 150 | +) -> object: ... |
| 151 | +def make_recreate_cm(ty: type[object]) -> object: ... |
| 152 | +def rand() -> int: ... |
| 153 | +def resolve_primitive_descr(descr: object) -> int: ... |
| 154 | +def set_type_code(ty: type[object], code: int) -> None: ... |
| 155 | +def set_type_final(ty: type[object]) -> type[object]: ... |
| 156 | +def set_type_static(ty: type[object]) -> type[object]: ... |
| 157 | +def set_type_static_final(ty: type[object]) -> type[object]: ... |
0 commit comments