basedpyright 1.24.0 → 1.25.0
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.LICENSE.txt +42 -0
- 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/stdlib/_asyncio.pyi +3 -25
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +4 -44
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +2 -16
- package/dist/typeshed-fallback/stdlib/_dbm.pyi +1 -13
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
- package/dist/typeshed-fallback/stdlib/_gdbm.pyi +1 -39
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +7 -28
- package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +6 -48
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_thread.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/aifc.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/array.pyi +3 -17
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +4 -23
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/audioop.pyi +43 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +5 -15
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/builtins.pyi +8 -106
- package/dist/typeshed-fallback/stdlib/cgi.pyi +118 -118
- package/dist/typeshed-fallback/stdlib/cgitb.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/chunk.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/datetime.pyi +4 -12
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
- 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 +176 -176
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
- 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 +317 -317
- 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 +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -10
- 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 +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -30
- package/dist/typeshed-fallback/stdlib/imghdr.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +7 -36
- package/dist/typeshed-fallback/stdlib/lib2to3/btm_matcher.pyi +28 -28
- package/dist/typeshed-fallback/stdlib/lib2to3/fixer_base.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/main.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/driver.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/literals.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/parse.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/token.pyi +69 -69
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.pyi +96 -96
- package/dist/typeshed-fallback/stdlib/lib2to3/pygram.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +117 -127
- package/dist/typeshed-fallback/stdlib/lib2to3/refactor.pyi +82 -82
- package/dist/typeshed-fallback/stdlib/mailcap.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/marshal.pyi +4 -52
- package/dist/typeshed-fallback/stdlib/math.pyi +2 -6
- 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/nis.pyi +4 -31
- package/dist/typeshed-fallback/stdlib/nntplib.pyi +125 -125
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
- package/dist/typeshed-fallback/stdlib/pipes.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/sndhdr.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/ssl.pyi +0 -4
- package/dist/typeshed-fallback/stdlib/sunau.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +4 -40
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/tkinter/tix.pyi +299 -299
- package/dist/typeshed-fallback/stdlib/types.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +544 -559
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +1 -6
- package/dist/typeshed-fallback/stdlib/uu.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/xdrlib.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +0 -29
- package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -10
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +3 -9
- package/package.json +1 -1
|
@@ -68,15 +68,7 @@ class Future(Awaitable[_T]):
|
|
|
68
68
|
"""
|
|
69
69
|
...
|
|
70
70
|
else:
|
|
71
|
-
def cancel(self) -> bool:
|
|
72
|
-
"""
|
|
73
|
-
Cancel the future and schedule callbacks.
|
|
74
|
-
|
|
75
|
-
If the future is already done or cancelled, return False. Otherwise,
|
|
76
|
-
change the future's state to cancelled, schedule the callbacks and
|
|
77
|
-
return True.
|
|
78
|
-
"""
|
|
79
|
-
...
|
|
71
|
+
def cancel(self) -> bool: ...
|
|
80
72
|
|
|
81
73
|
def cancelled(self) -> bool:
|
|
82
74
|
"""Return True if the future was cancelled."""
|
|
@@ -246,23 +238,9 @@ class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportIn
|
|
|
246
238
|
...
|
|
247
239
|
if sys.version_info < (3, 9):
|
|
248
240
|
@classmethod
|
|
249
|
-
def current_task(cls, loop: AbstractEventLoop | None = None) -> Task[Any] | None:
|
|
250
|
-
"""
|
|
251
|
-
Return the currently running task in an event loop or None.
|
|
252
|
-
|
|
253
|
-
By default the current task for the current event loop is returned.
|
|
254
|
-
|
|
255
|
-
None is returned when called not in the context of a Task.
|
|
256
|
-
"""
|
|
257
|
-
...
|
|
241
|
+
def current_task(cls, loop: AbstractEventLoop | None = None) -> Task[Any] | None: ...
|
|
258
242
|
@classmethod
|
|
259
|
-
def all_tasks(cls, loop: AbstractEventLoop | None = None) -> set[Task[Any]]:
|
|
260
|
-
"""
|
|
261
|
-
Return a set of all tasks for an event loop.
|
|
262
|
-
|
|
263
|
-
By default all tasks for the current event loop are returned.
|
|
264
|
-
"""
|
|
265
|
-
...
|
|
243
|
+
def all_tasks(cls, loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ...
|
|
266
244
|
if sys.version_info >= (3, 9):
|
|
267
245
|
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
268
246
|
"""See PEP 585"""
|
|
@@ -177,53 +177,13 @@ if sys.version_info >= (3, 10):
|
|
|
177
177
|
else:
|
|
178
178
|
def bisect_left(
|
|
179
179
|
a: SupportsLenAndGetItem[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
|
180
|
-
) -> int:
|
|
181
|
-
"""
|
|
182
|
-
Return the index where to insert item x in list a, assuming a is sorted.
|
|
183
|
-
|
|
184
|
-
The return value i is such that all e in a[:i] have e < x, and all e in
|
|
185
|
-
a[i:] have e >= x. So if x already appears in the list, i points just
|
|
186
|
-
before the leftmost x already there.
|
|
187
|
-
|
|
188
|
-
Optional args lo (default 0) and hi (default len(a)) bound the
|
|
189
|
-
slice of a to be searched.
|
|
190
|
-
"""
|
|
191
|
-
...
|
|
180
|
+
) -> int: ...
|
|
192
181
|
def bisect_right(
|
|
193
182
|
a: SupportsLenAndGetItem[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
|
194
|
-
) -> int:
|
|
195
|
-
"""
|
|
196
|
-
Return the index where to insert item x in list a, assuming a is sorted.
|
|
197
|
-
|
|
198
|
-
The return value i is such that all e in a[:i] have e <= x, and all e in
|
|
199
|
-
a[i:] have e > x. So if x already appears in the list, i points just
|
|
200
|
-
beyond the rightmost x already there
|
|
201
|
-
|
|
202
|
-
Optional args lo (default 0) and hi (default len(a)) bound the
|
|
203
|
-
slice of a to be searched.
|
|
204
|
-
"""
|
|
205
|
-
...
|
|
183
|
+
) -> int: ...
|
|
206
184
|
def insort_left(
|
|
207
185
|
a: MutableSequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
|
208
|
-
) -> None:
|
|
209
|
-
"""
|
|
210
|
-
Insert item x in list a, and keep it sorted assuming a is sorted.
|
|
211
|
-
|
|
212
|
-
If x is already in a, insert it to the left of the leftmost x.
|
|
213
|
-
|
|
214
|
-
Optional args lo (default 0) and hi (default len(a)) bound the
|
|
215
|
-
slice of a to be searched.
|
|
216
|
-
"""
|
|
217
|
-
...
|
|
186
|
+
) -> None: ...
|
|
218
187
|
def insort_right(
|
|
219
188
|
a: MutableSequence[SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, hi: int | None = None
|
|
220
|
-
) -> None:
|
|
221
|
-
"""
|
|
222
|
-
Insert item x in list a, and keep it sorted assuming a is sorted.
|
|
223
|
-
|
|
224
|
-
If x is already in a, insert it to the right of the rightmost x.
|
|
225
|
-
|
|
226
|
-
Optional args lo (default 0) and hi (default len(a)) bound the
|
|
227
|
-
slice of a to be searched.
|
|
228
|
-
"""
|
|
229
|
-
...
|
|
189
|
+
) -> None: ...
|
|
@@ -1 +1 @@
|
|
|
1
|
-
def getpreferredencoding(do_setlocale: bool = True) -> str: ...
|
|
1
|
+
def getpreferredencoding(do_setlocale: bool = True) -> str: ...
|
|
@@ -99,22 +99,8 @@ if sys.version_info >= (3, 10):
|
|
|
99
99
|
"""
|
|
100
100
|
...
|
|
101
101
|
else:
|
|
102
|
-
def writerow(self, row: Iterable[Any]) -> Any:
|
|
103
|
-
|
|
104
|
-
writerow(iterable)
|
|
105
|
-
|
|
106
|
-
Construct and write a CSV record from an iterable of fields. Non-string
|
|
107
|
-
elements will be converted to string.
|
|
108
|
-
"""
|
|
109
|
-
...
|
|
110
|
-
def writerows(self, rows: Iterable[Iterable[Any]]) -> None:
|
|
111
|
-
"""
|
|
112
|
-
writerows(iterable of iterables)
|
|
113
|
-
|
|
114
|
-
Construct and write a series of iterables to a csv file. Non-string
|
|
115
|
-
elements will be converted to string.
|
|
116
|
-
"""
|
|
117
|
-
...
|
|
102
|
+
def writerow(self, row: Iterable[Any]) -> Any: ...
|
|
103
|
+
def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ...
|
|
118
104
|
|
|
119
105
|
# For the return types below.
|
|
120
106
|
# These aliases can be removed when typeshed drops support for 3.9.
|
|
@@ -53,16 +53,4 @@ if sys.platform != "win32":
|
|
|
53
53
|
"""
|
|
54
54
|
...
|
|
55
55
|
else:
|
|
56
|
-
def open(filename: str, flags: str = "r", mode: int = 0o666, /) -> _dbm:
|
|
57
|
-
"""
|
|
58
|
-
Return a database object.
|
|
59
|
-
|
|
60
|
-
filename
|
|
61
|
-
The filename to open.
|
|
62
|
-
flags
|
|
63
|
-
How to open the file. "r" for reading, "w" for writing, etc.
|
|
64
|
-
mode
|
|
65
|
-
If creating a new file, the mode bits for the new file
|
|
66
|
-
(e.g. os.O_RDWR).
|
|
67
|
-
"""
|
|
68
|
-
...
|
|
56
|
+
def open(filename: str, flags: str = "r", mode: int = 0o666, /) -> _dbm: ...
|
|
@@ -73,14 +73,7 @@ if sys.version_info >= (3, 11):
|
|
|
73
73
|
...
|
|
74
74
|
|
|
75
75
|
else:
|
|
76
|
-
def localcontext(ctx: Context | None = None) -> _ContextManager:
|
|
77
|
-
"""
|
|
78
|
-
Return a context manager that will set the default context to a copy of ctx
|
|
79
|
-
on entry to the with-statement and restore the previous default context when
|
|
80
|
-
exiting the with-statement. If no context is specified, a copy of the current
|
|
81
|
-
default context is used.
|
|
82
|
-
"""
|
|
83
|
-
...
|
|
76
|
+
def localcontext(ctx: Context | None = None) -> _ContextManager: ...
|
|
84
77
|
|
|
85
78
|
DefaultContext: Context
|
|
86
79
|
BasicContext: Context
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
from collections.abc import Callable
|
|
2
|
-
from types import TracebackType
|
|
3
|
-
from typing import Any, NoReturn, overload
|
|
4
|
-
from typing_extensions import TypeVarTuple, Unpack
|
|
5
|
-
|
|
6
|
-
__all__ = ["error", "start_new_thread", "exit", "get_ident", "allocate_lock", "interrupt_main", "LockType", "RLock"]
|
|
7
|
-
|
|
8
|
-
_Ts = TypeVarTuple("_Ts")
|
|
9
|
-
|
|
10
|
-
TIMEOUT_MAX: int
|
|
11
|
-
error = RuntimeError
|
|
12
|
-
|
|
13
|
-
@overload
|
|
14
|
-
def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]]) -> None: ...
|
|
15
|
-
@overload
|
|
16
|
-
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any]) -> None: ...
|
|
17
|
-
def exit() -> NoReturn: ...
|
|
18
|
-
def get_ident() -> int: ...
|
|
19
|
-
def allocate_lock() -> LockType: ...
|
|
20
|
-
def stack_size(size: int | None = None) -> int: ...
|
|
21
|
-
|
|
22
|
-
class LockType:
|
|
23
|
-
locked_status: bool
|
|
24
|
-
def acquire(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
|
|
25
|
-
def __enter__(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
|
|
26
|
-
def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ...
|
|
27
|
-
def release(self) -> bool: ...
|
|
28
|
-
def locked(self) -> bool: ...
|
|
29
|
-
|
|
30
|
-
class RLock(LockType):
|
|
31
|
-
def release(self) -> None: ... # type: ignore[override]
|
|
32
|
-
|
|
33
|
-
def interrupt_main() -> None: ...
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from types import TracebackType
|
|
3
|
+
from typing import Any, NoReturn, overload
|
|
4
|
+
from typing_extensions import TypeVarTuple, Unpack
|
|
5
|
+
|
|
6
|
+
__all__ = ["error", "start_new_thread", "exit", "get_ident", "allocate_lock", "interrupt_main", "LockType", "RLock"]
|
|
7
|
+
|
|
8
|
+
_Ts = TypeVarTuple("_Ts")
|
|
9
|
+
|
|
10
|
+
TIMEOUT_MAX: int
|
|
11
|
+
error = RuntimeError
|
|
12
|
+
|
|
13
|
+
@overload
|
|
14
|
+
def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]]) -> None: ...
|
|
15
|
+
@overload
|
|
16
|
+
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any]) -> None: ...
|
|
17
|
+
def exit() -> NoReturn: ...
|
|
18
|
+
def get_ident() -> int: ...
|
|
19
|
+
def allocate_lock() -> LockType: ...
|
|
20
|
+
def stack_size(size: int | None = None) -> int: ...
|
|
21
|
+
|
|
22
|
+
class LockType:
|
|
23
|
+
locked_status: bool
|
|
24
|
+
def acquire(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
|
|
25
|
+
def __enter__(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
|
|
26
|
+
def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ...
|
|
27
|
+
def release(self) -> bool: ...
|
|
28
|
+
def locked(self) -> bool: ...
|
|
29
|
+
|
|
30
|
+
class RLock(LockType):
|
|
31
|
+
def release(self) -> None: ... # type: ignore[override]
|
|
32
|
+
|
|
33
|
+
def interrupt_main() -> None: ...
|
|
@@ -1,180 +1,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
|
-
|
|
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
|
-
|
|
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
|
-
) -> None: ...
|
|
160
|
-
def
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
+
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
|
+
class local:
|
|
51
|
+
def __getattribute__(self, name: str) -> Any: ...
|
|
52
|
+
def __setattr__(self, name: str, value: Any) -> None: ...
|
|
53
|
+
def __delattr__(self, name: str) -> None: ...
|
|
54
|
+
|
|
55
|
+
class Thread:
|
|
56
|
+
name: str
|
|
57
|
+
daemon: bool
|
|
58
|
+
@property
|
|
59
|
+
def ident(self) -> int | None: ...
|
|
60
|
+
def __init__(
|
|
61
|
+
self,
|
|
62
|
+
group: None = None,
|
|
63
|
+
target: Callable[..., object] | None = None,
|
|
64
|
+
name: str | None = None,
|
|
65
|
+
args: Iterable[Any] = (),
|
|
66
|
+
kwargs: Mapping[str, Any] | None = None,
|
|
67
|
+
*,
|
|
68
|
+
daemon: bool | None = None,
|
|
69
|
+
) -> None: ...
|
|
70
|
+
def start(self) -> None: ...
|
|
71
|
+
def run(self) -> None: ...
|
|
72
|
+
def join(self, timeout: float | None = None) -> None: ...
|
|
73
|
+
def getName(self) -> str: ...
|
|
74
|
+
def setName(self, name: str) -> None: ...
|
|
75
|
+
@property
|
|
76
|
+
def native_id(self) -> int | None: ... # only available on some platforms
|
|
77
|
+
def is_alive(self) -> bool: ...
|
|
78
|
+
if sys.version_info < (3, 9):
|
|
79
|
+
def isAlive(self) -> bool: ...
|
|
80
|
+
|
|
81
|
+
def isDaemon(self) -> bool: ...
|
|
82
|
+
def setDaemon(self, daemonic: bool) -> None: ...
|
|
83
|
+
|
|
84
|
+
class _DummyThread(Thread): ...
|
|
85
|
+
|
|
86
|
+
class Lock:
|
|
87
|
+
def __enter__(self) -> bool: ...
|
|
88
|
+
def __exit__(
|
|
89
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
90
|
+
) -> bool | None: ...
|
|
91
|
+
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
|
92
|
+
def release(self) -> None: ...
|
|
93
|
+
def locked(self) -> bool: ...
|
|
94
|
+
|
|
95
|
+
class _RLock:
|
|
96
|
+
def __enter__(self) -> bool: ...
|
|
97
|
+
def __exit__(
|
|
98
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
99
|
+
) -> bool | None: ...
|
|
100
|
+
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
|
101
|
+
def release(self) -> None: ...
|
|
102
|
+
|
|
103
|
+
RLock = _RLock
|
|
104
|
+
|
|
105
|
+
class Condition:
|
|
106
|
+
def __init__(self, lock: Lock | _RLock | None = None) -> None: ...
|
|
107
|
+
def __enter__(self) -> bool: ...
|
|
108
|
+
def __exit__(
|
|
109
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
110
|
+
) -> bool | None: ...
|
|
111
|
+
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
|
|
112
|
+
def release(self) -> None: ...
|
|
113
|
+
def wait(self, timeout: float | None = None) -> bool: ...
|
|
114
|
+
def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ...
|
|
115
|
+
def notify(self, n: int = 1) -> None: ...
|
|
116
|
+
def notify_all(self) -> None: ...
|
|
117
|
+
def notifyAll(self) -> None: ...
|
|
118
|
+
|
|
119
|
+
class Semaphore:
|
|
120
|
+
def __init__(self, value: int = 1) -> None: ...
|
|
121
|
+
def __exit__(
|
|
122
|
+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
123
|
+
) -> bool | None: ...
|
|
124
|
+
def acquire(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
|
125
|
+
def __enter__(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
|
126
|
+
if sys.version_info >= (3, 9):
|
|
127
|
+
def release(self, n: int = ...) -> None: ...
|
|
128
|
+
else:
|
|
129
|
+
def release(self) -> None: ...
|
|
130
|
+
|
|
131
|
+
class BoundedSemaphore(Semaphore): ...
|
|
132
|
+
|
|
133
|
+
class Event:
|
|
134
|
+
def is_set(self) -> bool: ...
|
|
135
|
+
def set(self) -> None: ...
|
|
136
|
+
def clear(self) -> None: ...
|
|
137
|
+
def wait(self, timeout: float | None = None) -> bool: ...
|
|
138
|
+
|
|
139
|
+
excepthook = _excepthook
|
|
140
|
+
ExceptHookArgs = _ExceptHookArgs
|
|
141
|
+
|
|
142
|
+
class Timer(Thread):
|
|
143
|
+
def __init__(
|
|
144
|
+
self,
|
|
145
|
+
interval: float,
|
|
146
|
+
function: Callable[..., object],
|
|
147
|
+
args: Iterable[Any] | None = None,
|
|
148
|
+
kwargs: Mapping[str, Any] | None = None,
|
|
149
|
+
) -> None: ...
|
|
150
|
+
def cancel(self) -> None: ...
|
|
151
|
+
|
|
152
|
+
class Barrier:
|
|
153
|
+
@property
|
|
154
|
+
def parties(self) -> int: ...
|
|
155
|
+
@property
|
|
156
|
+
def n_waiting(self) -> int: ...
|
|
157
|
+
@property
|
|
158
|
+
def broken(self) -> bool: ...
|
|
159
|
+
def __init__(self, parties: int, action: Callable[[], None] | None = None, timeout: float | None = None) -> None: ...
|
|
160
|
+
def wait(self, timeout: float | None = None) -> int: ...
|
|
161
|
+
def reset(self) -> None: ...
|
|
162
|
+
def abort(self) -> None: ...
|
|
163
|
+
|
|
164
|
+
class BrokenBarrierError(RuntimeError): ...
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This module provides an interface to the GNU DBM (GDBM) library.
|
|
3
|
-
|
|
4
|
-
This module is quite similar to the dbm module, but uses GDBM instead to
|
|
5
|
-
provide some additional functionality. Please note that the file formats
|
|
6
|
-
created by GDBM and dbm are incompatible.
|
|
7
|
-
|
|
8
|
-
GDBM objects behave like mappings (dictionaries), except that keys and
|
|
9
|
-
values are always immutable bytes-like objects or strings. Printing
|
|
10
|
-
a GDBM object doesn't print the keys and values, and the items() and
|
|
11
|
-
values() methods are not supported.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
1
|
import sys
|
|
15
2
|
from _typeshed import ReadOnlyBuffer, StrOrBytesPath
|
|
16
3
|
from types import TracebackType
|
|
@@ -55,31 +42,6 @@ if sys.platform != "win32":
|
|
|
55
42
|
__init__: None # type: ignore[assignment]
|
|
56
43
|
|
|
57
44
|
if sys.version_info >= (3, 11):
|
|
58
|
-
def open(filename: StrOrBytesPath, flags: str = "r", mode: int = 0o666, /) -> _gdbm:
|
|
59
|
-
"""
|
|
60
|
-
Open a dbm database and return a dbm object.
|
|
61
|
-
|
|
62
|
-
The filename argument is the name of the database file.
|
|
63
|
-
|
|
64
|
-
The optional flags argument can be 'r' (to open an existing database
|
|
65
|
-
for reading only -- default), 'w' (to open an existing database for
|
|
66
|
-
reading and writing), 'c' (which creates the database if it doesn't
|
|
67
|
-
exist), or 'n' (which always creates a new empty database).
|
|
68
|
-
|
|
69
|
-
Some versions of gdbm support additional flags which must be
|
|
70
|
-
appended to one of the flags described above. The module constant
|
|
71
|
-
'open_flags' is a string of valid additional flags. The 'f' flag
|
|
72
|
-
opens the database in fast mode; altered data will not automatically
|
|
73
|
-
be written to the disk after every change. This results in faster
|
|
74
|
-
writes to the database, but may result in an inconsistent database
|
|
75
|
-
if the program crashes while the database is still open. Use the
|
|
76
|
-
sync() method to force any unwritten data to be written to the disk.
|
|
77
|
-
The 's' flag causes all database operations to be synchronized to
|
|
78
|
-
disk. The 'u' flag disables locking of the database file.
|
|
79
|
-
|
|
80
|
-
The optional mode argument is the Unix mode of the file, used only
|
|
81
|
-
when the database has to be created. It defaults to octal 0o666.
|
|
82
|
-
"""
|
|
83
|
-
...
|
|
45
|
+
def open(filename: StrOrBytesPath, flags: str = "r", mode: int = 0o666, /) -> _gdbm: ...
|
|
84
46
|
else:
|
|
85
47
|
def open(filename: str, flags: str = "r", mode: int = 0o666, /) -> _gdbm: ...
|