massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / resource.pyi
1 import sys
2 from typing import Any, Tuple, overload
3
4 RLIMIT_AS: int
5 RLIMIT_CORE: int
6 RLIMIT_CPU: int
7 RLIMIT_DATA: int
8 RLIMIT_FSIZE: int
9 RLIMIT_MEMLOCK: int
10 RLIMIT_NOFILE: int
11 RLIMIT_NPROC: int
12 RLIMIT_RSS: int
13 RLIMIT_STACK: int
14 RLIM_INFINITY: int
15 RUSAGE_CHILDREN: int
16 RUSAGE_SELF: int
17 if sys.platform == "linux":
18     RLIMIT_MSGQUEUE: int
19     RLIMIT_NICE: int
20     RLIMIT_OFILE: int
21     RLIMIT_RTPRIO: int
22     RLIMIT_RTTIME: int
23     RLIMIT_SIGPENDING: int
24     RUSAGE_THREAD: int
25
26 _Tuple16 = Tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int]
27
28 class struct_rusage(_Tuple16):
29     def __new__(cls, sequence: _Tuple16, dict: dict[str, Any] = ...) -> struct_rusage: ...
30     ru_utime: float
31     ru_stime: float
32     ru_maxrss: int
33     ru_ixrss: int
34     ru_idrss: int
35     ru_isrss: int
36     ru_minflt: int
37     ru_majflt: int
38     ru_nswap: int
39     ru_inblock: int
40     ru_oublock: int
41     ru_msgsnd: int
42     ru_msgrcv: int
43     ru_nsignals: int
44     ru_nvcsw: int
45     ru_nivcsw: int
46
47 def getpagesize() -> int: ...
48 def getrlimit(__resource: int) -> tuple[int, int]: ...
49 def getrusage(__who: int) -> struct_rusage: ...
50 def setrlimit(__resource: int, __limits: tuple[int, int]) -> None: ...
51
52 if sys.platform == "linux":
53     @overload
54     def prlimit(pid: int, resource: int, limits: tuple[int, int]) -> tuple[int, int]: ...
55     @overload
56     def prlimit(pid: int, resource: int) -> tuple[int, int]: ...
57
58 error = OSError