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
|
@@ -178,8 +178,12 @@ class TypeVar:
|
|
|
178
178
|
self, name: str, *constraints: Any, bound: Any | None = None, covariant: bool = False, contravariant: bool = False
|
|
179
179
|
) -> None: ...
|
|
180
180
|
if sys.version_info >= (3, 10):
|
|
181
|
-
def __or__(self, right: Any) -> _SpecialForm:
|
|
182
|
-
|
|
181
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
182
|
+
"""Return self|value."""
|
|
183
|
+
...
|
|
184
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
185
|
+
"""Return value|self."""
|
|
186
|
+
...
|
|
183
187
|
if sys.version_info >= (3, 11):
|
|
184
188
|
def __typing_subst__(self, arg: Any) -> Any: ...
|
|
185
189
|
if sys.version_info >= (3, 13):
|
|
@@ -235,7 +239,9 @@ if sys.version_info >= (3, 11):
|
|
|
235
239
|
else:
|
|
236
240
|
def __init__(self, name: str) -> None: ...
|
|
237
241
|
|
|
238
|
-
def __iter__(self) -> Any:
|
|
242
|
+
def __iter__(self) -> Any:
|
|
243
|
+
"""Implement iter(self)."""
|
|
244
|
+
...
|
|
239
245
|
def __typing_subst__(self, arg: Never) -> Never: ...
|
|
240
246
|
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
241
247
|
|
|
@@ -245,14 +251,18 @@ if sys.version_info >= (3, 10):
|
|
|
245
251
|
@property
|
|
246
252
|
def __origin__(self) -> ParamSpec: ...
|
|
247
253
|
def __init__(self, origin: ParamSpec) -> None: ...
|
|
248
|
-
def __eq__(self, other: object) -> bool:
|
|
254
|
+
def __eq__(self, other: object) -> bool:
|
|
255
|
+
"""Return self==value."""
|
|
256
|
+
...
|
|
249
257
|
|
|
250
258
|
@final
|
|
251
259
|
class ParamSpecKwargs:
|
|
252
260
|
@property
|
|
253
261
|
def __origin__(self) -> ParamSpec: ...
|
|
254
262
|
def __init__(self, origin: ParamSpec) -> None: ...
|
|
255
|
-
def __eq__(self, other: object) -> bool:
|
|
263
|
+
def __eq__(self, other: object) -> bool:
|
|
264
|
+
"""Return self==value."""
|
|
265
|
+
...
|
|
256
266
|
|
|
257
267
|
@final
|
|
258
268
|
class ParamSpec:
|
|
@@ -297,15 +307,23 @@ if sys.version_info >= (3, 10):
|
|
|
297
307
|
) -> None: ...
|
|
298
308
|
|
|
299
309
|
@property
|
|
300
|
-
def args(self) -> ParamSpecArgs:
|
|
310
|
+
def args(self) -> ParamSpecArgs:
|
|
311
|
+
"""Represents positional arguments."""
|
|
312
|
+
...
|
|
301
313
|
@property
|
|
302
|
-
def kwargs(self) -> ParamSpecKwargs:
|
|
314
|
+
def kwargs(self) -> ParamSpecKwargs:
|
|
315
|
+
"""Represents keyword arguments."""
|
|
316
|
+
...
|
|
303
317
|
if sys.version_info >= (3, 11):
|
|
304
318
|
def __typing_subst__(self, arg: Any) -> Any: ...
|
|
305
319
|
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
306
320
|
|
|
307
|
-
def __or__(self, right: Any) -> _SpecialForm:
|
|
308
|
-
|
|
321
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
322
|
+
"""Return self|value."""
|
|
323
|
+
...
|
|
324
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
325
|
+
"""Return value|self."""
|
|
326
|
+
...
|
|
309
327
|
if sys.version_info >= (3, 13):
|
|
310
328
|
def has_default(self) -> bool: ...
|
|
311
329
|
|
|
@@ -419,30 +437,77 @@ class SupportsRound(Protocol[_T_co]):
|
|
|
419
437
|
|
|
420
438
|
@runtime_checkable
|
|
421
439
|
class Sized(Protocol, metaclass=ABCMeta):
|
|
440
|
+
"""
|
|
441
|
+
The central part of internal API.
|
|
442
|
+
|
|
443
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
444
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
445
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
446
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
447
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
448
|
+
"""
|
|
422
449
|
@abstractmethod
|
|
423
450
|
def __len__(self) -> int: ...
|
|
424
451
|
|
|
425
452
|
@runtime_checkable
|
|
426
453
|
class Hashable(Protocol, metaclass=ABCMeta):
|
|
454
|
+
"""
|
|
455
|
+
The central part of internal API.
|
|
456
|
+
|
|
457
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
458
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
459
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
460
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
461
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
462
|
+
"""
|
|
427
463
|
# TODO: This is special, in that a subclass of a hashable class may not be hashable
|
|
428
464
|
# (for example, list vs. object). It's not obvious how to represent this. This class
|
|
429
465
|
# is currently mostly useless for static checking.
|
|
430
466
|
@abstractmethod
|
|
431
|
-
def __hash__(self) -> int:
|
|
467
|
+
def __hash__(self) -> int:
|
|
468
|
+
"""Return hash(self)."""
|
|
469
|
+
...
|
|
432
470
|
|
|
433
471
|
@runtime_checkable
|
|
434
472
|
class Iterable(Protocol[_T_co]):
|
|
473
|
+
"""
|
|
474
|
+
The central part of internal API.
|
|
475
|
+
|
|
476
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
477
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
478
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
479
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
480
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
481
|
+
"""
|
|
435
482
|
@abstractmethod
|
|
436
483
|
def __iter__(self) -> Iterator[_T_co]: ...
|
|
437
484
|
|
|
438
485
|
@runtime_checkable
|
|
439
486
|
class Iterator(Iterable[_T_co], Protocol[_T_co]):
|
|
487
|
+
"""
|
|
488
|
+
The central part of internal API.
|
|
489
|
+
|
|
490
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
491
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
492
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
493
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
494
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
495
|
+
"""
|
|
440
496
|
@abstractmethod
|
|
441
497
|
def __next__(self) -> _T_co: ...
|
|
442
498
|
def __iter__(self) -> Iterator[_T_co]: ...
|
|
443
499
|
|
|
444
500
|
@runtime_checkable
|
|
445
501
|
class Reversible(Iterable[_T_co], Protocol[_T_co]):
|
|
502
|
+
"""
|
|
503
|
+
The central part of internal API.
|
|
504
|
+
|
|
505
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
506
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
507
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
508
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
509
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
510
|
+
"""
|
|
446
511
|
@abstractmethod
|
|
447
512
|
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
448
513
|
|
|
@@ -451,6 +516,15 @@ _SendT_contra = TypeVar("_SendT_contra", contravariant=True, default=None)
|
|
|
451
516
|
_ReturnT_co = TypeVar("_ReturnT_co", covariant=True, default=None)
|
|
452
517
|
|
|
453
518
|
class Generator(Iterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra, _ReturnT_co]):
|
|
519
|
+
"""
|
|
520
|
+
The central part of internal API.
|
|
521
|
+
|
|
522
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
523
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
524
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
525
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
526
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
527
|
+
"""
|
|
454
528
|
def __next__(self) -> _YieldT_co: ...
|
|
455
529
|
@abstractmethod
|
|
456
530
|
def send(self, value: _SendT_contra, /) -> _YieldT_co: ...
|
|
@@ -480,13 +554,42 @@ else:
|
|
|
480
554
|
from contextlib import AbstractAsyncContextManager, AbstractContextManager
|
|
481
555
|
|
|
482
556
|
@runtime_checkable
|
|
483
|
-
class ContextManager(AbstractContextManager[_T_co, bool | None], Protocol[_T_co]):
|
|
557
|
+
class ContextManager(AbstractContextManager[_T_co, bool | None], Protocol[_T_co]):
|
|
558
|
+
"""
|
|
559
|
+
The central part of internal API.
|
|
560
|
+
|
|
561
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
562
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
563
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
564
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
565
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
566
|
+
"""
|
|
567
|
+
...
|
|
484
568
|
|
|
485
569
|
@runtime_checkable
|
|
486
|
-
class AsyncContextManager(AbstractAsyncContextManager[_T_co, bool | None], Protocol[_T_co]):
|
|
570
|
+
class AsyncContextManager(AbstractAsyncContextManager[_T_co, bool | None], Protocol[_T_co]):
|
|
571
|
+
"""
|
|
572
|
+
The central part of internal API.
|
|
573
|
+
|
|
574
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
575
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
576
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
577
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
578
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
579
|
+
"""
|
|
580
|
+
...
|
|
487
581
|
|
|
488
582
|
@runtime_checkable
|
|
489
583
|
class Awaitable(Protocol[_T_co]):
|
|
584
|
+
"""
|
|
585
|
+
The central part of internal API.
|
|
586
|
+
|
|
587
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
588
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
589
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
590
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
591
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
592
|
+
"""
|
|
490
593
|
@abstractmethod
|
|
491
594
|
def __await__(self) -> Generator[Any, Any, _T_co]: ...
|
|
492
595
|
|
|
@@ -495,6 +598,15 @@ _SendT_contra_nd = TypeVar("_SendT_contra_nd", contravariant=True)
|
|
|
495
598
|
_ReturnT_co_nd = TypeVar("_ReturnT_co_nd", covariant=True)
|
|
496
599
|
|
|
497
600
|
class Coroutine(Awaitable[_ReturnT_co_nd], Generic[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd]):
|
|
601
|
+
"""
|
|
602
|
+
The central part of internal API.
|
|
603
|
+
|
|
604
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
605
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
606
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
607
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
608
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
609
|
+
"""
|
|
498
610
|
__name__: str
|
|
499
611
|
__qualname__: str
|
|
500
612
|
@property
|
|
@@ -530,28 +642,57 @@ class AwaitableGenerator(
|
|
|
530
642
|
|
|
531
643
|
@runtime_checkable
|
|
532
644
|
class AsyncIterable(Protocol[_T_co]):
|
|
645
|
+
"""
|
|
646
|
+
The central part of internal API.
|
|
647
|
+
|
|
648
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
649
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
650
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
651
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
652
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
653
|
+
"""
|
|
533
654
|
@abstractmethod
|
|
534
655
|
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
|
535
656
|
|
|
536
657
|
@runtime_checkable
|
|
537
658
|
class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]):
|
|
659
|
+
"""
|
|
660
|
+
The central part of internal API.
|
|
661
|
+
|
|
662
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
663
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
664
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
665
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
666
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
667
|
+
"""
|
|
538
668
|
@abstractmethod
|
|
539
669
|
def __anext__(self) -> Awaitable[_T_co]: ...
|
|
540
670
|
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
|
541
671
|
|
|
542
672
|
class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra]):
|
|
673
|
+
"""
|
|
674
|
+
The central part of internal API.
|
|
675
|
+
|
|
676
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
677
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
678
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
679
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
680
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
681
|
+
"""
|
|
543
682
|
def __anext__(self) -> Awaitable[_YieldT_co]: ...
|
|
544
683
|
@abstractmethod
|
|
545
|
-
def asend(self, value: _SendT_contra, /) ->
|
|
684
|
+
def asend(self, value: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
546
685
|
@overload
|
|
547
686
|
@abstractmethod
|
|
548
687
|
def athrow(
|
|
549
688
|
self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None, /
|
|
550
|
-
) ->
|
|
689
|
+
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
551
690
|
@overload
|
|
552
691
|
@abstractmethod
|
|
553
|
-
def athrow(
|
|
554
|
-
|
|
692
|
+
def athrow(
|
|
693
|
+
self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /
|
|
694
|
+
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
695
|
+
def aclose(self) -> Coroutine[Any, Any, None]: ...
|
|
555
696
|
@property
|
|
556
697
|
def ag_await(self) -> Any: ...
|
|
557
698
|
@property
|
|
@@ -563,17 +704,44 @@ class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contr
|
|
|
563
704
|
|
|
564
705
|
@runtime_checkable
|
|
565
706
|
class Container(Protocol[_T_co]):
|
|
707
|
+
"""
|
|
708
|
+
The central part of internal API.
|
|
709
|
+
|
|
710
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
711
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
712
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
713
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
714
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
715
|
+
"""
|
|
566
716
|
# This is generic more on vibes than anything else
|
|
567
717
|
@abstractmethod
|
|
568
718
|
def __contains__(self, x: object, /) -> bool: ...
|
|
569
719
|
|
|
570
720
|
@runtime_checkable
|
|
571
721
|
class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
|
|
722
|
+
"""
|
|
723
|
+
The central part of internal API.
|
|
724
|
+
|
|
725
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
726
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
727
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
728
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
729
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
730
|
+
"""
|
|
572
731
|
# Implement Sized (but don't have it as a base class).
|
|
573
732
|
@abstractmethod
|
|
574
733
|
def __len__(self) -> int: ...
|
|
575
734
|
|
|
576
735
|
class Sequence(Collection[_T_co], Reversible[_T_co]):
|
|
736
|
+
"""
|
|
737
|
+
The central part of internal API.
|
|
738
|
+
|
|
739
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
740
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
741
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
742
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
743
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
744
|
+
"""
|
|
577
745
|
@overload
|
|
578
746
|
@abstractmethod
|
|
579
747
|
def __getitem__(self, index: int) -> _T_co: ...
|
|
@@ -588,6 +756,15 @@ class Sequence(Collection[_T_co], Reversible[_T_co]):
|
|
|
588
756
|
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
589
757
|
|
|
590
758
|
class MutableSequence(Sequence[_T]):
|
|
759
|
+
"""
|
|
760
|
+
The central part of internal API.
|
|
761
|
+
|
|
762
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
763
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
764
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
765
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
766
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
767
|
+
"""
|
|
591
768
|
@abstractmethod
|
|
592
769
|
def insert(self, index: int, value: _T) -> None: ...
|
|
593
770
|
@overload
|
|
@@ -618,22 +795,50 @@ class MutableSequence(Sequence[_T]):
|
|
|
618
795
|
def __iadd__(self, values: Iterable[_T]) -> typing_extensions.Self: ...
|
|
619
796
|
|
|
620
797
|
class AbstractSet(Collection[_T_co]):
|
|
798
|
+
"""
|
|
799
|
+
The central part of internal API.
|
|
800
|
+
|
|
801
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
802
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
803
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
804
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
805
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
806
|
+
"""
|
|
621
807
|
@abstractmethod
|
|
622
808
|
def __contains__(self, x: object) -> bool: ...
|
|
623
809
|
def _hash(self) -> int: ...
|
|
624
810
|
# Mixin methods
|
|
625
|
-
def __le__(self, other: AbstractSet[Any]) -> bool:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
def
|
|
811
|
+
def __le__(self, other: AbstractSet[Any]) -> bool:
|
|
812
|
+
"""Return self<=value."""
|
|
813
|
+
...
|
|
814
|
+
def __lt__(self, other: AbstractSet[Any]) -> bool:
|
|
815
|
+
"""Return self<value."""
|
|
816
|
+
...
|
|
817
|
+
def __gt__(self, other: AbstractSet[Any]) -> bool:
|
|
818
|
+
"""Return self>value."""
|
|
819
|
+
...
|
|
820
|
+
def __ge__(self, other: AbstractSet[Any]) -> bool:
|
|
821
|
+
"""Return self>=value."""
|
|
822
|
+
...
|
|
629
823
|
def __and__(self, other: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
|
630
824
|
def __or__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
|
631
825
|
def __sub__(self, other: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
|
632
826
|
def __xor__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
|
633
|
-
def __eq__(self, other: object) -> bool:
|
|
827
|
+
def __eq__(self, other: object) -> bool:
|
|
828
|
+
"""Return self==value."""
|
|
829
|
+
...
|
|
634
830
|
def isdisjoint(self, other: Iterable[Any]) -> bool: ...
|
|
635
831
|
|
|
636
832
|
class MutableSet(AbstractSet[_T]):
|
|
833
|
+
"""
|
|
834
|
+
The central part of internal API.
|
|
835
|
+
|
|
836
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
837
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
838
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
839
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
840
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
841
|
+
"""
|
|
637
842
|
@abstractmethod
|
|
638
843
|
def add(self, value: _T) -> None: ...
|
|
639
844
|
@abstractmethod
|
|
@@ -648,10 +853,28 @@ class MutableSet(AbstractSet[_T]):
|
|
|
648
853
|
def __isub__(self, it: AbstractSet[Any]) -> typing_extensions.Self: ...
|
|
649
854
|
|
|
650
855
|
class MappingView(Sized):
|
|
856
|
+
"""
|
|
857
|
+
The central part of internal API.
|
|
858
|
+
|
|
859
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
860
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
861
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
862
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
863
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
864
|
+
"""
|
|
651
865
|
def __init__(self, mapping: Mapping[Any, Any]) -> None: ... # undocumented
|
|
652
866
|
def __len__(self) -> int: ...
|
|
653
867
|
|
|
654
868
|
class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]):
|
|
869
|
+
"""
|
|
870
|
+
The central part of internal API.
|
|
871
|
+
|
|
872
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
873
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
874
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
875
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
876
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
877
|
+
"""
|
|
655
878
|
def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... # undocumented
|
|
656
879
|
def __and__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ...
|
|
657
880
|
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
@@ -666,6 +889,15 @@ class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co,
|
|
|
666
889
|
def __rxor__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
667
890
|
|
|
668
891
|
class KeysView(MappingView, AbstractSet[_KT_co]):
|
|
892
|
+
"""
|
|
893
|
+
The central part of internal API.
|
|
894
|
+
|
|
895
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
896
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
897
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
898
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
899
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
900
|
+
"""
|
|
669
901
|
def __init__(self, mapping: Mapping[_KT_co, Any]) -> None: ... # undocumented
|
|
670
902
|
def __and__(self, other: Iterable[Any]) -> set[_KT_co]: ...
|
|
671
903
|
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
@@ -680,12 +912,30 @@ class KeysView(MappingView, AbstractSet[_KT_co]):
|
|
|
680
912
|
def __rxor__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ...
|
|
681
913
|
|
|
682
914
|
class ValuesView(MappingView, Collection[_VT_co]):
|
|
915
|
+
"""
|
|
916
|
+
The central part of internal API.
|
|
917
|
+
|
|
918
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
919
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
920
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
921
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
922
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
923
|
+
"""
|
|
683
924
|
def __init__(self, mapping: Mapping[Any, _VT_co]) -> None: ... # undocumented
|
|
684
925
|
def __contains__(self, value: object) -> bool: ...
|
|
685
926
|
def __iter__(self) -> Iterator[_VT_co]: ...
|
|
686
927
|
def __reversed__(self) -> Iterator[_VT_co]: ...
|
|
687
928
|
|
|
688
929
|
class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
|
|
930
|
+
"""
|
|
931
|
+
The central part of internal API.
|
|
932
|
+
|
|
933
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
934
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
935
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
936
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
937
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
938
|
+
"""
|
|
689
939
|
# TODO: We wish the key type could also be covariant, but that doesn't work,
|
|
690
940
|
# see discussion in https://github.com/python/typing/pull/273.
|
|
691
941
|
@abstractmethod
|
|
@@ -699,9 +949,20 @@ class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
|
|
|
699
949
|
def keys(self) -> KeysView[_KT]: ...
|
|
700
950
|
def values(self) -> ValuesView[_VT_co]: ...
|
|
701
951
|
def __contains__(self, key: object, /) -> bool: ...
|
|
702
|
-
def __eq__(self, other: object, /) -> bool:
|
|
952
|
+
def __eq__(self, other: object, /) -> bool:
|
|
953
|
+
"""Return self==value."""
|
|
954
|
+
...
|
|
703
955
|
|
|
704
956
|
class MutableMapping(Mapping[_KT, _VT]):
|
|
957
|
+
"""
|
|
958
|
+
The central part of internal API.
|
|
959
|
+
|
|
960
|
+
This represents a generic version of type 'origin' with type arguments 'params'.
|
|
961
|
+
There are two kind of these aliases: user defined and special. The special ones
|
|
962
|
+
are wrappers around builtin collections and ABCs in collections.abc. These must
|
|
963
|
+
have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
|
|
964
|
+
this is used by e.g. typing.List and typing.Dict.
|
|
965
|
+
"""
|
|
705
966
|
@abstractmethod
|
|
706
967
|
def __setitem__(self, key: _KT, value: _VT, /) -> None: ...
|
|
707
968
|
@abstractmethod
|
|
@@ -926,12 +1187,16 @@ class NamedTuple(tuple[Any, ...]):
|
|
|
926
1187
|
__orig_bases__: ClassVar[tuple[Any, ...]]
|
|
927
1188
|
|
|
928
1189
|
@overload
|
|
929
|
-
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]], /) -> None:
|
|
1190
|
+
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]], /) -> None:
|
|
1191
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
1192
|
+
...
|
|
930
1193
|
@overload
|
|
931
1194
|
@typing_extensions.deprecated(
|
|
932
1195
|
"Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15"
|
|
933
1196
|
)
|
|
934
|
-
def __init__(self, typename: str, fields: None = None, /, **kwargs: Any) -> None:
|
|
1197
|
+
def __init__(self, typename: str, fields: None = None, /, **kwargs: Any) -> None:
|
|
1198
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
1199
|
+
...
|
|
935
1200
|
@classmethod
|
|
936
1201
|
def _make(cls, iterable: Iterable[Any]) -> typing_extensions.Self: ...
|
|
937
1202
|
def _asdict(self) -> dict[str, Any]: ...
|
|
@@ -965,13 +1230,21 @@ class _TypedDict(Mapping[str, object], metaclass=ABCMeta):
|
|
|
965
1230
|
def values(self) -> dict_values[str, object]: ...
|
|
966
1231
|
if sys.version_info >= (3, 9):
|
|
967
1232
|
@overload
|
|
968
|
-
def __or__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1233
|
+
def __or__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1234
|
+
"""Return self|value."""
|
|
1235
|
+
...
|
|
969
1236
|
@overload
|
|
970
|
-
def __or__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1237
|
+
def __or__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1238
|
+
"""Return self|value."""
|
|
1239
|
+
...
|
|
971
1240
|
@overload
|
|
972
|
-
def __ror__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1241
|
+
def __ror__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1242
|
+
"""Return value|self."""
|
|
1243
|
+
...
|
|
973
1244
|
@overload
|
|
974
|
-
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1245
|
+
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1246
|
+
"""Return value|self."""
|
|
1247
|
+
...
|
|
975
1248
|
# supposedly incompatible definitions of __or__ and __ior__
|
|
976
1249
|
def __ior__(self, value: typing_extensions.Self, /) -> typing_extensions.Self: ... # type: ignore[misc]
|
|
977
1250
|
|
|
@@ -1054,9 +1327,15 @@ if sys.version_info >= (3, 12):
|
|
|
1054
1327
|
# It's writable on types, but not on instances of TypeAliasType.
|
|
1055
1328
|
@property
|
|
1056
1329
|
def __module__(self) -> str | None: ... # type: ignore[override]
|
|
1057
|
-
def __getitem__(self, parameters: Any) -> Any:
|
|
1058
|
-
|
|
1059
|
-
|
|
1330
|
+
def __getitem__(self, parameters: Any) -> Any:
|
|
1331
|
+
"""Return self[key]."""
|
|
1332
|
+
...
|
|
1333
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
1334
|
+
"""Return self|value."""
|
|
1335
|
+
...
|
|
1336
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
1337
|
+
"""Return value|self."""
|
|
1338
|
+
...
|
|
1060
1339
|
|
|
1061
1340
|
if sys.version_info >= (3, 13):
|
|
1062
1341
|
def is_protocol(tp: type, /) -> bool: ...
|
|
@@ -243,13 +243,21 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
|
|
243
243
|
def __delitem__(self, k: Never) -> None: ...
|
|
244
244
|
if sys.version_info >= (3, 9):
|
|
245
245
|
@overload
|
|
246
|
-
def __or__(self, value: Self, /) -> Self:
|
|
246
|
+
def __or__(self, value: Self, /) -> Self:
|
|
247
|
+
"""Return self|value."""
|
|
248
|
+
...
|
|
247
249
|
@overload
|
|
248
|
-
def __or__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
250
|
+
def __or__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
251
|
+
"""Return self|value."""
|
|
252
|
+
...
|
|
249
253
|
@overload
|
|
250
|
-
def __ror__(self, value: Self, /) -> Self:
|
|
254
|
+
def __ror__(self, value: Self, /) -> Self:
|
|
255
|
+
"""Return value|self."""
|
|
256
|
+
...
|
|
251
257
|
@overload
|
|
252
|
-
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
258
|
+
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
259
|
+
"""Return value|self."""
|
|
260
|
+
...
|
|
253
261
|
# supposedly incompatible definitions of `__ior__` and `__or__`:
|
|
254
262
|
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
|
|
255
263
|
|
|
@@ -364,9 +372,13 @@ else:
|
|
|
364
372
|
_fields: ClassVar[tuple[str, ...]]
|
|
365
373
|
__orig_bases__: ClassVar[tuple[Any, ...]]
|
|
366
374
|
@overload
|
|
367
|
-
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]] = ...) -> None:
|
|
375
|
+
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]] = ...) -> None:
|
|
376
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
377
|
+
...
|
|
368
378
|
@overload
|
|
369
|
-
def __init__(self, typename: str, fields: None = None, **kwargs: Any) -> None:
|
|
379
|
+
def __init__(self, typename: str, fields: None = None, **kwargs: Any) -> None:
|
|
380
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
381
|
+
...
|
|
370
382
|
@classmethod
|
|
371
383
|
def _make(cls, iterable: Iterable[Any]) -> Self: ...
|
|
372
384
|
def _asdict(self) -> dict[str, Any]: ...
|
|
@@ -435,7 +447,18 @@ else:
|
|
|
435
447
|
|
|
436
448
|
NoDefault: _NoDefaultType
|
|
437
449
|
@final
|
|
438
|
-
class CapsuleType:
|
|
450
|
+
class CapsuleType:
|
|
451
|
+
"""
|
|
452
|
+
Capsule objects let you wrap a C "void *" pointer in a Python
|
|
453
|
+
object. They're a way of passing data through the Python interpreter
|
|
454
|
+
without creating your own custom type.
|
|
455
|
+
|
|
456
|
+
Capsules are used for communication between extension modules.
|
|
457
|
+
They provide a way for an extension module to export a C interface
|
|
458
|
+
to other extension modules, so that extension modules can use the
|
|
459
|
+
Python import mechanism to link to one another.
|
|
460
|
+
"""
|
|
461
|
+
...
|
|
439
462
|
|
|
440
463
|
class deprecated:
|
|
441
464
|
message: LiteralString
|
|
@@ -473,8 +496,12 @@ else:
|
|
|
473
496
|
def has_default(self) -> bool: ...
|
|
474
497
|
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
475
498
|
if sys.version_info >= (3, 10):
|
|
476
|
-
def __or__(self, right: Any) -> _SpecialForm:
|
|
477
|
-
|
|
499
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
500
|
+
"""Return self|value."""
|
|
501
|
+
...
|
|
502
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
503
|
+
"""Return value|self."""
|
|
504
|
+
...
|
|
478
505
|
if sys.version_info >= (3, 11):
|
|
479
506
|
def __typing_subst__(self, arg: Any) -> Any: ...
|
|
480
507
|
|
|
@@ -508,8 +535,12 @@ else:
|
|
|
508
535
|
def has_default(self) -> bool: ...
|
|
509
536
|
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
510
537
|
if sys.version_info >= (3, 10):
|
|
511
|
-
def __or__(self, right: Any) -> _SpecialForm:
|
|
512
|
-
|
|
538
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
539
|
+
"""Return self|value."""
|
|
540
|
+
...
|
|
541
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
542
|
+
"""Return value|self."""
|
|
543
|
+
...
|
|
513
544
|
|
|
514
545
|
@final
|
|
515
546
|
class TypeVarTuple:
|
|
@@ -64,4 +64,9 @@ if sys.version_info >= (3, 11):
|
|
|
64
64
|
if sys.version_info < (3, 12):
|
|
65
65
|
def load_tests(loader: TestLoader, tests: TestSuite, pattern: str | None) -> TestSuite: ...
|
|
66
66
|
|
|
67
|
-
def __dir__() -> set[str]:
|
|
67
|
+
def __dir__() -> set[str]:
|
|
68
|
+
"""
|
|
69
|
+
__dir__() -> list
|
|
70
|
+
specialized dir() implementation
|
|
71
|
+
"""
|
|
72
|
+
...
|