basedpyright 1.1.389 → 1.1.392
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/README.md +3 -3
- 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/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +9 -0
- package/dist/typeshed-fallback/stdlib/__future__.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/__main__.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/_ast.pyi +149 -149
- package/dist/typeshed-fallback/stdlib/_asyncio.pyi +320 -342
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +189 -229
- package/dist/typeshed-fallback/stdlib/_blake2.pyi +137 -137
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_bz2.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/_codecs.pyi +247 -244
- package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +124 -115
- package/dist/typeshed-fallback/stdlib/_compat_pickle.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/_compression.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/_contextvars.pyi +146 -146
- package/dist/typeshed-fallback/stdlib/_csv.pyi +232 -172
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +435 -304
- package/dist/typeshed-fallback/stdlib/_curses.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +67 -0
- package/dist/typeshed-fallback/stdlib/_dbm.pyi +8 -19
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +80 -94
- 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/_frozen_importlib.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +178 -178
- package/dist/typeshed-fallback/stdlib/_gdbm.pyi +2 -65
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +232 -0
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_imp.pyi +81 -83
- package/dist/typeshed-fallback/stdlib/_io.pyi +719 -719
- package/dist/typeshed-fallback/stdlib/_json.pyi +99 -92
- package/dist/typeshed-fallback/stdlib/_locale.pyi +155 -155
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/_lzma.pyi +158 -158
- package/dist/typeshed-fallback/stdlib/_markupbase.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
- package/dist/typeshed-fallback/stdlib/_multibytecodec.pyi +44 -0
- package/dist/typeshed-fallback/stdlib/_operator.pyi +261 -261
- package/dist/typeshed-fallback/stdlib/_osx_support.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +0 -1
- package/dist/typeshed-fallback/stdlib/_py_abc.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/_pydecimal.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/_queue.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_sitebuiltins.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/_socket.pyi +1367 -1317
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +360 -402
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +399 -406
- package/dist/typeshed-fallback/stdlib/_stat.pyi +257 -257
- package/dist/typeshed-fallback/stdlib/_struct.pyi +147 -147
- package/dist/typeshed-fallback/stdlib/_thread.pyi +266 -257
- package/dist/typeshed-fallback/stdlib/_threading_local.pyi +22 -18
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +165 -165
- package/dist/typeshed-fallback/stdlib/_tracemalloc.pyi +78 -78
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +98 -102
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/abc.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/argparse.pyi +769 -769
- package/dist/typeshed-fallback/stdlib/array.pyi +267 -281
- package/dist/typeshed-fallback/stdlib/ast.pyi +2049 -2049
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +41 -41
- package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +488 -488
- package/dist/typeshed-fallback/stdlib/asyncio/base_futures.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/asyncio/base_subprocess.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/asyncio/base_tasks.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/constants.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/asyncio/coroutines.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +653 -653
- package/dist/typeshed-fallback/stdlib/asyncio/exceptions.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/asyncio/format_helpers.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +127 -127
- package/dist/typeshed-fallback/stdlib/asyncio/log.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/asyncio/mixins.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/proactor_events.pyi +64 -64
- package/dist/typeshed-fallback/stdlib/asyncio/protocols.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +64 -64
- package/dist/typeshed-fallback/stdlib/asyncio/runners.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/asyncio/selector_events.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +165 -184
- package/dist/typeshed-fallback/stdlib/asyncio/staggered.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/asyncio/streams.pyi +157 -157
- package/dist/typeshed-fallback/stdlib/asyncio/subprocess.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/asyncio/taskgroups.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +459 -459
- package/dist/typeshed-fallback/stdlib/asyncio/threads.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/asyncio/timeouts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/asyncio/transports.pyi +47 -47
- package/dist/typeshed-fallback/stdlib/asyncio/trsock.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/atexit.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/audioop.pyi +26 -78
- package/dist/typeshed-fallback/stdlib/base64.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/bdb.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -123
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/bisect.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/builtins.pyi +6481 -6560
- package/dist/typeshed-fallback/stdlib/bz2.pyi +132 -131
- package/dist/typeshed-fallback/stdlib/cProfile.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/calendar.pyi +208 -208
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/cmd.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/code.pyi +56 -56
- package/dist/typeshed-fallback/stdlib/codecs.pyi +301 -297
- package/dist/typeshed-fallback/stdlib/codeop.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +650 -650
- package/dist/typeshed-fallback/stdlib/collections/abc.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/colorsys.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/compileall.pyi +111 -111
- package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +51 -51
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +132 -132
- package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +234 -234
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/configparser.pyi +412 -404
- package/dist/typeshed-fallback/stdlib/contextlib.pyi +219 -213
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/copy.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/copyreg.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/crypt.pyi +9 -2
- package/dist/typeshed-fallback/stdlib/csv.pyi +169 -167
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +218 -198
- package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/dyld.pyi +8 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/dylib.pyi +14 -0
- package/dist/typeshed-fallback/stdlib/ctypes/macholib/framework.pyi +14 -0
- package/dist/typeshed-fallback/stdlib/ctypes/util.pyi +8 -6
- package/dist/typeshed-fallback/stdlib/ctypes/wintypes.pyi +304 -298
- package/dist/typeshed-fallback/stdlib/curses/__init__.pyi +19 -1
- package/dist/typeshed-fallback/stdlib/curses/panel.pyi +1 -34
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +322 -322
- package/dist/typeshed-fallback/stdlib/datetime.pyi +576 -575
- package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +104 -102
- package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +37 -37
- package/dist/typeshed-fallback/stdlib/decimal.pyi +849 -840
- package/dist/typeshed-fallback/stdlib/difflib.pyi +146 -146
- package/dist/typeshed-fallback/stdlib/dis.pyi +248 -248
- 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 -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 +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
- package/dist/typeshed-fallback/stdlib/doctest.pyi +262 -264
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/__init__.pyi +37 -29
- package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +398 -398
- package/dist/typeshed-fallback/stdlib/email/_policybase.pyi +77 -75
- package/dist/typeshed-fallback/stdlib/email/base64mime.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/email/charset.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/email/contentmanager.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/email/encoders.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/errors.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/email/feedparser.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/email/generator.pyi +77 -77
- package/dist/typeshed-fallback/stdlib/email/header.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +183 -183
- package/dist/typeshed-fallback/stdlib/email/iterators.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/email/message.pyi +172 -172
- package/dist/typeshed-fallback/stdlib/email/mime/application.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/audio.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/base.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/mime/image.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/email/mime/message.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/email/mime/multipart.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/email/mime/nonmultipart.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/email/mime/text.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/email/parser.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/email/policy.pyi +77 -77
- package/dist/typeshed-fallback/stdlib/email/quoprimime.pyi +28 -28
- package/dist/typeshed-fallback/stdlib/email/utils.pyi +78 -78
- package/dist/typeshed-fallback/stdlib/encodings/__init__.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/encodings/aliases.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/encodings/ascii.pyi +30 -0
- package/dist/typeshed-fallback/stdlib/encodings/base64_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/big5.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/big5hkscs.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/bz2_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/charmap.pyi +33 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp037.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1006.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1026.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1125.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1140.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1250.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1251.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1252.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1253.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1254.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1255.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1256.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1257.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp1258.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp273.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp424.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp437.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp500.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp720.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp737.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp775.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp850.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp852.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp855.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp856.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp857.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp858.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp860.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp861.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp862.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp863.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp864.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp865.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp866.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp869.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp874.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp875.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp932.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp949.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/cp950.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jis_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jisx0213.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_jp.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/euc_kr.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gb18030.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gb2312.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/gbk.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/hex_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/hp_roman8.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/hz.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/idna.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_1.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_3.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso2022_kr.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_1.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_10.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_11.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_13.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_14.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_15.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_16.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_2.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_3.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_4.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_5.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_6.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_7.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_8.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/iso8859_9.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/johab.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_r.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_t.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/koi8_u.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/kz1048.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/latin_1.pyi +30 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_arabic.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_croatian.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_cyrillic.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_farsi.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_greek.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_iceland.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_latin2.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_roman.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_romanian.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mac_turkish.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/mbcs.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/oem.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/palmos.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/ptcp154.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/punycode.pyi +33 -0
- package/dist/typeshed-fallback/stdlib/encodings/quopri_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/raw_unicode_escape.pyi +34 -0
- package/dist/typeshed-fallback/stdlib/encodings/rot_13.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jis.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jis_2004.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/shift_jisx0213.pyi +23 -0
- package/dist/typeshed-fallback/stdlib/encodings/tis_620.pyi +21 -0
- package/dist/typeshed-fallback/stdlib/encodings/undefined.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/unicode_escape.pyi +34 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16_be.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_16_le.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32.pyi +20 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32_be.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_32_le.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_7.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/encodings/utf_8.pyi +26 -21
- package/dist/typeshed-fallback/stdlib/encodings/utf_8_sig.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/encodings/uu_codec.pyi +28 -0
- package/dist/typeshed-fallback/stdlib/encodings/zlib_codec.pyi +26 -0
- package/dist/typeshed-fallback/stdlib/ensurepip/__init__.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/enum.pyi +348 -348
- package/dist/typeshed-fallback/stdlib/errno.pyi +237 -237
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/fcntl.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +74 -74
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +219 -219
- package/dist/typeshed-fallback/stdlib/fnmatch.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/fractions.pyi +162 -162
- package/dist/typeshed-fallback/stdlib/ftplib.pyi +178 -178
- package/dist/typeshed-fallback/stdlib/functools.pyi +270 -270
- package/dist/typeshed-fallback/stdlib/gc.pyi +144 -144
- package/dist/typeshed-fallback/stdlib/genericpath.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/getopt.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/getpass.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/gettext.pyi +171 -169
- package/dist/typeshed-fallback/stdlib/glob.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/gzip.pyi +162 -162
- package/dist/typeshed-fallback/stdlib/hashlib.pyi +104 -163
- package/dist/typeshed-fallback/stdlib/heapq.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/hmac.pyi +42 -65
- package/dist/typeshed-fallback/stdlib/html/__init__.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/html/entities.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/http/__init__.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/http/client.pyi +246 -246
- package/dist/typeshed-fallback/stdlib/http/cookiejar.pyi +159 -159
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +66 -66
- package/dist/typeshed-fallback/stdlib/http/server.pyi +83 -83
- package/dist/typeshed-fallback/stdlib/imaplib.pyi +168 -168
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/__init__.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/importlib/_abc.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/importlib/_bootstrap.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/_bootstrap_external.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +175 -175
- package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +342 -371
- package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/importlib/readers.pyi +68 -68
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +70 -70
- package/dist/typeshed-fallback/stdlib/importlib/resources/_common.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/importlib/resources/abc.pyi +14 -12
- package/dist/typeshed-fallback/stdlib/importlib/resources/readers.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/importlib/simple.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/importlib/util.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/inspect.pyi +642 -642
- package/dist/typeshed-fallback/stdlib/io.pyi +60 -60
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +509 -355
- package/dist/typeshed-fallback/stdlib/itertools.pyi +574 -574
- package/dist/typeshed-fallback/stdlib/json/__init__.pyi +61 -61
- package/dist/typeshed-fallback/stdlib/json/decoder.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/json/scanner.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/json/tool.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/keyword.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +2 -12
- package/dist/typeshed-fallback/stdlib/linecache.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/locale.pyi +156 -156
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +698 -698
- package/dist/typeshed-fallback/stdlib/logging/config.pyi +134 -134
- package/dist/typeshed-fallback/stdlib/logging/handlers.pyi +277 -277
- package/dist/typeshed-fallback/stdlib/lzma.pyi +174 -174
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +276 -276
- package/dist/typeshed-fallback/stdlib/marshal.pyi +128 -176
- package/dist/typeshed-fallback/stdlib/math.pyi +438 -442
- package/dist/typeshed-fallback/stdlib/mimetypes.pyi +56 -56
- package/dist/typeshed-fallback/stdlib/mmap.pyi +185 -185
- package/dist/typeshed-fallback/stdlib/modulefinder.pyi +68 -66
- 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/__init__.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +89 -89
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +216 -215
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +79 -79
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/connection.pyi +39 -39
- package/dist/typeshed-fallback/stdlib/multiprocessing/forkserver.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/multiprocessing/heap.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +266 -266
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +109 -109
- package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +87 -87
- package/dist/typeshed-fallback/stdlib/multiprocessing/resource_sharer.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/multiprocessing/resource_tracker.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +129 -128
- package/dist/typeshed-fallback/stdlib/multiprocessing/spawn.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +59 -55
- package/dist/typeshed-fallback/stdlib/multiprocessing/util.pyi +98 -98
- package/dist/typeshed-fallback/stdlib/netrc.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
- package/dist/typeshed-fallback/stdlib/ntpath.pyi +126 -126
- package/dist/typeshed-fallback/stdlib/nturl2path.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/numbers.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/opcode.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/operator.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/optparse.pyi +257 -257
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +2946 -2491
- package/dist/typeshed-fallback/stdlib/os/path.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +329 -329
- package/dist/typeshed-fallback/stdlib/pdb.pyi +206 -206
- package/dist/typeshed-fallback/stdlib/pickle.pyi +459 -459
- package/dist/typeshed-fallback/stdlib/pickletools.pyi +167 -167
- package/dist/typeshed-fallback/stdlib/pkgutil.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/platform.pyi +97 -67
- package/dist/typeshed-fallback/stdlib/plistlib.pyi +113 -113
- package/dist/typeshed-fallback/stdlib/poplib.pyi +72 -72
- package/dist/typeshed-fallback/stdlib/posix.pyi +30 -10
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +182 -182
- package/dist/typeshed-fallback/stdlib/pprint.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/profile.pyi +31 -31
- package/dist/typeshed-fallback/stdlib/pstats.pyi +98 -80
- package/dist/typeshed-fallback/stdlib/py_compile.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/pyclbr.pyi +74 -74
- package/dist/typeshed-fallback/stdlib/pydoc.pyi +333 -333
- package/dist/typeshed-fallback/stdlib/pydoc_data/topics.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +131 -129
- package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/queue.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/quopri.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/random.pyi +141 -141
- package/dist/typeshed-fallback/stdlib/re.pyi +476 -476
- package/dist/typeshed-fallback/stdlib/readline.pyi +1 -7
- package/dist/typeshed-fallback/stdlib/reprlib.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/rlcompleter.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/runpy.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/sched.pyi +52 -49
- package/dist/typeshed-fallback/stdlib/secrets.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/select.pyi +247 -247
- package/dist/typeshed-fallback/stdlib/selectors.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/shelve.pyi +59 -59
- package/dist/typeshed-fallback/stdlib/shlex.pyi +63 -63
- package/dist/typeshed-fallback/stdlib/shutil.pyi +230 -230
- package/dist/typeshed-fallback/stdlib/signal.pyi +263 -263
- package/dist/typeshed-fallback/stdlib/site.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/smtplib.pyi +204 -204
- package/dist/typeshed-fallback/stdlib/socket.pyi +1413 -856
- package/dist/typeshed-fallback/stdlib/socketserver.pyi +169 -169
- package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +785 -787
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +241 -241
- package/dist/typeshed-fallback/stdlib/sqlite3/dump.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/sre_compile.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/sre_constants.pyi +124 -124
- package/dist/typeshed-fallback/stdlib/sre_parse.pyi +104 -104
- package/dist/typeshed-fallback/stdlib/ssl.pyi +558 -560
- package/dist/typeshed-fallback/stdlib/stat.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/statistics.pyi +176 -176
- package/dist/typeshed-fallback/stdlib/string.pyi +83 -83
- package/dist/typeshed-fallback/stdlib/stringprep.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/struct.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +2640 -2640
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/symtable.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +773 -707
- package/dist/typeshed-fallback/stdlib/sysconfig.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/tabnanny.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +593 -593
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +497 -497
- package/dist/typeshed-fallback/stdlib/termios.pyi +108 -72
- package/dist/typeshed-fallback/stdlib/textwrap.pyi +103 -103
- package/dist/typeshed-fallback/stdlib/threading.pyi +279 -279
- package/dist/typeshed-fallback/stdlib/time.pyi +380 -380
- package/dist/typeshed-fallback/stdlib/timeit.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3900 -3847
- package/dist/typeshed-fallback/stdlib/tkinter/colorchooser.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/tkinter/commondialog.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/tkinter/constants.pyi +80 -80
- package/dist/typeshed-fallback/stdlib/tkinter/dialog.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/tkinter/dnd.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/tkinter/filedialog.pyi +151 -151
- package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +118 -116
- package/dist/typeshed-fallback/stdlib/tkinter/messagebox.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/tkinter/scrolledtext.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/tkinter/simpledialog.pyi +54 -54
- package/dist/typeshed-fallback/stdlib/tkinter/ttk.pyi +1207 -1207
- package/dist/typeshed-fallback/stdlib/token.pyi +160 -160
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +186 -184
- package/dist/typeshed-fallback/stdlib/tomllib.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/trace.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/traceback.pyi +300 -300
- package/dist/typeshed-fallback/stdlib/tracemalloc.pyi +124 -124
- package/dist/typeshed-fallback/stdlib/turtle.pyi +732 -721
- package/dist/typeshed-fallback/stdlib/types.pyi +909 -913
- package/dist/typeshed-fallback/stdlib/typing.pyi +1145 -1147
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +19 -47
- package/dist/typeshed-fallback/stdlib/unicodedata.pyi +303 -303
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +63 -68
- package/dist/typeshed-fallback/stdlib/unittest/_log.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/unittest/async_case.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +361 -361
- package/dist/typeshed-fallback/stdlib/unittest/loader.pyi +55 -55
- package/dist/typeshed-fallback/stdlib/unittest/main.pyi +73 -73
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +468 -468
- package/dist/typeshed-fallback/stdlib/unittest/result.pyi +47 -47
- package/dist/typeshed-fallback/stdlib/unittest/runner.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/unittest/signals.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/unittest/suite.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/unittest/util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/urllib/error.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +258 -258
- package/dist/typeshed-fallback/stdlib/urllib/request.pyi +408 -408
- package/dist/typeshed-fallback/stdlib/urllib/response.pyi +43 -43
- package/dist/typeshed-fallback/stdlib/urllib/robotparser.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/uuid.pyi +100 -100
- package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +107 -107
- package/dist/typeshed-fallback/stdlib/warnings.pyi +127 -127
- package/dist/typeshed-fallback/stdlib/wave.pyi +85 -85
- package/dist/typeshed-fallback/stdlib/weakref.pyi +198 -198
- package/dist/typeshed-fallback/stdlib/webbrowser.pyi +78 -77
- package/dist/typeshed-fallback/stdlib/wsgiref/handlers.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/wsgiref/headers.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/wsgiref/simple_server.pyi +37 -37
- package/dist/typeshed-fallback/stdlib/wsgiref/types.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/wsgiref/validate.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/xml/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/xml/dom/NodeFilter.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/xml/dom/__init__.pyi +69 -69
- package/dist/typeshed-fallback/stdlib/xml/dom/domreg.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/xml/dom/expatbuilder.pyi +100 -100
- package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +426 -426
- package/dist/typeshed-fallback/stdlib/xml/dom/pulldom.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/xml/dom/xmlbuilder.pyi +108 -108
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementInclude.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementPath.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +347 -347
- package/dist/typeshed-fallback/stdlib/xml/etree/cElementTree.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xml/parsers/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/__init__.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/xml/sax/__init__.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/xml/sax/_exceptions.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +55 -55
- package/dist/typeshed-fallback/stdlib/xml/sax/saxutils.pyi +60 -60
- package/dist/typeshed-fallback/stdlib/xml/sax/xmlreader.pyi +87 -87
- package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +296 -296
- package/dist/typeshed-fallback/stdlib/xmlrpc/server.pyi +144 -144
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/zipapp.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +384 -384
- package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +103 -101
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +41 -70
- package/dist/typeshed-fallback/stdlib/zlib.pyi +162 -157
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +41 -47
- package/dist/typeshed-fallback/stdlib/zoneinfo/_common.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/zoneinfo/_tzpath.pyi +13 -13
- package/dist/typeshed-fallback/stubs/Deprecated/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
- package/dist/typeshed-fallback/stubs/bleach/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/core.pyi +216 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/writers/__init__.pyi +60 -2
- package/dist/typeshed-fallback/stubs/gevent/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/gevent/gevent/events.pyi +3 -1
- package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +6 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +14 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/alarms.pyi +54 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +137 -11
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/prop.pyi +8 -7
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/__init__.pyi +3 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids.pyi +15 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids_result.pyi +6 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzid.pyi +8 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +2 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/tools.pyi +12 -1
- package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +0 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +0 -31
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/drawing/layout.pyi +4 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi +0 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +12 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/text.pyi +1 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi +20 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/__init__.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/_writer.pyi +4 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/cell.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/workbook.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +5 -14
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +2 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_writer.pyi +4 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/merge.pyi +2 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +30 -19
- package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pysftp/pysftp/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pywin32/isapi/install.pyi +98 -0
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32clipboard.pyi +26 -24
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/distutils/spawn.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +6 -7
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +7 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +3 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +6 -7
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +12 -17
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/editable_wheel.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_egg_info.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/sdist.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/test.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/__init__.pyi +1 -14
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/setupcfg.pyi +7 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/depends.pyi +8 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/msvc.pyi +7 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/package_index.pyi +7 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/sandbox.pyi +2 -4
- package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/tqdm/tqdm/contrib/discord.pyi +14 -3
- package/dist/typeshed-fallback/stubs/waitress/waitress/runner.pyi +1 -5
- package/package.json +5 -3
|
@@ -1,1147 +1,1145 @@
|
|
|
1
|
-
# Since this module defines "overload" it is not recognized by Ruff as typing.overload
|
|
2
|
-
# ruff: noqa: F811
|
|
3
|
-
# TODO: The collections import is required, otherwise mypy crashes.
|
|
4
|
-
# https://github.com/python/mypy/issues/16744
|
|
5
|
-
import collections # noqa: F401 # pyright: ignore[reportUnusedImport]
|
|
6
|
-
import sys
|
|
7
|
-
import typing_extensions
|
|
8
|
-
from _collections_abc import dict_items, dict_keys, dict_values
|
|
9
|
-
from _typeshed import IdentityFunction, ReadableBuffer, SupportsKeysAndGetItem
|
|
10
|
-
from abc import ABCMeta, abstractmethod
|
|
11
|
-
from re import Match as Match, Pattern as Pattern
|
|
12
|
-
from types import (
|
|
13
|
-
BuiltinFunctionType,
|
|
14
|
-
CodeType,
|
|
15
|
-
FrameType,
|
|
16
|
-
FunctionType,
|
|
17
|
-
MethodDescriptorType,
|
|
18
|
-
MethodType,
|
|
19
|
-
MethodWrapperType,
|
|
20
|
-
ModuleType,
|
|
21
|
-
TracebackType,
|
|
22
|
-
WrapperDescriptorType,
|
|
23
|
-
)
|
|
24
|
-
from typing_extensions import Never as _Never, ParamSpec as _ParamSpec, deprecated
|
|
25
|
-
|
|
26
|
-
if sys.version_info >= (3, 9):
|
|
27
|
-
from types import GenericAlias
|
|
28
|
-
if sys.version_info >= (3, 10):
|
|
29
|
-
from types import UnionType
|
|
30
|
-
|
|
31
|
-
__all__ = [
|
|
32
|
-
"AbstractSet",
|
|
33
|
-
"Any",
|
|
34
|
-
"AnyStr",
|
|
35
|
-
"AsyncContextManager",
|
|
36
|
-
"AsyncGenerator",
|
|
37
|
-
"AsyncIterable",
|
|
38
|
-
"AsyncIterator",
|
|
39
|
-
"Awaitable",
|
|
40
|
-
"ByteString",
|
|
41
|
-
"Callable",
|
|
42
|
-
"ChainMap",
|
|
43
|
-
"ClassVar",
|
|
44
|
-
"Collection",
|
|
45
|
-
"Container",
|
|
46
|
-
"ContextManager",
|
|
47
|
-
"Coroutine",
|
|
48
|
-
"Counter",
|
|
49
|
-
"DefaultDict",
|
|
50
|
-
"Deque",
|
|
51
|
-
"Dict",
|
|
52
|
-
"Final",
|
|
53
|
-
"FrozenSet",
|
|
54
|
-
"Generator",
|
|
55
|
-
"Generic",
|
|
56
|
-
"Hashable",
|
|
57
|
-
"ItemsView",
|
|
58
|
-
"Iterable",
|
|
59
|
-
"Iterator",
|
|
60
|
-
"KeysView",
|
|
61
|
-
"List",
|
|
62
|
-
"Literal",
|
|
63
|
-
"Mapping",
|
|
64
|
-
"MappingView",
|
|
65
|
-
"MutableMapping",
|
|
66
|
-
"MutableSequence",
|
|
67
|
-
"MutableSet",
|
|
68
|
-
"NamedTuple",
|
|
69
|
-
"NewType",
|
|
70
|
-
"Optional",
|
|
71
|
-
"Protocol",
|
|
72
|
-
"Reversible",
|
|
73
|
-
"Sequence",
|
|
74
|
-
"Set",
|
|
75
|
-
"Sized",
|
|
76
|
-
"SupportsAbs",
|
|
77
|
-
"SupportsBytes",
|
|
78
|
-
"SupportsComplex",
|
|
79
|
-
"SupportsFloat",
|
|
80
|
-
"SupportsIndex",
|
|
81
|
-
"SupportsInt",
|
|
82
|
-
"SupportsRound",
|
|
83
|
-
"Text",
|
|
84
|
-
"Tuple",
|
|
85
|
-
"Type",
|
|
86
|
-
"TypeVar",
|
|
87
|
-
"TypedDict",
|
|
88
|
-
"Union",
|
|
89
|
-
"ValuesView",
|
|
90
|
-
"TYPE_CHECKING",
|
|
91
|
-
"cast",
|
|
92
|
-
"final",
|
|
93
|
-
"get_args",
|
|
94
|
-
"get_origin",
|
|
95
|
-
"get_type_hints",
|
|
96
|
-
"no_type_check",
|
|
97
|
-
"no_type_check_decorator",
|
|
98
|
-
"overload",
|
|
99
|
-
"runtime_checkable",
|
|
100
|
-
"ForwardRef",
|
|
101
|
-
"NoReturn",
|
|
102
|
-
"OrderedDict",
|
|
103
|
-
]
|
|
104
|
-
|
|
105
|
-
if sys.version_info >= (3, 9):
|
|
106
|
-
__all__ += ["Annotated", "BinaryIO", "IO", "Match", "Pattern", "TextIO"]
|
|
107
|
-
|
|
108
|
-
if sys.version_info >= (3, 10):
|
|
109
|
-
__all__ += ["Concatenate", "ParamSpec", "ParamSpecArgs", "ParamSpecKwargs", "TypeAlias", "TypeGuard", "is_typeddict"]
|
|
110
|
-
|
|
111
|
-
if sys.version_info >= (3, 11):
|
|
112
|
-
__all__ += [
|
|
113
|
-
"LiteralString",
|
|
114
|
-
"Never",
|
|
115
|
-
"NotRequired",
|
|
116
|
-
"Required",
|
|
117
|
-
"Self",
|
|
118
|
-
"TypeVarTuple",
|
|
119
|
-
"Unpack",
|
|
120
|
-
"assert_never",
|
|
121
|
-
"assert_type",
|
|
122
|
-
"clear_overloads",
|
|
123
|
-
"dataclass_transform",
|
|
124
|
-
"get_overloads",
|
|
125
|
-
"reveal_type",
|
|
126
|
-
]
|
|
127
|
-
|
|
128
|
-
if sys.version_info >= (3, 12):
|
|
129
|
-
__all__ += ["TypeAliasType", "override"]
|
|
130
|
-
|
|
131
|
-
if sys.version_info >= (3, 13):
|
|
132
|
-
__all__ += ["get_protocol_members", "is_protocol", "NoDefault", "TypeIs", "ReadOnly"]
|
|
133
|
-
|
|
134
|
-
Any = object()
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
@property
|
|
142
|
-
def
|
|
143
|
-
@property
|
|
144
|
-
def
|
|
145
|
-
@property
|
|
146
|
-
def
|
|
147
|
-
@property
|
|
148
|
-
def
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
def
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if sys.version_info >= (3,
|
|
190
|
-
def
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
def
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
def
|
|
256
|
-
def
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
def
|
|
265
|
-
def
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
def
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
def
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
def
|
|
368
|
-
def
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
@
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
@
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
#
|
|
453
|
-
#
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
def
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
@
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
@
|
|
494
|
-
|
|
495
|
-
def
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
@runtime_checkable
|
|
518
|
-
class
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
@
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
@
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
#
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
def
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
@
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
@
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
@
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
@
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
def
|
|
630
|
-
def
|
|
631
|
-
def
|
|
632
|
-
def
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
@
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
@
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
@
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
@
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
@
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
@
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
def
|
|
659
|
-
def
|
|
660
|
-
def
|
|
661
|
-
def
|
|
662
|
-
def
|
|
663
|
-
def
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
def
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
def
|
|
685
|
-
def
|
|
686
|
-
def
|
|
687
|
-
def
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
def
|
|
701
|
-
def
|
|
702
|
-
def
|
|
703
|
-
def
|
|
704
|
-
def
|
|
705
|
-
def
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
def
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
def
|
|
716
|
-
def
|
|
717
|
-
def
|
|
718
|
-
def
|
|
719
|
-
def
|
|
720
|
-
def __or__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
721
|
-
def __ror__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
722
|
-
def __sub__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ...
|
|
723
|
-
def __rsub__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
724
|
-
def __xor__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
725
|
-
def __rxor__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
726
|
-
|
|
727
|
-
class KeysView(MappingView, AbstractSet[_KT_co]):
|
|
728
|
-
"""A generic version of collections.abc.KeysView."""
|
|
729
|
-
def __init__(self, mapping: Mapping[_KT_co, Any]) -> None: ... # undocumented
|
|
730
|
-
def __and__(self, other: Iterable[Any]) -> set[_KT_co]: ...
|
|
731
|
-
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
732
|
-
def __contains__(self, key: object) -> bool: ...
|
|
733
|
-
def __iter__(self) -> Iterator[_KT_co]: ...
|
|
734
|
-
def
|
|
735
|
-
def
|
|
736
|
-
def
|
|
737
|
-
def
|
|
738
|
-
def
|
|
739
|
-
def
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
def
|
|
745
|
-
def
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
@overload
|
|
757
|
-
def get(self, key: _KT,
|
|
758
|
-
|
|
759
|
-
def
|
|
760
|
-
def
|
|
761
|
-
def
|
|
762
|
-
def
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
@abstractmethod
|
|
771
|
-
def
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
def
|
|
775
|
-
@overload
|
|
776
|
-
def pop(self, key: _KT,
|
|
777
|
-
@overload
|
|
778
|
-
def pop(self, key: _KT, /, default:
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
#
|
|
783
|
-
#
|
|
784
|
-
#
|
|
785
|
-
# --
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
@overload
|
|
789
|
-
def setdefault(self
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
#
|
|
793
|
-
#
|
|
794
|
-
#
|
|
795
|
-
#
|
|
796
|
-
#
|
|
797
|
-
#
|
|
798
|
-
#
|
|
799
|
-
#
|
|
800
|
-
#
|
|
801
|
-
#
|
|
802
|
-
#
|
|
803
|
-
#
|
|
804
|
-
# --
|
|
805
|
-
# --
|
|
806
|
-
# --
|
|
807
|
-
# --
|
|
808
|
-
# --
|
|
809
|
-
# --
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
@overload
|
|
813
|
-
def update(self, m:
|
|
814
|
-
@overload
|
|
815
|
-
def update(self,
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
#
|
|
824
|
-
|
|
825
|
-
#
|
|
826
|
-
|
|
827
|
-
#
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
@
|
|
835
|
-
def
|
|
836
|
-
@
|
|
837
|
-
def
|
|
838
|
-
@
|
|
839
|
-
def
|
|
840
|
-
@abstractmethod
|
|
841
|
-
def
|
|
842
|
-
@abstractmethod
|
|
843
|
-
def
|
|
844
|
-
@abstractmethod
|
|
845
|
-
def
|
|
846
|
-
@abstractmethod
|
|
847
|
-
def
|
|
848
|
-
@abstractmethod
|
|
849
|
-
def
|
|
850
|
-
@abstractmethod
|
|
851
|
-
def
|
|
852
|
-
@abstractmethod
|
|
853
|
-
def
|
|
854
|
-
@abstractmethod
|
|
855
|
-
def
|
|
856
|
-
@abstractmethod
|
|
857
|
-
def
|
|
858
|
-
@abstractmethod
|
|
859
|
-
def
|
|
860
|
-
@abstractmethod
|
|
861
|
-
def
|
|
862
|
-
@abstractmethod
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
@
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
@
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
@
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
@
|
|
875
|
-
def
|
|
876
|
-
@abstractmethod
|
|
877
|
-
def
|
|
878
|
-
@abstractmethod
|
|
879
|
-
def
|
|
880
|
-
@abstractmethod
|
|
881
|
-
def
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
@property
|
|
894
|
-
def
|
|
895
|
-
@property
|
|
896
|
-
def
|
|
897
|
-
@property
|
|
898
|
-
def
|
|
899
|
-
@property
|
|
900
|
-
def
|
|
901
|
-
@
|
|
902
|
-
def
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
#
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
|
914
|
-
|
|
|
915
|
-
|
|
|
916
|
-
|
|
|
917
|
-
|
|
|
918
|
-
|
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
)
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
@overload
|
|
940
|
-
def get_origin(tp:
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
@overload
|
|
946
|
-
def get_origin(tp:
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
@overload
|
|
954
|
-
def cast(typ:
|
|
955
|
-
@overload
|
|
956
|
-
def cast(typ:
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
def
|
|
962
|
-
def
|
|
963
|
-
def
|
|
964
|
-
def
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
def
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
#
|
|
1022
|
-
def
|
|
1023
|
-
|
|
1024
|
-
def
|
|
1025
|
-
def
|
|
1026
|
-
def
|
|
1027
|
-
def
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
def __init__(self, arg: str, is_argument: bool = True
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
"
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
) -> Any | None: ...
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
) ->
|
|
1118
|
-
@property
|
|
1119
|
-
def
|
|
1120
|
-
@property
|
|
1121
|
-
def
|
|
1122
|
-
@property
|
|
1123
|
-
def
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
TypeIs: _SpecialForm
|
|
1147
|
-
ReadOnly: _SpecialForm
|
|
1
|
+
# Since this module defines "overload" it is not recognized by Ruff as typing.overload
|
|
2
|
+
# ruff: noqa: F811
|
|
3
|
+
# TODO: The collections import is required, otherwise mypy crashes.
|
|
4
|
+
# https://github.com/python/mypy/issues/16744
|
|
5
|
+
import collections # noqa: F401 # pyright: ignore[reportUnusedImport]
|
|
6
|
+
import sys
|
|
7
|
+
import typing_extensions
|
|
8
|
+
from _collections_abc import dict_items, dict_keys, dict_values
|
|
9
|
+
from _typeshed import IdentityFunction, ReadableBuffer, SupportsKeysAndGetItem
|
|
10
|
+
from abc import ABCMeta, abstractmethod
|
|
11
|
+
from re import Match as Match, Pattern as Pattern
|
|
12
|
+
from types import (
|
|
13
|
+
BuiltinFunctionType,
|
|
14
|
+
CodeType,
|
|
15
|
+
FrameType,
|
|
16
|
+
FunctionType,
|
|
17
|
+
MethodDescriptorType,
|
|
18
|
+
MethodType,
|
|
19
|
+
MethodWrapperType,
|
|
20
|
+
ModuleType,
|
|
21
|
+
TracebackType,
|
|
22
|
+
WrapperDescriptorType,
|
|
23
|
+
)
|
|
24
|
+
from typing_extensions import Never as _Never, ParamSpec as _ParamSpec, deprecated
|
|
25
|
+
|
|
26
|
+
if sys.version_info >= (3, 9):
|
|
27
|
+
from types import GenericAlias
|
|
28
|
+
if sys.version_info >= (3, 10):
|
|
29
|
+
from types import UnionType
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
"AbstractSet",
|
|
33
|
+
"Any",
|
|
34
|
+
"AnyStr",
|
|
35
|
+
"AsyncContextManager",
|
|
36
|
+
"AsyncGenerator",
|
|
37
|
+
"AsyncIterable",
|
|
38
|
+
"AsyncIterator",
|
|
39
|
+
"Awaitable",
|
|
40
|
+
"ByteString",
|
|
41
|
+
"Callable",
|
|
42
|
+
"ChainMap",
|
|
43
|
+
"ClassVar",
|
|
44
|
+
"Collection",
|
|
45
|
+
"Container",
|
|
46
|
+
"ContextManager",
|
|
47
|
+
"Coroutine",
|
|
48
|
+
"Counter",
|
|
49
|
+
"DefaultDict",
|
|
50
|
+
"Deque",
|
|
51
|
+
"Dict",
|
|
52
|
+
"Final",
|
|
53
|
+
"FrozenSet",
|
|
54
|
+
"Generator",
|
|
55
|
+
"Generic",
|
|
56
|
+
"Hashable",
|
|
57
|
+
"ItemsView",
|
|
58
|
+
"Iterable",
|
|
59
|
+
"Iterator",
|
|
60
|
+
"KeysView",
|
|
61
|
+
"List",
|
|
62
|
+
"Literal",
|
|
63
|
+
"Mapping",
|
|
64
|
+
"MappingView",
|
|
65
|
+
"MutableMapping",
|
|
66
|
+
"MutableSequence",
|
|
67
|
+
"MutableSet",
|
|
68
|
+
"NamedTuple",
|
|
69
|
+
"NewType",
|
|
70
|
+
"Optional",
|
|
71
|
+
"Protocol",
|
|
72
|
+
"Reversible",
|
|
73
|
+
"Sequence",
|
|
74
|
+
"Set",
|
|
75
|
+
"Sized",
|
|
76
|
+
"SupportsAbs",
|
|
77
|
+
"SupportsBytes",
|
|
78
|
+
"SupportsComplex",
|
|
79
|
+
"SupportsFloat",
|
|
80
|
+
"SupportsIndex",
|
|
81
|
+
"SupportsInt",
|
|
82
|
+
"SupportsRound",
|
|
83
|
+
"Text",
|
|
84
|
+
"Tuple",
|
|
85
|
+
"Type",
|
|
86
|
+
"TypeVar",
|
|
87
|
+
"TypedDict",
|
|
88
|
+
"Union",
|
|
89
|
+
"ValuesView",
|
|
90
|
+
"TYPE_CHECKING",
|
|
91
|
+
"cast",
|
|
92
|
+
"final",
|
|
93
|
+
"get_args",
|
|
94
|
+
"get_origin",
|
|
95
|
+
"get_type_hints",
|
|
96
|
+
"no_type_check",
|
|
97
|
+
"no_type_check_decorator",
|
|
98
|
+
"overload",
|
|
99
|
+
"runtime_checkable",
|
|
100
|
+
"ForwardRef",
|
|
101
|
+
"NoReturn",
|
|
102
|
+
"OrderedDict",
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
if sys.version_info >= (3, 9):
|
|
106
|
+
__all__ += ["Annotated", "BinaryIO", "IO", "Match", "Pattern", "TextIO"]
|
|
107
|
+
|
|
108
|
+
if sys.version_info >= (3, 10):
|
|
109
|
+
__all__ += ["Concatenate", "ParamSpec", "ParamSpecArgs", "ParamSpecKwargs", "TypeAlias", "TypeGuard", "is_typeddict"]
|
|
110
|
+
|
|
111
|
+
if sys.version_info >= (3, 11):
|
|
112
|
+
__all__ += [
|
|
113
|
+
"LiteralString",
|
|
114
|
+
"Never",
|
|
115
|
+
"NotRequired",
|
|
116
|
+
"Required",
|
|
117
|
+
"Self",
|
|
118
|
+
"TypeVarTuple",
|
|
119
|
+
"Unpack",
|
|
120
|
+
"assert_never",
|
|
121
|
+
"assert_type",
|
|
122
|
+
"clear_overloads",
|
|
123
|
+
"dataclass_transform",
|
|
124
|
+
"get_overloads",
|
|
125
|
+
"reveal_type",
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
if sys.version_info >= (3, 12):
|
|
129
|
+
__all__ += ["TypeAliasType", "override"]
|
|
130
|
+
|
|
131
|
+
if sys.version_info >= (3, 13):
|
|
132
|
+
__all__ += ["get_protocol_members", "is_protocol", "NoDefault", "TypeIs", "ReadOnly"]
|
|
133
|
+
|
|
134
|
+
Any = object()
|
|
135
|
+
|
|
136
|
+
class _Final: ...
|
|
137
|
+
|
|
138
|
+
def final(f: _T) -> _T: ...
|
|
139
|
+
@final
|
|
140
|
+
class TypeVar:
|
|
141
|
+
@property
|
|
142
|
+
def __name__(self) -> str: ...
|
|
143
|
+
@property
|
|
144
|
+
def __bound__(self) -> Any | None: ...
|
|
145
|
+
@property
|
|
146
|
+
def __constraints__(self) -> tuple[Any, ...]: ...
|
|
147
|
+
@property
|
|
148
|
+
def __covariant__(self) -> bool: ...
|
|
149
|
+
@property
|
|
150
|
+
def __contravariant__(self) -> bool: ...
|
|
151
|
+
if sys.version_info >= (3, 12):
|
|
152
|
+
@property
|
|
153
|
+
def __infer_variance__(self) -> bool: ...
|
|
154
|
+
if sys.version_info >= (3, 13):
|
|
155
|
+
@property
|
|
156
|
+
def __default__(self) -> Any: ...
|
|
157
|
+
if sys.version_info >= (3, 13):
|
|
158
|
+
def __init__(
|
|
159
|
+
self,
|
|
160
|
+
name: str,
|
|
161
|
+
*constraints: Any,
|
|
162
|
+
bound: Any | None = None,
|
|
163
|
+
contravariant: bool = False,
|
|
164
|
+
covariant: bool = False,
|
|
165
|
+
infer_variance: bool = False,
|
|
166
|
+
default: Any = ...,
|
|
167
|
+
) -> None: ...
|
|
168
|
+
elif sys.version_info >= (3, 12):
|
|
169
|
+
def __init__(
|
|
170
|
+
self,
|
|
171
|
+
name: str,
|
|
172
|
+
*constraints: Any,
|
|
173
|
+
bound: Any | None = None,
|
|
174
|
+
covariant: bool = False,
|
|
175
|
+
contravariant: bool = False,
|
|
176
|
+
infer_variance: bool = False,
|
|
177
|
+
) -> None: ...
|
|
178
|
+
else:
|
|
179
|
+
def __init__(
|
|
180
|
+
self, name: str, *constraints: Any, bound: Any | None = None, covariant: bool = False, contravariant: bool = False
|
|
181
|
+
) -> None: ...
|
|
182
|
+
if sys.version_info >= (3, 10):
|
|
183
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
184
|
+
"""Return self|value."""
|
|
185
|
+
...
|
|
186
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
187
|
+
"""Return value|self."""
|
|
188
|
+
...
|
|
189
|
+
if sys.version_info >= (3, 11):
|
|
190
|
+
def __typing_subst__(self, arg: Any) -> Any: ...
|
|
191
|
+
if sys.version_info >= (3, 13):
|
|
192
|
+
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
193
|
+
def has_default(self) -> bool: ...
|
|
194
|
+
|
|
195
|
+
# Used for an undocumented mypy feature. Does not exist at runtime.
|
|
196
|
+
_promote = object()
|
|
197
|
+
|
|
198
|
+
# N.B. Keep this definition in sync with typing_extensions._SpecialForm
|
|
199
|
+
@final
|
|
200
|
+
class _SpecialForm(_Final):
|
|
201
|
+
def __getitem__(self, parameters: Any) -> object: ...
|
|
202
|
+
if sys.version_info >= (3, 10):
|
|
203
|
+
def __or__(self, other: Any) -> _SpecialForm: ...
|
|
204
|
+
def __ror__(self, other: Any) -> _SpecialForm: ...
|
|
205
|
+
|
|
206
|
+
Union: _SpecialForm
|
|
207
|
+
Generic: _SpecialForm
|
|
208
|
+
# Protocol is only present in 3.8 and later, but mypy needs it unconditionally
|
|
209
|
+
Protocol: _SpecialForm
|
|
210
|
+
Callable: _SpecialForm
|
|
211
|
+
Type: _SpecialForm
|
|
212
|
+
NoReturn: _SpecialForm
|
|
213
|
+
ClassVar: _SpecialForm
|
|
214
|
+
|
|
215
|
+
Optional: _SpecialForm
|
|
216
|
+
Tuple: _SpecialForm
|
|
217
|
+
Final: _SpecialForm
|
|
218
|
+
|
|
219
|
+
Literal: _SpecialForm
|
|
220
|
+
TypedDict: _SpecialForm
|
|
221
|
+
|
|
222
|
+
if sys.version_info >= (3, 11):
|
|
223
|
+
Self: _SpecialForm
|
|
224
|
+
Never: _SpecialForm
|
|
225
|
+
Unpack: _SpecialForm
|
|
226
|
+
Required: _SpecialForm
|
|
227
|
+
NotRequired: _SpecialForm
|
|
228
|
+
LiteralString: _SpecialForm
|
|
229
|
+
|
|
230
|
+
@final
|
|
231
|
+
class TypeVarTuple:
|
|
232
|
+
@property
|
|
233
|
+
def __name__(self) -> str: ...
|
|
234
|
+
if sys.version_info >= (3, 13):
|
|
235
|
+
@property
|
|
236
|
+
def __default__(self) -> Any:
|
|
237
|
+
"""The default value for this TypeVarTuple."""
|
|
238
|
+
...
|
|
239
|
+
def has_default(self) -> bool: ...
|
|
240
|
+
if sys.version_info >= (3, 13):
|
|
241
|
+
def __init__(self, name: str, *, default: Any = ...) -> None: ...
|
|
242
|
+
else:
|
|
243
|
+
def __init__(self, name: str) -> None: ...
|
|
244
|
+
|
|
245
|
+
def __iter__(self) -> Any:
|
|
246
|
+
"""Implement iter(self)."""
|
|
247
|
+
...
|
|
248
|
+
def __typing_subst__(self, arg: Never) -> Never: ...
|
|
249
|
+
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
250
|
+
|
|
251
|
+
if sys.version_info >= (3, 10):
|
|
252
|
+
@final
|
|
253
|
+
class ParamSpecArgs:
|
|
254
|
+
@property
|
|
255
|
+
def __origin__(self) -> ParamSpec: ...
|
|
256
|
+
def __init__(self, origin: ParamSpec) -> None: ...
|
|
257
|
+
def __eq__(self, other: object) -> bool:
|
|
258
|
+
"""Return self==value."""
|
|
259
|
+
...
|
|
260
|
+
|
|
261
|
+
@final
|
|
262
|
+
class ParamSpecKwargs:
|
|
263
|
+
@property
|
|
264
|
+
def __origin__(self) -> ParamSpec: ...
|
|
265
|
+
def __init__(self, origin: ParamSpec) -> None: ...
|
|
266
|
+
def __eq__(self, other: object) -> bool:
|
|
267
|
+
"""Return self==value."""
|
|
268
|
+
...
|
|
269
|
+
|
|
270
|
+
@final
|
|
271
|
+
class ParamSpec:
|
|
272
|
+
@property
|
|
273
|
+
def __name__(self) -> str: ...
|
|
274
|
+
@property
|
|
275
|
+
def __bound__(self) -> Any | None: ...
|
|
276
|
+
@property
|
|
277
|
+
def __covariant__(self) -> bool: ...
|
|
278
|
+
@property
|
|
279
|
+
def __contravariant__(self) -> bool: ...
|
|
280
|
+
if sys.version_info >= (3, 12):
|
|
281
|
+
@property
|
|
282
|
+
def __infer_variance__(self) -> bool: ...
|
|
283
|
+
if sys.version_info >= (3, 13):
|
|
284
|
+
@property
|
|
285
|
+
def __default__(self) -> Any:
|
|
286
|
+
"""The default value for this ParamSpec."""
|
|
287
|
+
...
|
|
288
|
+
if sys.version_info >= (3, 13):
|
|
289
|
+
def __init__(
|
|
290
|
+
self,
|
|
291
|
+
name: str,
|
|
292
|
+
*,
|
|
293
|
+
bound: Any | None = None,
|
|
294
|
+
contravariant: bool = False,
|
|
295
|
+
covariant: bool = False,
|
|
296
|
+
infer_variance: bool = False,
|
|
297
|
+
default: Any = ...,
|
|
298
|
+
) -> None: ...
|
|
299
|
+
elif sys.version_info >= (3, 12):
|
|
300
|
+
def __init__(
|
|
301
|
+
self,
|
|
302
|
+
name: str,
|
|
303
|
+
*,
|
|
304
|
+
bound: Any | None = None,
|
|
305
|
+
contravariant: bool = False,
|
|
306
|
+
covariant: bool = False,
|
|
307
|
+
infer_variance: bool = False,
|
|
308
|
+
) -> None: ...
|
|
309
|
+
else:
|
|
310
|
+
def __init__(
|
|
311
|
+
self, name: str, *, bound: Any | None = None, contravariant: bool = False, covariant: bool = False
|
|
312
|
+
) -> None: ...
|
|
313
|
+
|
|
314
|
+
@property
|
|
315
|
+
def args(self) -> ParamSpecArgs:
|
|
316
|
+
"""Represents positional arguments."""
|
|
317
|
+
...
|
|
318
|
+
@property
|
|
319
|
+
def kwargs(self) -> ParamSpecKwargs:
|
|
320
|
+
"""Represents keyword arguments."""
|
|
321
|
+
...
|
|
322
|
+
if sys.version_info >= (3, 11):
|
|
323
|
+
def __typing_subst__(self, arg: Any) -> Any: ...
|
|
324
|
+
def __typing_prepare_subst__(self, alias: Any, args: Any) -> tuple[Any, ...]: ...
|
|
325
|
+
|
|
326
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
327
|
+
"""Return self|value."""
|
|
328
|
+
...
|
|
329
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
330
|
+
"""Return value|self."""
|
|
331
|
+
...
|
|
332
|
+
if sys.version_info >= (3, 13):
|
|
333
|
+
def has_default(self) -> bool: ...
|
|
334
|
+
|
|
335
|
+
Concatenate: _SpecialForm
|
|
336
|
+
TypeAlias: _SpecialForm
|
|
337
|
+
TypeGuard: _SpecialForm
|
|
338
|
+
|
|
339
|
+
class NewType:
|
|
340
|
+
def __init__(self, name: str, tp: Any) -> None: ...
|
|
341
|
+
if sys.version_info >= (3, 11):
|
|
342
|
+
@staticmethod
|
|
343
|
+
def __call__(x: _T, /) -> _T: ...
|
|
344
|
+
else:
|
|
345
|
+
def __call__(self, x: _T) -> _T: ...
|
|
346
|
+
|
|
347
|
+
def __or__(self, other: Any) -> _SpecialForm: ...
|
|
348
|
+
def __ror__(self, other: Any) -> _SpecialForm: ...
|
|
349
|
+
__supertype__: type | NewType
|
|
350
|
+
|
|
351
|
+
else:
|
|
352
|
+
def NewType(name: str, tp: Any) -> Any: ...
|
|
353
|
+
|
|
354
|
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
|
355
|
+
_P = _ParamSpec("_P")
|
|
356
|
+
_T = TypeVar("_T")
|
|
357
|
+
|
|
358
|
+
# These type variables are used by the container types.
|
|
359
|
+
_S = TypeVar("_S")
|
|
360
|
+
_KT = TypeVar("_KT") # Key type.
|
|
361
|
+
_VT = TypeVar("_VT") # Value type.
|
|
362
|
+
_T_co = TypeVar("_T_co", covariant=True) # Any type covariant containers.
|
|
363
|
+
_KT_co = TypeVar("_KT_co", covariant=True) # Key type covariant containers.
|
|
364
|
+
_VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers.
|
|
365
|
+
_TC = TypeVar("_TC", bound=type[object])
|
|
366
|
+
|
|
367
|
+
def overload(func: _F) -> _F: ...
|
|
368
|
+
def no_type_check(arg: _F) -> _F: ...
|
|
369
|
+
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
|
370
|
+
|
|
371
|
+
# This itself is only available during type checking
|
|
372
|
+
def type_check_only(func_or_cls: _F) -> _F: ...
|
|
373
|
+
|
|
374
|
+
# Type aliases and type constructors
|
|
375
|
+
|
|
376
|
+
class _Alias:
|
|
377
|
+
# Class for defining generic aliases for library types.
|
|
378
|
+
def __getitem__(self, typeargs: Any) -> Any: ...
|
|
379
|
+
|
|
380
|
+
List = _Alias()
|
|
381
|
+
Dict = _Alias()
|
|
382
|
+
DefaultDict = _Alias()
|
|
383
|
+
Set = _Alias()
|
|
384
|
+
FrozenSet = _Alias()
|
|
385
|
+
Counter = _Alias()
|
|
386
|
+
Deque = _Alias()
|
|
387
|
+
ChainMap = _Alias()
|
|
388
|
+
|
|
389
|
+
OrderedDict = _Alias()
|
|
390
|
+
|
|
391
|
+
if sys.version_info >= (3, 9):
|
|
392
|
+
Annotated: _SpecialForm
|
|
393
|
+
|
|
394
|
+
# Predefined type variables.
|
|
395
|
+
AnyStr = TypeVar("AnyStr", str, bytes) # noqa: Y001
|
|
396
|
+
|
|
397
|
+
class _ProtocolMeta(ABCMeta):
|
|
398
|
+
if sys.version_info >= (3, 12):
|
|
399
|
+
def __init__(cls, *args: Any, **kwargs: Any) -> None: ...
|
|
400
|
+
|
|
401
|
+
# Abstract base classes.
|
|
402
|
+
|
|
403
|
+
def runtime_checkable(cls: _TC) -> _TC: ...
|
|
404
|
+
@runtime_checkable
|
|
405
|
+
class SupportsInt(Protocol, metaclass=ABCMeta):
|
|
406
|
+
@abstractmethod
|
|
407
|
+
def __int__(self) -> int: ...
|
|
408
|
+
|
|
409
|
+
@runtime_checkable
|
|
410
|
+
class SupportsFloat(Protocol, metaclass=ABCMeta):
|
|
411
|
+
@abstractmethod
|
|
412
|
+
def __float__(self) -> float: ...
|
|
413
|
+
|
|
414
|
+
@runtime_checkable
|
|
415
|
+
class SupportsComplex(Protocol, metaclass=ABCMeta):
|
|
416
|
+
@abstractmethod
|
|
417
|
+
def __complex__(self) -> complex: ...
|
|
418
|
+
|
|
419
|
+
@runtime_checkable
|
|
420
|
+
class SupportsBytes(Protocol, metaclass=ABCMeta):
|
|
421
|
+
@abstractmethod
|
|
422
|
+
def __bytes__(self) -> bytes: ...
|
|
423
|
+
|
|
424
|
+
@runtime_checkable
|
|
425
|
+
class SupportsIndex(Protocol, metaclass=ABCMeta):
|
|
426
|
+
@abstractmethod
|
|
427
|
+
def __index__(self) -> int: ...
|
|
428
|
+
|
|
429
|
+
@runtime_checkable
|
|
430
|
+
class SupportsAbs(Protocol[_T_co]):
|
|
431
|
+
@abstractmethod
|
|
432
|
+
def __abs__(self) -> _T_co: ...
|
|
433
|
+
|
|
434
|
+
@runtime_checkable
|
|
435
|
+
class SupportsRound(Protocol[_T_co]):
|
|
436
|
+
@overload
|
|
437
|
+
@abstractmethod
|
|
438
|
+
def __round__(self) -> int: ...
|
|
439
|
+
@overload
|
|
440
|
+
@abstractmethod
|
|
441
|
+
def __round__(self, ndigits: int, /) -> _T_co: ...
|
|
442
|
+
|
|
443
|
+
@runtime_checkable
|
|
444
|
+
class Sized(Protocol, metaclass=ABCMeta):
|
|
445
|
+
"""A generic version of collections.abc.Sized."""
|
|
446
|
+
@abstractmethod
|
|
447
|
+
def __len__(self) -> int: ...
|
|
448
|
+
|
|
449
|
+
@runtime_checkable
|
|
450
|
+
class Hashable(Protocol, metaclass=ABCMeta):
|
|
451
|
+
"""A generic version of collections.abc.Hashable."""
|
|
452
|
+
# TODO: This is special, in that a subclass of a hashable class may not be hashable
|
|
453
|
+
# (for example, list vs. object). It's not obvious how to represent this. This class
|
|
454
|
+
# is currently mostly useless for static checking.
|
|
455
|
+
@abstractmethod
|
|
456
|
+
def __hash__(self) -> int:
|
|
457
|
+
"""Return hash(self)."""
|
|
458
|
+
...
|
|
459
|
+
|
|
460
|
+
@runtime_checkable
|
|
461
|
+
class Iterable(Protocol[_T_co]):
|
|
462
|
+
"""A generic version of collections.abc.Iterable."""
|
|
463
|
+
@abstractmethod
|
|
464
|
+
def __iter__(self) -> Iterator[_T_co]: ...
|
|
465
|
+
|
|
466
|
+
@runtime_checkable
|
|
467
|
+
class Iterator(Iterable[_T_co], Protocol[_T_co]):
|
|
468
|
+
"""A generic version of collections.abc.Iterator."""
|
|
469
|
+
@abstractmethod
|
|
470
|
+
def __next__(self) -> _T_co: ...
|
|
471
|
+
def __iter__(self) -> Iterator[_T_co]: ...
|
|
472
|
+
|
|
473
|
+
@runtime_checkable
|
|
474
|
+
class Reversible(Iterable[_T_co], Protocol[_T_co]):
|
|
475
|
+
"""A generic version of collections.abc.Reversible."""
|
|
476
|
+
@abstractmethod
|
|
477
|
+
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
478
|
+
|
|
479
|
+
_YieldT_co = TypeVar("_YieldT_co", covariant=True)
|
|
480
|
+
_SendT_contra = TypeVar("_SendT_contra", contravariant=True, default=None)
|
|
481
|
+
_ReturnT_co = TypeVar("_ReturnT_co", covariant=True, default=None)
|
|
482
|
+
|
|
483
|
+
class Generator(Iterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra, _ReturnT_co]):
|
|
484
|
+
"""A generic version of collections.abc.Generator."""
|
|
485
|
+
def __next__(self) -> _YieldT_co: ...
|
|
486
|
+
@abstractmethod
|
|
487
|
+
def send(self, value: _SendT_contra, /) -> _YieldT_co: ...
|
|
488
|
+
@overload
|
|
489
|
+
@abstractmethod
|
|
490
|
+
def throw(
|
|
491
|
+
self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None, /
|
|
492
|
+
) -> _YieldT_co: ...
|
|
493
|
+
@overload
|
|
494
|
+
@abstractmethod
|
|
495
|
+
def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /) -> _YieldT_co: ...
|
|
496
|
+
if sys.version_info >= (3, 13):
|
|
497
|
+
def close(self) -> _ReturnT_co | None: ...
|
|
498
|
+
else:
|
|
499
|
+
def close(self) -> None: ...
|
|
500
|
+
|
|
501
|
+
def __iter__(self) -> Generator[_YieldT_co, _SendT_contra, _ReturnT_co]: ...
|
|
502
|
+
@property
|
|
503
|
+
def gi_code(self) -> CodeType: ...
|
|
504
|
+
@property
|
|
505
|
+
def gi_frame(self) -> FrameType: ...
|
|
506
|
+
@property
|
|
507
|
+
def gi_running(self) -> bool: ...
|
|
508
|
+
@property
|
|
509
|
+
def gi_yieldfrom(self) -> Generator[Any, Any, Any] | None: ...
|
|
510
|
+
|
|
511
|
+
# NOTE: Prior to Python 3.13 these aliases are lacking the second _ExitT_co parameter
|
|
512
|
+
if sys.version_info >= (3, 13):
|
|
513
|
+
from contextlib import AbstractAsyncContextManager as AsyncContextManager, AbstractContextManager as ContextManager
|
|
514
|
+
else:
|
|
515
|
+
from contextlib import AbstractAsyncContextManager, AbstractContextManager
|
|
516
|
+
|
|
517
|
+
@runtime_checkable
|
|
518
|
+
class ContextManager(AbstractContextManager[_T_co, bool | None], Protocol[_T_co]): ...
|
|
519
|
+
|
|
520
|
+
@runtime_checkable
|
|
521
|
+
class AsyncContextManager(AbstractAsyncContextManager[_T_co, bool | None], Protocol[_T_co]): ...
|
|
522
|
+
|
|
523
|
+
@runtime_checkable
|
|
524
|
+
class Awaitable(Protocol[_T_co]):
|
|
525
|
+
"""A generic version of collections.abc.Awaitable."""
|
|
526
|
+
@abstractmethod
|
|
527
|
+
def __await__(self) -> Generator[Any, Any, _T_co]: ...
|
|
528
|
+
|
|
529
|
+
# Non-default variations to accommodate couroutines, and `AwaitableGenerator` having a 4th type parameter.
|
|
530
|
+
_SendT_contra_nd = TypeVar("_SendT_contra_nd", contravariant=True)
|
|
531
|
+
_ReturnT_co_nd = TypeVar("_ReturnT_co_nd", covariant=True)
|
|
532
|
+
|
|
533
|
+
class Coroutine(Awaitable[_ReturnT_co_nd], Generic[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd]):
|
|
534
|
+
"""A generic version of collections.abc.Coroutine."""
|
|
535
|
+
__name__: str
|
|
536
|
+
__qualname__: str
|
|
537
|
+
@property
|
|
538
|
+
def cr_await(self) -> Any | None: ...
|
|
539
|
+
@property
|
|
540
|
+
def cr_code(self) -> CodeType: ...
|
|
541
|
+
@property
|
|
542
|
+
def cr_frame(self) -> FrameType | None: ...
|
|
543
|
+
@property
|
|
544
|
+
def cr_running(self) -> bool: ...
|
|
545
|
+
@abstractmethod
|
|
546
|
+
def send(self, value: _SendT_contra_nd, /) -> _YieldT_co: ...
|
|
547
|
+
@overload
|
|
548
|
+
@abstractmethod
|
|
549
|
+
def throw(
|
|
550
|
+
self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None, /
|
|
551
|
+
) -> _YieldT_co: ...
|
|
552
|
+
@overload
|
|
553
|
+
@abstractmethod
|
|
554
|
+
def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /) -> _YieldT_co: ...
|
|
555
|
+
@abstractmethod
|
|
556
|
+
def close(self) -> None: ...
|
|
557
|
+
|
|
558
|
+
# NOTE: This type does not exist in typing.py or PEP 484 but mypy needs it to exist.
|
|
559
|
+
# The parameters correspond to Generator, but the 4th is the original type.
|
|
560
|
+
@type_check_only
|
|
561
|
+
class AwaitableGenerator(
|
|
562
|
+
Awaitable[_ReturnT_co_nd],
|
|
563
|
+
Generator[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd],
|
|
564
|
+
Generic[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd, _S],
|
|
565
|
+
metaclass=ABCMeta,
|
|
566
|
+
): ...
|
|
567
|
+
|
|
568
|
+
@runtime_checkable
|
|
569
|
+
class AsyncIterable(Protocol[_T_co]):
|
|
570
|
+
"""A generic version of collections.abc.AsyncIterable."""
|
|
571
|
+
@abstractmethod
|
|
572
|
+
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
|
573
|
+
|
|
574
|
+
@runtime_checkable
|
|
575
|
+
class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]):
|
|
576
|
+
"""A generic version of collections.abc.AsyncIterator."""
|
|
577
|
+
@abstractmethod
|
|
578
|
+
def __anext__(self) -> Awaitable[_T_co]: ...
|
|
579
|
+
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
|
580
|
+
|
|
581
|
+
class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra]):
|
|
582
|
+
"""A generic version of collections.abc.AsyncGenerator."""
|
|
583
|
+
def __anext__(self) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
584
|
+
@abstractmethod
|
|
585
|
+
def asend(self, value: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
586
|
+
@overload
|
|
587
|
+
@abstractmethod
|
|
588
|
+
def athrow(
|
|
589
|
+
self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None, /
|
|
590
|
+
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
591
|
+
@overload
|
|
592
|
+
@abstractmethod
|
|
593
|
+
def athrow(
|
|
594
|
+
self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /
|
|
595
|
+
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
|
596
|
+
def aclose(self) -> Coroutine[Any, Any, None]: ...
|
|
597
|
+
@property
|
|
598
|
+
def ag_await(self) -> Any: ...
|
|
599
|
+
@property
|
|
600
|
+
def ag_code(self) -> CodeType: ...
|
|
601
|
+
@property
|
|
602
|
+
def ag_frame(self) -> FrameType: ...
|
|
603
|
+
@property
|
|
604
|
+
def ag_running(self) -> bool: ...
|
|
605
|
+
|
|
606
|
+
@runtime_checkable
|
|
607
|
+
class Container(Protocol[_T_co]):
|
|
608
|
+
"""A generic version of collections.abc.Container."""
|
|
609
|
+
# This is generic more on vibes than anything else
|
|
610
|
+
@abstractmethod
|
|
611
|
+
def __contains__(self, x: object, /) -> bool: ...
|
|
612
|
+
|
|
613
|
+
@runtime_checkable
|
|
614
|
+
class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
|
|
615
|
+
"""A generic version of collections.abc.Collection."""
|
|
616
|
+
# Implement Sized (but don't have it as a base class).
|
|
617
|
+
@abstractmethod
|
|
618
|
+
def __len__(self) -> int: ...
|
|
619
|
+
|
|
620
|
+
class Sequence(Reversible[_T_co], Collection[_T_co]):
|
|
621
|
+
"""A generic version of collections.abc.Sequence."""
|
|
622
|
+
@overload
|
|
623
|
+
@abstractmethod
|
|
624
|
+
def __getitem__(self, index: int) -> _T_co: ...
|
|
625
|
+
@overload
|
|
626
|
+
@abstractmethod
|
|
627
|
+
def __getitem__(self, index: slice) -> Sequence[_T_co]: ...
|
|
628
|
+
# Mixin methods
|
|
629
|
+
def index(self, value: Any, start: int = 0, stop: int = ...) -> int: ...
|
|
630
|
+
def count(self, value: Any) -> int: ...
|
|
631
|
+
def __contains__(self, value: object) -> bool: ...
|
|
632
|
+
def __iter__(self) -> Iterator[_T_co]: ...
|
|
633
|
+
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
634
|
+
|
|
635
|
+
class MutableSequence(Sequence[_T]):
|
|
636
|
+
"""A generic version of collections.abc.MutableSequence."""
|
|
637
|
+
@abstractmethod
|
|
638
|
+
def insert(self, index: int, value: _T) -> None: ...
|
|
639
|
+
@overload
|
|
640
|
+
@abstractmethod
|
|
641
|
+
def __getitem__(self, index: int) -> _T: ...
|
|
642
|
+
@overload
|
|
643
|
+
@abstractmethod
|
|
644
|
+
def __getitem__(self, index: slice) -> MutableSequence[_T]: ...
|
|
645
|
+
@overload
|
|
646
|
+
@abstractmethod
|
|
647
|
+
def __setitem__(self, index: int, value: _T) -> None: ...
|
|
648
|
+
@overload
|
|
649
|
+
@abstractmethod
|
|
650
|
+
def __setitem__(self, index: slice, value: Iterable[_T]) -> None: ...
|
|
651
|
+
@overload
|
|
652
|
+
@abstractmethod
|
|
653
|
+
def __delitem__(self, index: int) -> None: ...
|
|
654
|
+
@overload
|
|
655
|
+
@abstractmethod
|
|
656
|
+
def __delitem__(self, index: slice) -> None: ...
|
|
657
|
+
# Mixin methods
|
|
658
|
+
def append(self, value: _T) -> None: ...
|
|
659
|
+
def clear(self) -> None: ...
|
|
660
|
+
def extend(self, values: Iterable[_T]) -> None: ...
|
|
661
|
+
def reverse(self) -> None: ...
|
|
662
|
+
def pop(self, index: int = -1) -> _T: ...
|
|
663
|
+
def remove(self, value: _T) -> None: ...
|
|
664
|
+
def __iadd__(self, values: Iterable[_T]) -> typing_extensions.Self: ...
|
|
665
|
+
|
|
666
|
+
class AbstractSet(Collection[_T_co]):
|
|
667
|
+
"""A generic version of collections.abc.Set."""
|
|
668
|
+
@abstractmethod
|
|
669
|
+
def __contains__(self, x: object) -> bool: ...
|
|
670
|
+
def _hash(self) -> int: ...
|
|
671
|
+
# Mixin methods
|
|
672
|
+
def __le__(self, other: AbstractSet[Any]) -> bool:
|
|
673
|
+
"""Return self<=value."""
|
|
674
|
+
...
|
|
675
|
+
def __lt__(self, other: AbstractSet[Any]) -> bool:
|
|
676
|
+
"""Return self<value."""
|
|
677
|
+
...
|
|
678
|
+
def __gt__(self, other: AbstractSet[Any]) -> bool:
|
|
679
|
+
"""Return self>value."""
|
|
680
|
+
...
|
|
681
|
+
def __ge__(self, other: AbstractSet[Any]) -> bool:
|
|
682
|
+
"""Return self>=value."""
|
|
683
|
+
...
|
|
684
|
+
def __and__(self, other: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
|
685
|
+
def __or__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
|
686
|
+
def __sub__(self, other: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
|
687
|
+
def __xor__(self, other: AbstractSet[_T]) -> AbstractSet[_T_co | _T]: ...
|
|
688
|
+
def __eq__(self, other: object) -> bool:
|
|
689
|
+
"""Return self==value."""
|
|
690
|
+
...
|
|
691
|
+
def isdisjoint(self, other: Iterable[Any]) -> bool: ...
|
|
692
|
+
|
|
693
|
+
class MutableSet(AbstractSet[_T]):
|
|
694
|
+
"""A generic version of collections.abc.MutableSet."""
|
|
695
|
+
@abstractmethod
|
|
696
|
+
def add(self, value: _T) -> None: ...
|
|
697
|
+
@abstractmethod
|
|
698
|
+
def discard(self, value: _T) -> None: ...
|
|
699
|
+
# Mixin methods
|
|
700
|
+
def clear(self) -> None: ...
|
|
701
|
+
def pop(self) -> _T: ...
|
|
702
|
+
def remove(self, value: _T) -> None: ...
|
|
703
|
+
def __ior__(self, it: AbstractSet[_T]) -> typing_extensions.Self: ... # type: ignore[override,misc]
|
|
704
|
+
def __iand__(self, it: AbstractSet[Any]) -> typing_extensions.Self: ...
|
|
705
|
+
def __ixor__(self, it: AbstractSet[_T]) -> typing_extensions.Self: ... # type: ignore[override,misc]
|
|
706
|
+
def __isub__(self, it: AbstractSet[Any]) -> typing_extensions.Self: ...
|
|
707
|
+
|
|
708
|
+
class MappingView(Sized):
|
|
709
|
+
"""A generic version of collections.abc.MappingView."""
|
|
710
|
+
def __init__(self, mapping: Mapping[Any, Any]) -> None: ... # undocumented
|
|
711
|
+
def __len__(self) -> int: ...
|
|
712
|
+
|
|
713
|
+
class ItemsView(MappingView, AbstractSet[tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]):
|
|
714
|
+
"""A generic version of collections.abc.ItemsView."""
|
|
715
|
+
def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... # undocumented
|
|
716
|
+
def __and__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ...
|
|
717
|
+
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
718
|
+
def __contains__(self, item: object) -> bool: ...
|
|
719
|
+
def __iter__(self) -> Iterator[tuple[_KT_co, _VT_co]]: ...
|
|
720
|
+
def __or__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
721
|
+
def __ror__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
722
|
+
def __sub__(self, other: Iterable[Any]) -> set[tuple[_KT_co, _VT_co]]: ...
|
|
723
|
+
def __rsub__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
724
|
+
def __xor__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
725
|
+
def __rxor__(self, other: Iterable[_T]) -> set[tuple[_KT_co, _VT_co] | _T]: ...
|
|
726
|
+
|
|
727
|
+
class KeysView(MappingView, AbstractSet[_KT_co]):
|
|
728
|
+
"""A generic version of collections.abc.KeysView."""
|
|
729
|
+
def __init__(self, mapping: Mapping[_KT_co, Any]) -> None: ... # undocumented
|
|
730
|
+
def __and__(self, other: Iterable[Any]) -> set[_KT_co]: ...
|
|
731
|
+
def __rand__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
732
|
+
def __contains__(self, key: object) -> bool: ...
|
|
733
|
+
def __iter__(self) -> Iterator[_KT_co]: ...
|
|
734
|
+
def __or__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ...
|
|
735
|
+
def __ror__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ...
|
|
736
|
+
def __sub__(self, other: Iterable[Any]) -> set[_KT_co]: ...
|
|
737
|
+
def __rsub__(self, other: Iterable[_T]) -> set[_T]: ...
|
|
738
|
+
def __xor__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ...
|
|
739
|
+
def __rxor__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ...
|
|
740
|
+
|
|
741
|
+
class ValuesView(MappingView, Collection[_VT_co]):
|
|
742
|
+
"""A generic version of collections.abc.ValuesView."""
|
|
743
|
+
def __init__(self, mapping: Mapping[Any, _VT_co]) -> None: ... # undocumented
|
|
744
|
+
def __contains__(self, value: object) -> bool: ...
|
|
745
|
+
def __iter__(self) -> Iterator[_VT_co]: ...
|
|
746
|
+
|
|
747
|
+
class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
|
|
748
|
+
"""A generic version of collections.abc.Mapping."""
|
|
749
|
+
# TODO: We wish the key type could also be covariant, but that doesn't work,
|
|
750
|
+
# see discussion in https://github.com/python/typing/pull/273.
|
|
751
|
+
@abstractmethod
|
|
752
|
+
def __getitem__(self, key: _KT, /) -> _VT_co: ...
|
|
753
|
+
# Mixin methods
|
|
754
|
+
@overload
|
|
755
|
+
def get(self, key: _KT, /) -> _VT_co | None: ...
|
|
756
|
+
@overload
|
|
757
|
+
def get(self, key: _KT, /, default: _VT_co | _T) -> _VT_co | _T: ...
|
|
758
|
+
def items(self) -> ItemsView[_KT, _VT_co]: ...
|
|
759
|
+
def keys(self) -> KeysView[_KT]: ...
|
|
760
|
+
def values(self) -> ValuesView[_VT_co]: ...
|
|
761
|
+
def __contains__(self, key: object, /) -> bool: ...
|
|
762
|
+
def __eq__(self, other: object, /) -> bool:
|
|
763
|
+
"""Return self==value."""
|
|
764
|
+
...
|
|
765
|
+
|
|
766
|
+
class MutableMapping(Mapping[_KT, _VT]):
|
|
767
|
+
"""A generic version of collections.abc.MutableMapping."""
|
|
768
|
+
@abstractmethod
|
|
769
|
+
def __setitem__(self, key: _KT, value: _VT, /) -> None: ...
|
|
770
|
+
@abstractmethod
|
|
771
|
+
def __delitem__(self, key: _KT, /) -> None: ...
|
|
772
|
+
def clear(self) -> None: ...
|
|
773
|
+
@overload
|
|
774
|
+
def pop(self, key: _KT, /) -> _VT: ...
|
|
775
|
+
@overload
|
|
776
|
+
def pop(self, key: _KT, /, default: _VT) -> _VT: ...
|
|
777
|
+
@overload
|
|
778
|
+
def pop(self, key: _KT, /, default: _T) -> _VT | _T: ...
|
|
779
|
+
def popitem(self) -> tuple[_KT, _VT]: ...
|
|
780
|
+
# This overload should be allowed only if the value type is compatible with None.
|
|
781
|
+
#
|
|
782
|
+
# Keep the following methods in line with MutableMapping.setdefault, modulo positional-only differences:
|
|
783
|
+
# -- collections.OrderedDict.setdefault
|
|
784
|
+
# -- collections.ChainMap.setdefault
|
|
785
|
+
# -- weakref.WeakKeyDictionary.setdefault
|
|
786
|
+
@overload
|
|
787
|
+
def setdefault(self: MutableMapping[_KT, _T | None], key: _KT, default: None = None, /) -> _T | None: ...
|
|
788
|
+
@overload
|
|
789
|
+
def setdefault(self, key: _KT, default: _VT, /) -> _VT: ...
|
|
790
|
+
# 'update' used to take a Union, but using overloading is better.
|
|
791
|
+
# The second overloaded type here is a bit too general, because
|
|
792
|
+
# Mapping[tuple[_KT, _VT], W] is a subclass of Iterable[tuple[_KT, _VT]],
|
|
793
|
+
# but will always have the behavior of the first overloaded type
|
|
794
|
+
# at runtime, leading to keys of a mix of types _KT and tuple[_KT, _VT].
|
|
795
|
+
# We don't currently have any way of forcing all Mappings to use
|
|
796
|
+
# the first overload, but by using overloading rather than a Union,
|
|
797
|
+
# mypy will commit to using the first overload when the argument is
|
|
798
|
+
# known to be a Mapping with unknown type parameters, which is closer
|
|
799
|
+
# to the behavior we want. See mypy issue #1430.
|
|
800
|
+
#
|
|
801
|
+
# Various mapping classes have __ior__ methods that should be kept roughly in line with .update():
|
|
802
|
+
# -- dict.__ior__
|
|
803
|
+
# -- os._Environ.__ior__
|
|
804
|
+
# -- collections.UserDict.__ior__
|
|
805
|
+
# -- collections.ChainMap.__ior__
|
|
806
|
+
# -- peewee.attrdict.__add__
|
|
807
|
+
# -- peewee.attrdict.__iadd__
|
|
808
|
+
# -- weakref.WeakValueDictionary.__ior__
|
|
809
|
+
# -- weakref.WeakKeyDictionary.__ior__
|
|
810
|
+
@overload
|
|
811
|
+
def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /, **kwargs: _VT) -> None: ...
|
|
812
|
+
@overload
|
|
813
|
+
def update(self, m: Iterable[tuple[_KT, _VT]], /, **kwargs: _VT) -> None: ...
|
|
814
|
+
@overload
|
|
815
|
+
def update(self, **kwargs: _VT) -> None: ...
|
|
816
|
+
|
|
817
|
+
Text = str
|
|
818
|
+
|
|
819
|
+
TYPE_CHECKING: bool
|
|
820
|
+
|
|
821
|
+
# In stubs, the arguments of the IO class are marked as positional-only.
|
|
822
|
+
# This differs from runtime, but better reflects the fact that in reality
|
|
823
|
+
# classes deriving from IO use different names for the arguments.
|
|
824
|
+
class IO(Generic[AnyStr]):
|
|
825
|
+
# At runtime these are all abstract properties,
|
|
826
|
+
# but making them abstract in the stub is hugely disruptive, for not much gain.
|
|
827
|
+
# See #8726
|
|
828
|
+
@property
|
|
829
|
+
def mode(self) -> str: ...
|
|
830
|
+
# Usually str, but may be bytes if a bytes path was passed to open(). See #10737.
|
|
831
|
+
# If PEP 696 becomes available, we may want to use a defaulted TypeVar here.
|
|
832
|
+
@property
|
|
833
|
+
def name(self) -> str | Any: ...
|
|
834
|
+
@abstractmethod
|
|
835
|
+
def close(self) -> None: ...
|
|
836
|
+
@property
|
|
837
|
+
def closed(self) -> bool: ...
|
|
838
|
+
@abstractmethod
|
|
839
|
+
def fileno(self) -> int: ...
|
|
840
|
+
@abstractmethod
|
|
841
|
+
def flush(self) -> None: ...
|
|
842
|
+
@abstractmethod
|
|
843
|
+
def isatty(self) -> bool: ...
|
|
844
|
+
@abstractmethod
|
|
845
|
+
def read(self, n: int = -1, /) -> AnyStr: ...
|
|
846
|
+
@abstractmethod
|
|
847
|
+
def readable(self) -> bool: ...
|
|
848
|
+
@abstractmethod
|
|
849
|
+
def readline(self, limit: int = -1, /) -> AnyStr: ...
|
|
850
|
+
@abstractmethod
|
|
851
|
+
def readlines(self, hint: int = -1, /) -> list[AnyStr]: ...
|
|
852
|
+
@abstractmethod
|
|
853
|
+
def seek(self, offset: int, whence: int = 0, /) -> int: ...
|
|
854
|
+
@abstractmethod
|
|
855
|
+
def seekable(self) -> bool: ...
|
|
856
|
+
@abstractmethod
|
|
857
|
+
def tell(self) -> int: ...
|
|
858
|
+
@abstractmethod
|
|
859
|
+
def truncate(self, size: int | None = None, /) -> int: ...
|
|
860
|
+
@abstractmethod
|
|
861
|
+
def writable(self) -> bool: ...
|
|
862
|
+
@abstractmethod
|
|
863
|
+
@overload
|
|
864
|
+
def write(self: IO[bytes], s: ReadableBuffer, /) -> int: ...
|
|
865
|
+
@abstractmethod
|
|
866
|
+
@overload
|
|
867
|
+
def write(self, s: AnyStr, /) -> int: ...
|
|
868
|
+
@abstractmethod
|
|
869
|
+
@overload
|
|
870
|
+
def writelines(self: IO[bytes], lines: Iterable[ReadableBuffer], /) -> None: ...
|
|
871
|
+
@abstractmethod
|
|
872
|
+
@overload
|
|
873
|
+
def writelines(self, lines: Iterable[AnyStr], /) -> None: ...
|
|
874
|
+
@abstractmethod
|
|
875
|
+
def __next__(self) -> AnyStr: ...
|
|
876
|
+
@abstractmethod
|
|
877
|
+
def __iter__(self) -> Iterator[AnyStr]: ...
|
|
878
|
+
@abstractmethod
|
|
879
|
+
def __enter__(self) -> IO[AnyStr]: ...
|
|
880
|
+
@abstractmethod
|
|
881
|
+
def __exit__(
|
|
882
|
+
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None, /
|
|
883
|
+
) -> None: ...
|
|
884
|
+
|
|
885
|
+
class BinaryIO(IO[bytes]):
|
|
886
|
+
@abstractmethod
|
|
887
|
+
def __enter__(self) -> BinaryIO: ...
|
|
888
|
+
|
|
889
|
+
class TextIO(IO[str]):
|
|
890
|
+
# See comment regarding the @properties in the `IO` class
|
|
891
|
+
@property
|
|
892
|
+
def buffer(self) -> BinaryIO: ...
|
|
893
|
+
@property
|
|
894
|
+
def encoding(self) -> str: ...
|
|
895
|
+
@property
|
|
896
|
+
def errors(self) -> str | None: ...
|
|
897
|
+
@property
|
|
898
|
+
def line_buffering(self) -> int: ... # int on PyPy, bool on CPython
|
|
899
|
+
@property
|
|
900
|
+
def newlines(self) -> Any: ... # None, str or tuple
|
|
901
|
+
@abstractmethod
|
|
902
|
+
def __enter__(self) -> TextIO: ...
|
|
903
|
+
|
|
904
|
+
if sys.version_info < (3, 14):
|
|
905
|
+
ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
|
|
906
|
+
|
|
907
|
+
# Functions
|
|
908
|
+
|
|
909
|
+
_get_type_hints_obj_allowed_types: typing_extensions.TypeAlias = ( # noqa: Y042
|
|
910
|
+
object
|
|
911
|
+
| Callable[..., Any]
|
|
912
|
+
| FunctionType
|
|
913
|
+
| BuiltinFunctionType
|
|
914
|
+
| MethodType
|
|
915
|
+
| ModuleType
|
|
916
|
+
| WrapperDescriptorType
|
|
917
|
+
| MethodWrapperType
|
|
918
|
+
| MethodDescriptorType
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
if sys.version_info >= (3, 9):
|
|
922
|
+
def get_type_hints(
|
|
923
|
+
obj: _get_type_hints_obj_allowed_types,
|
|
924
|
+
globalns: dict[str, Any] | None = None,
|
|
925
|
+
localns: Mapping[str, Any] | None = None,
|
|
926
|
+
include_extras: bool = False,
|
|
927
|
+
) -> dict[str, Any]: ...
|
|
928
|
+
|
|
929
|
+
else:
|
|
930
|
+
def get_type_hints(
|
|
931
|
+
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = None, localns: Mapping[str, Any] | None = None
|
|
932
|
+
) -> dict[str, Any]: ...
|
|
933
|
+
|
|
934
|
+
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
|
935
|
+
|
|
936
|
+
if sys.version_info >= (3, 10):
|
|
937
|
+
@overload
|
|
938
|
+
def get_origin(tp: ParamSpecArgs | ParamSpecKwargs) -> ParamSpec: ...
|
|
939
|
+
@overload
|
|
940
|
+
def get_origin(tp: UnionType) -> type[UnionType]: ...
|
|
941
|
+
|
|
942
|
+
if sys.version_info >= (3, 9):
|
|
943
|
+
@overload
|
|
944
|
+
def get_origin(tp: GenericAlias) -> type: ...
|
|
945
|
+
@overload
|
|
946
|
+
def get_origin(tp: Any) -> Any | None: ...
|
|
947
|
+
|
|
948
|
+
else:
|
|
949
|
+
def get_origin(tp: Any) -> Any | None: ...
|
|
950
|
+
|
|
951
|
+
@overload
|
|
952
|
+
def cast(typ: type[_T], val: Any) -> _T: ...
|
|
953
|
+
@overload
|
|
954
|
+
def cast(typ: str, val: Any) -> Any: ...
|
|
955
|
+
@overload
|
|
956
|
+
def cast(typ: object, val: Any) -> Any: ...
|
|
957
|
+
|
|
958
|
+
if sys.version_info >= (3, 11):
|
|
959
|
+
def reveal_type(obj: _T, /) -> _T: ...
|
|
960
|
+
def assert_never(arg: Never, /) -> Never: ...
|
|
961
|
+
def assert_type(val: _T, typ: Any, /) -> _T: ...
|
|
962
|
+
def clear_overloads() -> None: ...
|
|
963
|
+
def get_overloads(func: Callable[..., object]) -> Sequence[Callable[..., object]]: ...
|
|
964
|
+
def dataclass_transform(
|
|
965
|
+
*,
|
|
966
|
+
eq_default: bool = True,
|
|
967
|
+
order_default: bool = False,
|
|
968
|
+
kw_only_default: bool = False,
|
|
969
|
+
frozen_default: bool = False, # on 3.11, runtime accepts it as part of kwargs
|
|
970
|
+
field_specifiers: tuple[type[Any] | Callable[..., Any], ...] = (),
|
|
971
|
+
**kwargs: Any,
|
|
972
|
+
) -> IdentityFunction: ...
|
|
973
|
+
|
|
974
|
+
# Type constructors
|
|
975
|
+
|
|
976
|
+
class NamedTuple(tuple[Any, ...]):
|
|
977
|
+
if sys.version_info < (3, 9):
|
|
978
|
+
_field_types: ClassVar[dict[str, type]]
|
|
979
|
+
_field_defaults: ClassVar[dict[str, Any]]
|
|
980
|
+
_fields: ClassVar[tuple[str, ...]]
|
|
981
|
+
# __orig_bases__ sometimes exists on <3.12, but not consistently
|
|
982
|
+
# So we only add it to the stub on 3.12+.
|
|
983
|
+
if sys.version_info >= (3, 12):
|
|
984
|
+
__orig_bases__: ClassVar[tuple[Any, ...]]
|
|
985
|
+
|
|
986
|
+
@overload
|
|
987
|
+
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]], /) -> None:
|
|
988
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
989
|
+
...
|
|
990
|
+
@overload
|
|
991
|
+
@typing_extensions.deprecated(
|
|
992
|
+
"Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15"
|
|
993
|
+
)
|
|
994
|
+
def __init__(self, typename: str, fields: None = None, /, **kwargs: Any) -> None:
|
|
995
|
+
"""Initialize self. See help(type(self)) for accurate signature."""
|
|
996
|
+
...
|
|
997
|
+
@classmethod
|
|
998
|
+
def _make(cls, iterable: Iterable[Any]) -> typing_extensions.Self: ...
|
|
999
|
+
def _asdict(self) -> dict[str, Any]: ...
|
|
1000
|
+
def _replace(self, **kwargs: Any) -> typing_extensions.Self: ...
|
|
1001
|
+
if sys.version_info >= (3, 13):
|
|
1002
|
+
def __replace__(self, **kwargs: Any) -> typing_extensions.Self: ...
|
|
1003
|
+
|
|
1004
|
+
# Internal mypy fallback type for all typed dicts (does not exist at runtime)
|
|
1005
|
+
# N.B. Keep this mostly in sync with typing_extensions._TypedDict/mypy_extensions._TypedDict
|
|
1006
|
+
@type_check_only
|
|
1007
|
+
class _TypedDict(Mapping[str, object], metaclass=ABCMeta):
|
|
1008
|
+
__total__: ClassVar[bool]
|
|
1009
|
+
if sys.version_info >= (3, 9):
|
|
1010
|
+
__required_keys__: ClassVar[frozenset[str]]
|
|
1011
|
+
__optional_keys__: ClassVar[frozenset[str]]
|
|
1012
|
+
# __orig_bases__ sometimes exists on <3.12, but not consistently,
|
|
1013
|
+
# so we only add it to the stub on 3.12+
|
|
1014
|
+
if sys.version_info >= (3, 12):
|
|
1015
|
+
__orig_bases__: ClassVar[tuple[Any, ...]]
|
|
1016
|
+
|
|
1017
|
+
def copy(self) -> typing_extensions.Self: ...
|
|
1018
|
+
# Using Never so that only calls using mypy plugin hook that specialize the signature
|
|
1019
|
+
# can go through.
|
|
1020
|
+
def setdefault(self, k: _Never, default: object) -> object: ...
|
|
1021
|
+
# Mypy plugin hook for 'pop' expects that 'default' has a type variable type.
|
|
1022
|
+
def pop(self, k: _Never, default: _T = ...) -> object: ... # pyright: ignore[reportInvalidTypeVarUse]
|
|
1023
|
+
def update(self: _T, m: _T, /) -> None: ...
|
|
1024
|
+
def __delitem__(self, k: _Never) -> None: ...
|
|
1025
|
+
def items(self) -> dict_items[str, object]: ...
|
|
1026
|
+
def keys(self) -> dict_keys[str, object]: ...
|
|
1027
|
+
def values(self) -> dict_values[str, object]: ...
|
|
1028
|
+
if sys.version_info >= (3, 9):
|
|
1029
|
+
@overload
|
|
1030
|
+
def __or__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1031
|
+
"""Return self|value."""
|
|
1032
|
+
...
|
|
1033
|
+
@overload
|
|
1034
|
+
def __or__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1035
|
+
"""Return self|value."""
|
|
1036
|
+
...
|
|
1037
|
+
@overload
|
|
1038
|
+
def __ror__(self, value: typing_extensions.Self, /) -> typing_extensions.Self:
|
|
1039
|
+
"""Return value|self."""
|
|
1040
|
+
...
|
|
1041
|
+
@overload
|
|
1042
|
+
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]:
|
|
1043
|
+
"""Return value|self."""
|
|
1044
|
+
...
|
|
1045
|
+
# supposedly incompatible definitions of __or__ and __ior__
|
|
1046
|
+
def __ior__(self, value: typing_extensions.Self, /) -> typing_extensions.Self: ... # type: ignore[misc]
|
|
1047
|
+
|
|
1048
|
+
@final
|
|
1049
|
+
class ForwardRef(_Final):
|
|
1050
|
+
__forward_arg__: str
|
|
1051
|
+
__forward_code__: CodeType
|
|
1052
|
+
__forward_evaluated__: bool
|
|
1053
|
+
__forward_value__: Any | None
|
|
1054
|
+
__forward_is_argument__: bool
|
|
1055
|
+
__forward_is_class__: bool
|
|
1056
|
+
__forward_module__: Any | None
|
|
1057
|
+
if sys.version_info >= (3, 9):
|
|
1058
|
+
# The module and is_class arguments were added in later Python 3.9 versions.
|
|
1059
|
+
def __init__(self, arg: str, is_argument: bool = True, module: Any | None = None, *, is_class: bool = False) -> None: ...
|
|
1060
|
+
else:
|
|
1061
|
+
def __init__(self, arg: str, is_argument: bool = True) -> None: ...
|
|
1062
|
+
|
|
1063
|
+
if sys.version_info >= (3, 13):
|
|
1064
|
+
@overload
|
|
1065
|
+
@deprecated(
|
|
1066
|
+
"Failing to pass a value to the 'type_params' parameter of ForwardRef._evaluate() is deprecated, "
|
|
1067
|
+
"as it leads to incorrect behaviour when evaluating a stringified annotation "
|
|
1068
|
+
"that references a PEP 695 type parameter. It will be disallowed in Python 3.15."
|
|
1069
|
+
)
|
|
1070
|
+
def _evaluate(
|
|
1071
|
+
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, *, recursive_guard: frozenset[str]
|
|
1072
|
+
) -> Any | None: ...
|
|
1073
|
+
@overload
|
|
1074
|
+
def _evaluate(
|
|
1075
|
+
self,
|
|
1076
|
+
globalns: dict[str, Any] | None,
|
|
1077
|
+
localns: Mapping[str, Any] | None,
|
|
1078
|
+
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...],
|
|
1079
|
+
*,
|
|
1080
|
+
recursive_guard: frozenset[str],
|
|
1081
|
+
) -> Any | None: ...
|
|
1082
|
+
elif sys.version_info >= (3, 12):
|
|
1083
|
+
def _evaluate(
|
|
1084
|
+
self,
|
|
1085
|
+
globalns: dict[str, Any] | None,
|
|
1086
|
+
localns: Mapping[str, Any] | None,
|
|
1087
|
+
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
|
|
1088
|
+
*,
|
|
1089
|
+
recursive_guard: frozenset[str],
|
|
1090
|
+
) -> Any | None: ...
|
|
1091
|
+
elif sys.version_info >= (3, 9):
|
|
1092
|
+
def _evaluate(
|
|
1093
|
+
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, recursive_guard: frozenset[str]
|
|
1094
|
+
) -> Any | None: ...
|
|
1095
|
+
else:
|
|
1096
|
+
def _evaluate(self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None) -> Any | None: ...
|
|
1097
|
+
|
|
1098
|
+
def __eq__(self, other: object) -> bool: ...
|
|
1099
|
+
def __hash__(self) -> int: ...
|
|
1100
|
+
if sys.version_info >= (3, 11):
|
|
1101
|
+
def __or__(self, other: Any) -> _SpecialForm: ...
|
|
1102
|
+
def __ror__(self, other: Any) -> _SpecialForm: ...
|
|
1103
|
+
|
|
1104
|
+
if sys.version_info >= (3, 10):
|
|
1105
|
+
def is_typeddict(tp: object) -> bool: ...
|
|
1106
|
+
|
|
1107
|
+
def _type_repr(obj: object) -> str: ...
|
|
1108
|
+
|
|
1109
|
+
if sys.version_info >= (3, 12):
|
|
1110
|
+
def override(method: _F, /) -> _F: ...
|
|
1111
|
+
@final
|
|
1112
|
+
class TypeAliasType:
|
|
1113
|
+
def __init__(
|
|
1114
|
+
self, name: str, value: Any, *, type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ()
|
|
1115
|
+
) -> None: ...
|
|
1116
|
+
@property
|
|
1117
|
+
def __value__(self) -> Any: ...
|
|
1118
|
+
@property
|
|
1119
|
+
def __type_params__(self) -> tuple[TypeVar | ParamSpec | TypeVarTuple, ...]: ...
|
|
1120
|
+
@property
|
|
1121
|
+
def __parameters__(self) -> tuple[Any, ...]: ...
|
|
1122
|
+
@property
|
|
1123
|
+
def __name__(self) -> str: ...
|
|
1124
|
+
# It's writable on types, but not on instances of TypeAliasType.
|
|
1125
|
+
@property
|
|
1126
|
+
def __module__(self) -> str | None: ... # type: ignore[override]
|
|
1127
|
+
def __getitem__(self, parameters: Any) -> GenericAlias:
|
|
1128
|
+
"""Return self[key]."""
|
|
1129
|
+
...
|
|
1130
|
+
def __or__(self, right: Any) -> _SpecialForm:
|
|
1131
|
+
"""Return self|value."""
|
|
1132
|
+
...
|
|
1133
|
+
def __ror__(self, left: Any) -> _SpecialForm:
|
|
1134
|
+
"""Return value|self."""
|
|
1135
|
+
...
|
|
1136
|
+
|
|
1137
|
+
if sys.version_info >= (3, 13):
|
|
1138
|
+
def is_protocol(tp: type, /) -> bool: ...
|
|
1139
|
+
def get_protocol_members(tp: type, /) -> frozenset[str]: ...
|
|
1140
|
+
@final
|
|
1141
|
+
class _NoDefaultType: ...
|
|
1142
|
+
|
|
1143
|
+
NoDefault: _NoDefaultType
|
|
1144
|
+
TypeIs: _SpecialForm
|
|
1145
|
+
ReadOnly: _SpecialForm
|