basedpyright 1.13.2 → 1.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +2 -0
- package/dist/typeshed-fallback/stdlib/_ast.pyi +42 -279
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +15 -5
- package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +0 -18
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +180 -164
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +16 -0
- package/dist/typeshed-fallback/stdlib/_interpreters.pyi +50 -0
- package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_msi.pyi +94 -92
- package/dist/typeshed-fallback/stdlib/_operator.pyi +0 -24
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/abc.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/argparse.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +35 -4
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +107 -15
- package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +10 -2
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +23 -4
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +107 -12
- package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/asyncio/windows_utils.pyi +49 -49
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/builtins.pyi +0 -1
- package/dist/typeshed-fallback/stdlib/bz2.pyi +59 -6
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/codecs.pyi +18 -6
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +200 -56
- package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +33 -14
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +99 -16
- package/dist/typeshed-fallback/stdlib/csv.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/curses/panel.pyi +16 -4
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/datetime.pyi +346 -104
- package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +52 -2
- package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +26 -2
- package/dist/typeshed-fallback/stdlib/difflib.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +173 -173
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +99 -99
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +39 -39
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +149 -149
- package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/log.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +38 -36
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/charset.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/header.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +6 -1
- package/dist/typeshed-fallback/stdlib/enum.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/fractions.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/functools.pyi +65 -13
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/hashlib.pyi +42 -14
- package/dist/typeshed-fallback/stdlib/heapq.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/hmac.pyi +30 -2
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +79 -15
- package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/io.pyi +428 -44
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +153 -28
- package/dist/typeshed-fallback/stdlib/itertools.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/keyword.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +17 -3
- package/dist/typeshed-fallback/stdlib/lzma.pyi +107 -9
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
- package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -160
- package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
- package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +10 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +15 -4
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +19 -5
- package/dist/typeshed-fallback/stdlib/nis.pyi +31 -4
- package/dist/typeshed-fallback/stdlib/numbers.pyi +26 -6
- package/dist/typeshed-fallback/stdlib/opcode.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/optparse.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1447 -217
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +42 -11
- package/dist/typeshed-fallback/stdlib/pickle.pyi +200 -12
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/queue.pyi +57 -9
- package/dist/typeshed-fallback/stdlib/re.pyi +219 -57
- package/dist/typeshed-fallback/stdlib/sched.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/signal.pyi +95 -19
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/socket.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +417 -83
- package/dist/typeshed-fallback/stdlib/ssl.pyi +133 -22
- package/dist/typeshed-fallback/stdlib/statistics.pyi +20 -5
- package/dist/typeshed-fallback/stdlib/struct.pyi +114 -13
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/symtable.pyi +30 -1
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +7 -3
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +17 -3
- package/dist/typeshed-fallback/stdlib/threading.pyi +68 -7
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/turtle.pyi +11 -3
- package/dist/typeshed-fallback/stdlib/types.pyi +306 -79
- package/dist/typeshed-fallback/stdlib/typing.pyi +310 -31
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +42 -11
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +6 -1
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +51 -3
- package/dist/typeshed-fallback/stdlib/weakref.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/winsound.pyi +44 -28
- package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +33 -11
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +30 -10
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +19 -4
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +31 -0
- package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +18 -6
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +18 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +5 -19
- package/dist/typeshed-fallback/stubs/docker/docker/api/daemon.pyi +2 -1
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +268 -6
- package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +3 -7
- package/dist/typeshed-fallback/stubs/docker/docker/types/daemon.pyi +10 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/parsers/rst/states.pyi +47 -0
- package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +0 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +2 -1
- package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pytest-lazy-fixture/pytest_lazyfixture.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-crontab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +23 -11
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi +6 -0
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +8 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +11 -17
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +11 -11
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +1 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +4 -12
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +2 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +5 -8
- package/dist/typeshed-fallback/stubs/str2bool/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/str2bool/str2bool/__init__.pyi +7 -0
- package/package.json +1 -1
|
@@ -1,164 +1,180 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from _thread import _excepthook, _ExceptHookArgs
|
|
3
|
-
from _typeshed import ProfileFunction, TraceFunction
|
|
4
|
-
from collections.abc import Callable, Iterable, Mapping
|
|
5
|
-
from types import TracebackType
|
|
6
|
-
from typing import Any, TypeVar
|
|
7
|
-
|
|
8
|
-
_T = TypeVar("_T")
|
|
9
|
-
|
|
10
|
-
__all__ = [
|
|
11
|
-
"get_ident",
|
|
12
|
-
"active_count",
|
|
13
|
-
"Condition",
|
|
14
|
-
"current_thread",
|
|
15
|
-
"enumerate",
|
|
16
|
-
"main_thread",
|
|
17
|
-
"TIMEOUT_MAX",
|
|
18
|
-
"Event",
|
|
19
|
-
"Lock",
|
|
20
|
-
"RLock",
|
|
21
|
-
"Semaphore",
|
|
22
|
-
"BoundedSemaphore",
|
|
23
|
-
"Thread",
|
|
24
|
-
"Barrier",
|
|
25
|
-
"BrokenBarrierError",
|
|
26
|
-
"Timer",
|
|
27
|
-
"ThreadError",
|
|
28
|
-
"setprofile",
|
|
29
|
-
"settrace",
|
|
30
|
-
"local",
|
|
31
|
-
"stack_size",
|
|
32
|
-
"ExceptHookArgs",
|
|
33
|
-
"excepthook",
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
def active_count() -> int: ...
|
|
37
|
-
def current_thread() -> Thread: ...
|
|
38
|
-
def currentThread() -> Thread: ...
|
|
39
|
-
def get_ident() -> int: ...
|
|
40
|
-
def enumerate() -> list[Thread]: ...
|
|
41
|
-
def main_thread() -> Thread: ...
|
|
42
|
-
def settrace(func: TraceFunction) -> None: ...
|
|
43
|
-
def setprofile(func: ProfileFunction | None) -> None: ...
|
|
44
|
-
def stack_size(size: int | None = None) -> int: ...
|
|
45
|
-
|
|
46
|
-
TIMEOUT_MAX: float
|
|
47
|
-
|
|
48
|
-
class ThreadError(Exception):
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
def
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def
|
|
82
|
-
def
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def
|
|
88
|
-
|
|
89
|
-
self
|
|
90
|
-
|
|
91
|
-
def
|
|
92
|
-
def
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
def
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
class
|
|
106
|
-
def
|
|
107
|
-
def
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def
|
|
117
|
-
def
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
def
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def
|
|
125
|
-
def
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def
|
|
135
|
-
def
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
class
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
def
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
import sys
|
|
2
|
+
from _thread import _excepthook, _ExceptHookArgs
|
|
3
|
+
from _typeshed import ProfileFunction, TraceFunction
|
|
4
|
+
from collections.abc import Callable, Iterable, Mapping
|
|
5
|
+
from types import TracebackType
|
|
6
|
+
from typing import Any, TypeVar
|
|
7
|
+
|
|
8
|
+
_T = TypeVar("_T")
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"get_ident",
|
|
12
|
+
"active_count",
|
|
13
|
+
"Condition",
|
|
14
|
+
"current_thread",
|
|
15
|
+
"enumerate",
|
|
16
|
+
"main_thread",
|
|
17
|
+
"TIMEOUT_MAX",
|
|
18
|
+
"Event",
|
|
19
|
+
"Lock",
|
|
20
|
+
"RLock",
|
|
21
|
+
"Semaphore",
|
|
22
|
+
"BoundedSemaphore",
|
|
23
|
+
"Thread",
|
|
24
|
+
"Barrier",
|
|
25
|
+
"BrokenBarrierError",
|
|
26
|
+
"Timer",
|
|
27
|
+
"ThreadError",
|
|
28
|
+
"setprofile",
|
|
29
|
+
"settrace",
|
|
30
|
+
"local",
|
|
31
|
+
"stack_size",
|
|
32
|
+
"ExceptHookArgs",
|
|
33
|
+
"excepthook",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
def active_count() -> int: ...
|
|
37
|
+
def current_thread() -> Thread: ...
|
|
38
|
+
def currentThread() -> Thread: ...
|
|
39
|
+
def get_ident() -> int: ...
|
|
40
|
+
def enumerate() -> list[Thread]: ...
|
|
41
|
+
def main_thread() -> Thread: ...
|
|
42
|
+
def settrace(func: TraceFunction) -> None: ...
|
|
43
|
+
def setprofile(func: ProfileFunction | None) -> None: ...
|
|
44
|
+
def stack_size(size: int | None = None) -> int: ...
|
|
45
|
+
|
|
46
|
+
TIMEOUT_MAX: float
|
|
47
|
+
|
|
48
|
+
class ThreadError(Exception):
|
|
49
|
+
"""Unspecified run-time error."""
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
class local:
|
|
53
|
+
def __getattribute__(self, name: str) -> Any: ...
|
|
54
|
+
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
55
|
+
def __delattr__(self, name: str) -> None: ...
|
|
56
|
+
|
|
57
|
+
class Thread:
|
|
58
|
+
name: str
|
|
59
|
+
daemon: bool
|
|
60
|
+
@property
|
|
61
|
+
def ident(self) -> int | None:
|
|
62
|
+
"""
|
|
63
|
+
Thread identifier of this thread or None if it has not been started.
|
|
64
|
+
|
|
65
|
+
This is a nonzero integer. See the get_ident() function. Thread
|
|
66
|
+
identifiers may be recycled when a thread exits and another thread is
|
|
67
|
+
created. The identifier is available even after the thread has exited.
|
|
68
|
+
"""
|
|
69
|
+
...
|
|
70
|
+
def __init__(
|
|
71
|
+
self,
|
|
72
|
+
group: None = None,
|
|
73
|
+
target: Callable[..., object] | None = None,
|
|
74
|
+
name: str | None = None,
|
|
75
|
+
args: Iterable[Any] = (),
|
|
76
|
+
kwargs: Mapping[str, Any] | None = None,
|
|
77
|
+
*,
|
|
78
|
+
daemon: bool | None = None,
|
|
79
|
+
) -> None: ...
|
|
80
|
+
def start(self) -> None: ...
|
|
81
|
+
def run(self) -> None: ...
|
|
82
|
+
def join(self, timeout: float | None = None) -> None: ...
|
|
83
|
+
def getName(self) -> str: ...
|
|
84
|
+
def setName(self, name: str) -> None: ...
|
|
85
|
+
@property
|
|
86
|
+
def native_id(self) -> int | None: ... # only available on some platforms
|
|
87
|
+
def is_alive(self) -> bool: ...
|
|
88
|
+
if sys.version_info < (3, 9):
|
|
89
|
+
def isAlive(self) -> bool: ...
|
|
90
|
+
|
|
91
|
+
def isDaemon(self) -> bool: ...
|
|
92
|
+
def setDaemon(self, daemonic: bool) -> None: ...
|
|
93
|
+
|
|
94
|
+
class _DummyThread(Thread): ...
|
|
95
|
+
|
|
96
|
+
class Lock:
|
|
97
|
+
def __enter__(self) -> bool: ...
|
|
98
|
+
def __exit__(
|
|
99
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
100
|
+
) -> bool | None: ...
|
|
101
|
+
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
|
102
|
+
def release(self) -> None: ...
|
|
103
|
+
def locked(self) -> bool: ...
|
|
104
|
+
|
|
105
|
+
class _RLock:
|
|
106
|
+
def __enter__(self) -> bool: ...
|
|
107
|
+
def __exit__(
|
|
108
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
109
|
+
) -> bool | None: ...
|
|
110
|
+
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
|
111
|
+
def release(self) -> None: ...
|
|
112
|
+
|
|
113
|
+
RLock = _RLock
|
|
114
|
+
|
|
115
|
+
class Condition:
|
|
116
|
+
def __init__(self, lock: Lock | _RLock | None = None) -> None: ...
|
|
117
|
+
def __enter__(self) -> bool: ...
|
|
118
|
+
def __exit__(
|
|
119
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
120
|
+
) -> bool | None: ...
|
|
121
|
+
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
|
122
|
+
def release(self) -> None: ...
|
|
123
|
+
def wait(self, timeout: float | None = None) -> bool: ...
|
|
124
|
+
def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ...
|
|
125
|
+
def notify(self, n: int = 1) -> None: ...
|
|
126
|
+
def notify_all(self) -> None: ...
|
|
127
|
+
def notifyAll(self) -> None: ...
|
|
128
|
+
|
|
129
|
+
class Semaphore:
|
|
130
|
+
def __init__(self, value: int = 1) -> None: ...
|
|
131
|
+
def __exit__(
|
|
132
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
133
|
+
) -> bool | None: ...
|
|
134
|
+
def acquire(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
|
135
|
+
def __enter__(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
|
136
|
+
if sys.version_info >= (3, 9):
|
|
137
|
+
def release(self, n: int = ...) -> None: ...
|
|
138
|
+
else:
|
|
139
|
+
def release(self) -> None: ...
|
|
140
|
+
|
|
141
|
+
class BoundedSemaphore(Semaphore): ...
|
|
142
|
+
|
|
143
|
+
class Event:
|
|
144
|
+
def is_set(self) -> bool: ...
|
|
145
|
+
def set(self) -> None: ...
|
|
146
|
+
def clear(self) -> None: ...
|
|
147
|
+
def wait(self, timeout: float | None = None) -> bool: ...
|
|
148
|
+
|
|
149
|
+
excepthook = _excepthook
|
|
150
|
+
ExceptHookArgs = _ExceptHookArgs
|
|
151
|
+
|
|
152
|
+
class Timer(Thread):
|
|
153
|
+
def __init__(
|
|
154
|
+
self,
|
|
155
|
+
interval: float,
|
|
156
|
+
function: Callable[..., object],
|
|
157
|
+
args: Iterable[Any] | None = None,
|
|
158
|
+
kwargs: Mapping[str, Any] | None = None,
|
|
159
|
+
) -> None: ...
|
|
160
|
+
def cancel(self) -> None: ...
|
|
161
|
+
|
|
162
|
+
class Barrier:
|
|
163
|
+
@property
|
|
164
|
+
def parties(self) -> int:
|
|
165
|
+
"""Return the number of threads required to trip the barrier."""
|
|
166
|
+
...
|
|
167
|
+
@property
|
|
168
|
+
def n_waiting(self) -> int:
|
|
169
|
+
"""Return the number of threads currently waiting at the barrier."""
|
|
170
|
+
...
|
|
171
|
+
@property
|
|
172
|
+
def broken(self) -> bool:
|
|
173
|
+
"""Return True if the barrier is in a broken state."""
|
|
174
|
+
...
|
|
175
|
+
def __init__(self, parties: int, action: Callable[[], None] | None = None, timeout: float | None = None) -> None: ...
|
|
176
|
+
def wait(self, timeout: float | None = None) -> int: ...
|
|
177
|
+
def reset(self) -> None: ...
|
|
178
|
+
def abort(self) -> None: ...
|
|
179
|
+
|
|
180
|
+
class BrokenBarrierError(RuntimeError): ...
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Heap queue algorithm (a.k.a. priority queue).
|
|
3
|
-
|
|
4
|
-
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
|
|
5
|
-
all k, counting elements from 0. For the sake of comparison,
|
|
6
|
-
non-existing elements are considered to be infinite. The interesting
|
|
7
|
-
property of a heap is that a[0] is always its smallest element.
|
|
8
|
-
|
|
9
|
-
Usage:
|
|
10
|
-
|
|
11
|
-
heap = [] # creates an empty heap
|
|
12
|
-
heappush(heap, item) # pushes a new item on the heap
|
|
13
|
-
item = heappop(heap) # pops the smallest item from the heap
|
|
14
|
-
item = heap[0] # smallest item on the heap without popping it
|
|
15
|
-
heapify(x) # transforms list into a heap, in-place, in linear time
|
|
16
|
-
item = heapreplace(heap, item) # pops and returns smallest item, and adds
|
|
17
|
-
# new item; the heap size is unchanged
|
|
18
|
-
|
|
19
|
-
Our API differs from textbook heap algorithms as follows:
|
|
20
|
-
|
|
21
|
-
- We use 0-based indexing. This makes the relationship between the
|
|
22
|
-
index for a node and the indexes for its children slightly less
|
|
23
|
-
obvious, but is more suitable since Python uses 0-based indexing.
|
|
24
|
-
|
|
25
|
-
- Our heappop() method returns the smallest item, not the largest.
|
|
26
|
-
|
|
27
|
-
These two make it possible to view the heap as a regular Python list
|
|
28
|
-
without surprises: heap[0] is the smallest item, and heap.sort()
|
|
29
|
-
maintains the heap invariant!
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
from typing import Any, Final, TypeVar
|
|
33
|
-
|
|
34
|
-
_T = TypeVar("_T")
|
|
35
|
-
|
|
36
|
-
__about__: Final[str]
|
|
37
|
-
|
|
38
|
-
def heapify(heap: list[Any], /) -> None:
|
|
39
|
-
"""Transform list into a heap, in-place, in O(len(heap)) time."""
|
|
40
|
-
...
|
|
41
|
-
def heappop(heap: list[_T], /) -> _T:
|
|
42
|
-
"""Pop the smallest item off the heap, maintaining the heap invariant."""
|
|
43
|
-
...
|
|
44
|
-
def heappush(heap: list[_T], item: _T, /) -> None:
|
|
45
|
-
"""Push item onto heap, maintaining the heap invariant."""
|
|
46
|
-
...
|
|
47
|
-
def heappushpop(heap: list[_T], item: _T, /) -> _T:
|
|
48
|
-
"""
|
|
49
|
-
Push item on the heap, then pop and return the smallest item from the heap.
|
|
50
|
-
|
|
51
|
-
The combined action runs more efficiently than heappush() followed by
|
|
52
|
-
a separate call to heappop().
|
|
53
|
-
"""
|
|
54
|
-
...
|
|
55
|
-
def heapreplace(heap: list[_T], item: _T, /) -> _T:
|
|
56
|
-
"""
|
|
57
|
-
Pop and return the current smallest value, and add the new item.
|
|
58
|
-
|
|
59
|
-
This is more efficient than heappop() followed by heappush(), and can be
|
|
60
|
-
more appropriate when using a fixed-size heap. Note that the value
|
|
61
|
-
returned may be larger than item! That constrains reasonable uses of
|
|
62
|
-
this routine unless written as part of a conditional replacement:
|
|
63
|
-
|
|
64
|
-
if item > heap[0]:
|
|
65
|
-
item = heapreplace(heap, item)
|
|
66
|
-
"""
|
|
67
|
-
...
|
|
1
|
+
"""
|
|
2
|
+
Heap queue algorithm (a.k.a. priority queue).
|
|
3
|
+
|
|
4
|
+
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
|
|
5
|
+
all k, counting elements from 0. For the sake of comparison,
|
|
6
|
+
non-existing elements are considered to be infinite. The interesting
|
|
7
|
+
property of a heap is that a[0] is always its smallest element.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
|
|
11
|
+
heap = [] # creates an empty heap
|
|
12
|
+
heappush(heap, item) # pushes a new item on the heap
|
|
13
|
+
item = heappop(heap) # pops the smallest item from the heap
|
|
14
|
+
item = heap[0] # smallest item on the heap without popping it
|
|
15
|
+
heapify(x) # transforms list into a heap, in-place, in linear time
|
|
16
|
+
item = heapreplace(heap, item) # pops and returns smallest item, and adds
|
|
17
|
+
# new item; the heap size is unchanged
|
|
18
|
+
|
|
19
|
+
Our API differs from textbook heap algorithms as follows:
|
|
20
|
+
|
|
21
|
+
- We use 0-based indexing. This makes the relationship between the
|
|
22
|
+
index for a node and the indexes for its children slightly less
|
|
23
|
+
obvious, but is more suitable since Python uses 0-based indexing.
|
|
24
|
+
|
|
25
|
+
- Our heappop() method returns the smallest item, not the largest.
|
|
26
|
+
|
|
27
|
+
These two make it possible to view the heap as a regular Python list
|
|
28
|
+
without surprises: heap[0] is the smallest item, and heap.sort()
|
|
29
|
+
maintains the heap invariant!
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
from typing import Any, Final, TypeVar
|
|
33
|
+
|
|
34
|
+
_T = TypeVar("_T")
|
|
35
|
+
|
|
36
|
+
__about__: Final[str]
|
|
37
|
+
|
|
38
|
+
def heapify(heap: list[Any], /) -> None:
|
|
39
|
+
"""Transform list into a heap, in-place, in O(len(heap)) time."""
|
|
40
|
+
...
|
|
41
|
+
def heappop(heap: list[_T], /) -> _T:
|
|
42
|
+
"""Pop the smallest item off the heap, maintaining the heap invariant."""
|
|
43
|
+
...
|
|
44
|
+
def heappush(heap: list[_T], item: _T, /) -> None:
|
|
45
|
+
"""Push item onto heap, maintaining the heap invariant."""
|
|
46
|
+
...
|
|
47
|
+
def heappushpop(heap: list[_T], item: _T, /) -> _T:
|
|
48
|
+
"""
|
|
49
|
+
Push item on the heap, then pop and return the smallest item from the heap.
|
|
50
|
+
|
|
51
|
+
The combined action runs more efficiently than heappush() followed by
|
|
52
|
+
a separate call to heappop().
|
|
53
|
+
"""
|
|
54
|
+
...
|
|
55
|
+
def heapreplace(heap: list[_T], item: _T, /) -> _T:
|
|
56
|
+
"""
|
|
57
|
+
Pop and return the current smallest value, and add the new item.
|
|
58
|
+
|
|
59
|
+
This is more efficient than heappop() followed by heappush(), and can be
|
|
60
|
+
more appropriate when using a fixed-size heap. Note that the value
|
|
61
|
+
returned may be larger than item! That constrains reasonable uses of
|
|
62
|
+
this routine unless written as part of a conditional replacement:
|
|
63
|
+
|
|
64
|
+
if item > heap[0]:
|
|
65
|
+
item = heapreplace(heap, item)
|
|
66
|
+
"""
|
|
67
|
+
...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from typing import Any, SupportsIndex
|
|
2
|
+
|
|
3
|
+
class QueueError(RuntimeError): ...
|
|
4
|
+
class QueueNotFoundError(QueueError): ...
|
|
5
|
+
|
|
6
|
+
def bind(qid: SupportsIndex) -> None: ...
|
|
7
|
+
def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ...
|
|
8
|
+
def destroy(qid: SupportsIndex) -> None: ...
|
|
9
|
+
def get(qid: SupportsIndex) -> tuple[Any, int]: ...
|
|
10
|
+
def get_count(qid: SupportsIndex) -> int: ...
|
|
11
|
+
def get_maxsize(qid: SupportsIndex) -> int: ...
|
|
12
|
+
def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ...
|
|
13
|
+
def is_full(qid: SupportsIndex) -> bool: ...
|
|
14
|
+
def list_all() -> list[tuple[int, int]]: ...
|
|
15
|
+
def put(qid: SupportsIndex, obj: Any, fmt: SupportsIndex) -> None: ...
|
|
16
|
+
def release(qid: SupportsIndex) -> None: ...
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import types
|
|
2
|
+
from collections.abc import Callable, Mapping
|
|
3
|
+
from typing import Final, Literal, SupportsIndex
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
_Configs: TypeAlias = Literal["default", "isolated", "legacy", "empty", ""]
|
|
7
|
+
|
|
8
|
+
class InterpreterError(Exception): ...
|
|
9
|
+
class InterpreterNotFoundError(InterpreterError): ...
|
|
10
|
+
class NotShareableError(Exception): ...
|
|
11
|
+
|
|
12
|
+
class CrossInterpreterBufferView:
|
|
13
|
+
def __buffer__(self, flags: int, /) -> memoryview: ...
|
|
14
|
+
|
|
15
|
+
def new_config(name: _Configs = "isolated", /, **overides: object) -> types.SimpleNamespace: ...
|
|
16
|
+
def create(config: types.SimpleNamespace | _Configs | None = "isolated", *, reqrefs: bool = False) -> int: ...
|
|
17
|
+
def destroy(id: SupportsIndex, *, restrict: bool = False) -> None: ...
|
|
18
|
+
def list_all(*, require_ready: bool) -> list[tuple[int, int]]: ...
|
|
19
|
+
def get_current() -> tuple[int, int]: ...
|
|
20
|
+
def get_main() -> tuple[int, int]: ...
|
|
21
|
+
def is_running(id: SupportsIndex, *, restrict: bool = False) -> bool: ...
|
|
22
|
+
def get_config(id: SupportsIndex, *, restrict: bool = False) -> types.SimpleNamespace: ...
|
|
23
|
+
def whence(id: SupportsIndex) -> int: ...
|
|
24
|
+
def exec(id: SupportsIndex, code: str, shared: bool | None = None, *, restrict: bool = False) -> None: ...
|
|
25
|
+
def call(
|
|
26
|
+
id: SupportsIndex,
|
|
27
|
+
callable: Callable[..., object],
|
|
28
|
+
args: tuple[object, ...] | None = None,
|
|
29
|
+
kwargs: dict[str, object] | None = None,
|
|
30
|
+
*,
|
|
31
|
+
restrict: bool = False,
|
|
32
|
+
) -> object: ...
|
|
33
|
+
def run_string(
|
|
34
|
+
id: SupportsIndex, script: str | types.CodeType | Callable[[], object], shared: bool | None = None, *, restrict: bool = False
|
|
35
|
+
) -> None: ...
|
|
36
|
+
def run_func(
|
|
37
|
+
id: SupportsIndex, func: types.CodeType | Callable[[], object], shared: bool | None = None, *, restrict: bool = False
|
|
38
|
+
) -> None: ...
|
|
39
|
+
def set___main___attrs(id: SupportsIndex, updates: Mapping[str, object], *, restrict: bool = False) -> None: ...
|
|
40
|
+
def incref(id: SupportsIndex, *, implieslink: bool = False, restrict: bool = False) -> None: ...
|
|
41
|
+
def decref(id: SupportsIndex, *, restrict: bool = False) -> None: ...
|
|
42
|
+
def is_shareable(obj: object) -> bool: ...
|
|
43
|
+
def capture_exception(exc: BaseException | None = None) -> types.SimpleNamespace: ...
|
|
44
|
+
|
|
45
|
+
WHENCE_UNKNOWN: Final = 0
|
|
46
|
+
WHENCE_RUNTIME: Final = 1
|
|
47
|
+
WHENCE_LEGACY_CAPI: Final = 2
|
|
48
|
+
WHENCE_CAPI: Final = 3
|
|
49
|
+
WHENCE_XI: Final = 4
|
|
50
|
+
WHENCE_STDLIB: Final = 5
|