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.
Files changed (679) hide show
  1. package/README.md +3 -3
  2. package/dist/pyright-langserver.js +1 -1
  3. package/dist/pyright-langserver.js.LICENSE.txt +42 -0
  4. package/dist/pyright-langserver.js.map +1 -1
  5. package/dist/pyright.js +1 -1
  6. package/dist/pyright.js.map +1 -1
  7. package/dist/typeshed-fallback/commit.txt +1 -1
  8. package/dist/typeshed-fallback/stdlib/VERSIONS +9 -0
  9. package/dist/typeshed-fallback/stdlib/__future__.pyi +36 -36
  10. package/dist/typeshed-fallback/stdlib/__main__.pyi +3 -3
  11. package/dist/typeshed-fallback/stdlib/_ast.pyi +149 -149
  12. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +320 -342
  13. package/dist/typeshed-fallback/stdlib/_bisect.pyi +189 -229
  14. package/dist/typeshed-fallback/stdlib/_blake2.pyi +137 -137
  15. package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/_bz2.pyi +71 -71
  17. package/dist/typeshed-fallback/stdlib/_codecs.pyi +247 -244
  18. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +124 -115
  19. package/dist/typeshed-fallback/stdlib/_compat_pickle.pyi +8 -8
  20. package/dist/typeshed-fallback/stdlib/_compression.pyi +25 -25
  21. package/dist/typeshed-fallback/stdlib/_contextvars.pyi +146 -146
  22. package/dist/typeshed-fallback/stdlib/_csv.pyi +232 -172
  23. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +435 -304
  24. package/dist/typeshed-fallback/stdlib/_curses.pyi +2 -6
  25. package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +67 -0
  26. package/dist/typeshed-fallback/stdlib/_dbm.pyi +8 -19
  27. package/dist/typeshed-fallback/stdlib/_decimal.pyi +80 -94
  28. package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
  29. package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
  30. package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +114 -114
  31. package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +178 -178
  32. package/dist/typeshed-fallback/stdlib/_gdbm.pyi +2 -65
  33. package/dist/typeshed-fallback/stdlib/_hashlib.pyi +232 -0
  34. package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
  35. package/dist/typeshed-fallback/stdlib/_imp.pyi +81 -83
  36. package/dist/typeshed-fallback/stdlib/_io.pyi +719 -719
  37. package/dist/typeshed-fallback/stdlib/_json.pyi +99 -92
  38. package/dist/typeshed-fallback/stdlib/_locale.pyi +155 -155
  39. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +94 -94
  40. package/dist/typeshed-fallback/stdlib/_lzma.pyi +158 -158
  41. package/dist/typeshed-fallback/stdlib/_markupbase.pyi +16 -16
  42. package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
  43. package/dist/typeshed-fallback/stdlib/_multibytecodec.pyi +44 -0
  44. package/dist/typeshed-fallback/stdlib/_operator.pyi +261 -261
  45. package/dist/typeshed-fallback/stdlib/_osx_support.pyi +34 -34
  46. package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +0 -1
  47. package/dist/typeshed-fallback/stdlib/_py_abc.pyi +14 -14
  48. package/dist/typeshed-fallback/stdlib/_pydecimal.pyi +43 -43
  49. package/dist/typeshed-fallback/stdlib/_queue.pyi +67 -67
  50. package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
  51. package/dist/typeshed-fallback/stdlib/_sitebuiltins.pyi +16 -16
  52. package/dist/typeshed-fallback/stdlib/_socket.pyi +1367 -1317
  53. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +360 -402
  54. package/dist/typeshed-fallback/stdlib/_ssl.pyi +399 -406
  55. package/dist/typeshed-fallback/stdlib/_stat.pyi +257 -257
  56. package/dist/typeshed-fallback/stdlib/_struct.pyi +147 -147
  57. package/dist/typeshed-fallback/stdlib/_thread.pyi +266 -257
  58. package/dist/typeshed-fallback/stdlib/_threading_local.pyi +22 -18
  59. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +165 -165
  60. package/dist/typeshed-fallback/stdlib/_tracemalloc.pyi +78 -78
  61. package/dist/typeshed-fallback/stdlib/_warnings.pyi +98 -102
  62. package/dist/typeshed-fallback/stdlib/_weakref.pyi +35 -35
  63. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +57 -57
  64. package/dist/typeshed-fallback/stdlib/abc.pyi +59 -59
  65. package/dist/typeshed-fallback/stdlib/argparse.pyi +769 -769
  66. package/dist/typeshed-fallback/stdlib/array.pyi +267 -281
  67. package/dist/typeshed-fallback/stdlib/ast.pyi +2049 -2049
  68. package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
  69. package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +41 -41
  70. package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +488 -488
  71. package/dist/typeshed-fallback/stdlib/asyncio/base_futures.pyi +19 -19
  72. package/dist/typeshed-fallback/stdlib/asyncio/base_subprocess.pyi +63 -63
  73. package/dist/typeshed-fallback/stdlib/asyncio/base_tasks.pyi +9 -9
  74. package/dist/typeshed-fallback/stdlib/asyncio/constants.pyi +20 -20
  75. package/dist/typeshed-fallback/stdlib/asyncio/coroutines.pyi +26 -26
  76. package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +653 -653
  77. package/dist/typeshed-fallback/stdlib/asyncio/exceptions.pyi +43 -43
  78. package/dist/typeshed-fallback/stdlib/asyncio/format_helpers.pyi +31 -31
  79. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +16 -16
  80. package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +127 -127
  81. package/dist/typeshed-fallback/stdlib/asyncio/log.pyi +3 -3
  82. package/dist/typeshed-fallback/stdlib/asyncio/mixins.pyi +9 -9
  83. package/dist/typeshed-fallback/stdlib/asyncio/proactor_events.pyi +64 -64
  84. package/dist/typeshed-fallback/stdlib/asyncio/protocols.pyi +34 -34
  85. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +64 -64
  86. package/dist/typeshed-fallback/stdlib/asyncio/runners.pyi +32 -32
  87. package/dist/typeshed-fallback/stdlib/asyncio/selector_events.pyi +8 -8
  88. package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +165 -184
  89. package/dist/typeshed-fallback/stdlib/asyncio/staggered.pyi +10 -10
  90. package/dist/typeshed-fallback/stdlib/asyncio/streams.pyi +157 -157
  91. package/dist/typeshed-fallback/stdlib/asyncio/subprocess.pyi +229 -229
  92. package/dist/typeshed-fallback/stdlib/asyncio/taskgroups.pyi +25 -25
  93. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +459 -459
  94. package/dist/typeshed-fallback/stdlib/asyncio/threads.pyi +9 -9
  95. package/dist/typeshed-fallback/stdlib/asyncio/timeouts.pyi +19 -19
  96. package/dist/typeshed-fallback/stdlib/asyncio/transports.pyi +47 -47
  97. package/dist/typeshed-fallback/stdlib/asyncio/trsock.pyi +94 -94
  98. package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
  99. package/dist/typeshed-fallback/stdlib/atexit.pyi +46 -46
  100. package/dist/typeshed-fallback/stdlib/audioop.pyi +26 -78
  101. package/dist/typeshed-fallback/stdlib/base64.pyi +65 -65
  102. package/dist/typeshed-fallback/stdlib/bdb.pyi +114 -114
  103. package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -123
  104. package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
  105. package/dist/typeshed-fallback/stdlib/bisect.pyi +4 -4
  106. package/dist/typeshed-fallback/stdlib/builtins.pyi +6481 -6560
  107. package/dist/typeshed-fallback/stdlib/bz2.pyi +132 -131
  108. package/dist/typeshed-fallback/stdlib/cProfile.pyi +31 -31
  109. package/dist/typeshed-fallback/stdlib/calendar.pyi +208 -208
  110. package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
  111. package/dist/typeshed-fallback/stdlib/cmd.pyi +46 -46
  112. package/dist/typeshed-fallback/stdlib/code.pyi +56 -56
  113. package/dist/typeshed-fallback/stdlib/codecs.pyi +301 -297
  114. package/dist/typeshed-fallback/stdlib/codeop.pyi +13 -13
  115. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +650 -650
  116. package/dist/typeshed-fallback/stdlib/collections/abc.pyi +2 -2
  117. package/dist/typeshed-fallback/stdlib/colorsys.pyi +13 -13
  118. package/dist/typeshed-fallback/stdlib/compileall.pyi +111 -111
  119. package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +51 -51
  120. package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +132 -132
  121. package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +234 -234
  122. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +86 -86
  123. package/dist/typeshed-fallback/stdlib/configparser.pyi +412 -404
  124. package/dist/typeshed-fallback/stdlib/contextlib.pyi +219 -213
  125. package/dist/typeshed-fallback/stdlib/contextvars.pyi +3 -3
  126. package/dist/typeshed-fallback/stdlib/copy.pyi +27 -27
  127. package/dist/typeshed-fallback/stdlib/copyreg.pyi +21 -21
  128. package/dist/typeshed-fallback/stdlib/crypt.pyi +9 -2
  129. package/dist/typeshed-fallback/stdlib/csv.pyi +169 -167
  130. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +218 -198
  131. package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +16 -16
  132. package/dist/typeshed-fallback/stdlib/ctypes/macholib/__init__.pyi +1 -0
  133. package/dist/typeshed-fallback/stdlib/ctypes/macholib/dyld.pyi +8 -0
  134. package/dist/typeshed-fallback/stdlib/ctypes/macholib/dylib.pyi +14 -0
  135. package/dist/typeshed-fallback/stdlib/ctypes/macholib/framework.pyi +14 -0
  136. package/dist/typeshed-fallback/stdlib/ctypes/util.pyi +8 -6
  137. package/dist/typeshed-fallback/stdlib/ctypes/wintypes.pyi +304 -298
  138. package/dist/typeshed-fallback/stdlib/curses/__init__.pyi +19 -1
  139. package/dist/typeshed-fallback/stdlib/curses/panel.pyi +1 -34
  140. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +322 -322
  141. package/dist/typeshed-fallback/stdlib/datetime.pyi +576 -575
  142. package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +104 -102
  143. package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +37 -37
  144. package/dist/typeshed-fallback/stdlib/decimal.pyi +849 -840
  145. package/dist/typeshed-fallback/stdlib/difflib.pyi +146 -146
  146. package/dist/typeshed-fallback/stdlib/dis.pyi +248 -248
  147. package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
  148. package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
  149. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
  150. package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
  151. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +176 -176
  152. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
  153. package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
  154. package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
  155. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
  156. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
  157. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
  158. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
  159. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
  160. package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
  161. package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
  162. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
  163. package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
  164. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
  165. package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
  166. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
  167. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
  168. package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
  169. package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
  170. package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
  171. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
  172. package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
  173. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
  174. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
  175. package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
  176. package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
  177. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
  178. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
  179. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
  180. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
  181. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
  182. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +317 -317
  183. package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
  184. package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
  185. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
  186. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
  187. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
  188. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +26 -26
  189. package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
  190. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -6
  191. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
  192. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
  193. package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
  194. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +53 -53
  195. package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
  196. package/dist/typeshed-fallback/stdlib/doctest.pyi +262 -264
  197. package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
  198. package/dist/typeshed-fallback/stdlib/email/__init__.pyi +37 -29
  199. package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +398 -398
  200. package/dist/typeshed-fallback/stdlib/email/_policybase.pyi +77 -75
  201. package/dist/typeshed-fallback/stdlib/email/base64mime.pyi +13 -13
  202. package/dist/typeshed-fallback/stdlib/email/charset.pyi +36 -36
  203. package/dist/typeshed-fallback/stdlib/email/contentmanager.pyi +11 -11
  204. package/dist/typeshed-fallback/stdlib/email/encoders.pyi +8 -8
  205. package/dist/typeshed-fallback/stdlib/email/errors.pyi +42 -42
  206. package/dist/typeshed-fallback/stdlib/email/feedparser.pyi +23 -23
  207. package/dist/typeshed-fallback/stdlib/email/generator.pyi +77 -77
  208. package/dist/typeshed-fallback/stdlib/email/header.pyi +33 -33
  209. package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +183 -183
  210. package/dist/typeshed-fallback/stdlib/email/iterators.pyi +12 -12
  211. package/dist/typeshed-fallback/stdlib/email/message.pyi +172 -172
  212. package/dist/typeshed-fallback/stdlib/email/mime/application.pyi +17 -17
  213. package/dist/typeshed-fallback/stdlib/email/mime/audio.pyi +17 -17
  214. package/dist/typeshed-fallback/stdlib/email/mime/base.pyi +8 -8
  215. package/dist/typeshed-fallback/stdlib/email/mime/image.pyi +17 -17
  216. package/dist/typeshed-fallback/stdlib/email/mime/message.pyi +8 -8
  217. package/dist/typeshed-fallback/stdlib/email/mime/multipart.pyi +18 -18
  218. package/dist/typeshed-fallback/stdlib/email/mime/nonmultipart.pyi +5 -5
  219. package/dist/typeshed-fallback/stdlib/email/mime/text.pyi +9 -9
  220. package/dist/typeshed-fallback/stdlib/email/parser.pyi +38 -38
  221. package/dist/typeshed-fallback/stdlib/email/policy.pyi +77 -77
  222. package/dist/typeshed-fallback/stdlib/email/quoprimime.pyi +28 -28
  223. package/dist/typeshed-fallback/stdlib/email/utils.pyi +78 -78
  224. package/dist/typeshed-fallback/stdlib/encodings/__init__.pyi +10 -10
  225. package/dist/typeshed-fallback/stdlib/encodings/aliases.pyi +1 -0
  226. package/dist/typeshed-fallback/stdlib/encodings/ascii.pyi +30 -0
  227. package/dist/typeshed-fallback/stdlib/encodings/base64_codec.pyi +26 -0
  228. package/dist/typeshed-fallback/stdlib/encodings/big5.pyi +23 -0
  229. package/dist/typeshed-fallback/stdlib/encodings/big5hkscs.pyi +23 -0
  230. package/dist/typeshed-fallback/stdlib/encodings/bz2_codec.pyi +26 -0
  231. package/dist/typeshed-fallback/stdlib/encodings/charmap.pyi +33 -0
  232. package/dist/typeshed-fallback/stdlib/encodings/cp037.pyi +21 -0
  233. package/dist/typeshed-fallback/stdlib/encodings/cp1006.pyi +21 -0
  234. package/dist/typeshed-fallback/stdlib/encodings/cp1026.pyi +21 -0
  235. package/dist/typeshed-fallback/stdlib/encodings/cp1125.pyi +21 -0
  236. package/dist/typeshed-fallback/stdlib/encodings/cp1140.pyi +21 -0
  237. package/dist/typeshed-fallback/stdlib/encodings/cp1250.pyi +21 -0
  238. package/dist/typeshed-fallback/stdlib/encodings/cp1251.pyi +21 -0
  239. package/dist/typeshed-fallback/stdlib/encodings/cp1252.pyi +21 -0
  240. package/dist/typeshed-fallback/stdlib/encodings/cp1253.pyi +21 -0
  241. package/dist/typeshed-fallback/stdlib/encodings/cp1254.pyi +21 -0
  242. package/dist/typeshed-fallback/stdlib/encodings/cp1255.pyi +21 -0
  243. package/dist/typeshed-fallback/stdlib/encodings/cp1256.pyi +21 -0
  244. package/dist/typeshed-fallback/stdlib/encodings/cp1257.pyi +21 -0
  245. package/dist/typeshed-fallback/stdlib/encodings/cp1258.pyi +21 -0
  246. package/dist/typeshed-fallback/stdlib/encodings/cp273.pyi +21 -0
  247. package/dist/typeshed-fallback/stdlib/encodings/cp424.pyi +21 -0
  248. package/dist/typeshed-fallback/stdlib/encodings/cp437.pyi +21 -0
  249. package/dist/typeshed-fallback/stdlib/encodings/cp500.pyi +21 -0
  250. package/dist/typeshed-fallback/stdlib/encodings/cp720.pyi +21 -0
  251. package/dist/typeshed-fallback/stdlib/encodings/cp737.pyi +21 -0
  252. package/dist/typeshed-fallback/stdlib/encodings/cp775.pyi +21 -0
  253. package/dist/typeshed-fallback/stdlib/encodings/cp850.pyi +21 -0
  254. package/dist/typeshed-fallback/stdlib/encodings/cp852.pyi +21 -0
  255. package/dist/typeshed-fallback/stdlib/encodings/cp855.pyi +21 -0
  256. package/dist/typeshed-fallback/stdlib/encodings/cp856.pyi +21 -0
  257. package/dist/typeshed-fallback/stdlib/encodings/cp857.pyi +21 -0
  258. package/dist/typeshed-fallback/stdlib/encodings/cp858.pyi +21 -0
  259. package/dist/typeshed-fallback/stdlib/encodings/cp860.pyi +21 -0
  260. package/dist/typeshed-fallback/stdlib/encodings/cp861.pyi +21 -0
  261. package/dist/typeshed-fallback/stdlib/encodings/cp862.pyi +21 -0
  262. package/dist/typeshed-fallback/stdlib/encodings/cp863.pyi +21 -0
  263. package/dist/typeshed-fallback/stdlib/encodings/cp864.pyi +21 -0
  264. package/dist/typeshed-fallback/stdlib/encodings/cp865.pyi +21 -0
  265. package/dist/typeshed-fallback/stdlib/encodings/cp866.pyi +21 -0
  266. package/dist/typeshed-fallback/stdlib/encodings/cp869.pyi +21 -0
  267. package/dist/typeshed-fallback/stdlib/encodings/cp874.pyi +21 -0
  268. package/dist/typeshed-fallback/stdlib/encodings/cp875.pyi +21 -0
  269. package/dist/typeshed-fallback/stdlib/encodings/cp932.pyi +23 -0
  270. package/dist/typeshed-fallback/stdlib/encodings/cp949.pyi +23 -0
  271. package/dist/typeshed-fallback/stdlib/encodings/cp950.pyi +23 -0
  272. package/dist/typeshed-fallback/stdlib/encodings/euc_jis_2004.pyi +23 -0
  273. package/dist/typeshed-fallback/stdlib/encodings/euc_jisx0213.pyi +23 -0
  274. package/dist/typeshed-fallback/stdlib/encodings/euc_jp.pyi +23 -0
  275. package/dist/typeshed-fallback/stdlib/encodings/euc_kr.pyi +23 -0
  276. package/dist/typeshed-fallback/stdlib/encodings/gb18030.pyi +23 -0
  277. package/dist/typeshed-fallback/stdlib/encodings/gb2312.pyi +23 -0
  278. package/dist/typeshed-fallback/stdlib/encodings/gbk.pyi +23 -0
  279. package/dist/typeshed-fallback/stdlib/encodings/hex_codec.pyi +26 -0
  280. package/dist/typeshed-fallback/stdlib/encodings/hp_roman8.pyi +21 -0
  281. package/dist/typeshed-fallback/stdlib/encodings/hz.pyi +23 -0
  282. package/dist/typeshed-fallback/stdlib/encodings/idna.pyi +26 -0
  283. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp.pyi +23 -0
  284. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_1.pyi +23 -0
  285. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2.pyi +23 -0
  286. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
  287. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_3.pyi +23 -0
  288. package/dist/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
  289. package/dist/typeshed-fallback/stdlib/encodings/iso2022_kr.pyi +23 -0
  290. package/dist/typeshed-fallback/stdlib/encodings/iso8859_1.pyi +21 -0
  291. package/dist/typeshed-fallback/stdlib/encodings/iso8859_10.pyi +21 -0
  292. package/dist/typeshed-fallback/stdlib/encodings/iso8859_11.pyi +21 -0
  293. package/dist/typeshed-fallback/stdlib/encodings/iso8859_13.pyi +21 -0
  294. package/dist/typeshed-fallback/stdlib/encodings/iso8859_14.pyi +21 -0
  295. package/dist/typeshed-fallback/stdlib/encodings/iso8859_15.pyi +21 -0
  296. package/dist/typeshed-fallback/stdlib/encodings/iso8859_16.pyi +21 -0
  297. package/dist/typeshed-fallback/stdlib/encodings/iso8859_2.pyi +21 -0
  298. package/dist/typeshed-fallback/stdlib/encodings/iso8859_3.pyi +21 -0
  299. package/dist/typeshed-fallback/stdlib/encodings/iso8859_4.pyi +21 -0
  300. package/dist/typeshed-fallback/stdlib/encodings/iso8859_5.pyi +21 -0
  301. package/dist/typeshed-fallback/stdlib/encodings/iso8859_6.pyi +21 -0
  302. package/dist/typeshed-fallback/stdlib/encodings/iso8859_7.pyi +21 -0
  303. package/dist/typeshed-fallback/stdlib/encodings/iso8859_8.pyi +21 -0
  304. package/dist/typeshed-fallback/stdlib/encodings/iso8859_9.pyi +21 -0
  305. package/dist/typeshed-fallback/stdlib/encodings/johab.pyi +23 -0
  306. package/dist/typeshed-fallback/stdlib/encodings/koi8_r.pyi +21 -0
  307. package/dist/typeshed-fallback/stdlib/encodings/koi8_t.pyi +21 -0
  308. package/dist/typeshed-fallback/stdlib/encodings/koi8_u.pyi +21 -0
  309. package/dist/typeshed-fallback/stdlib/encodings/kz1048.pyi +21 -0
  310. package/dist/typeshed-fallback/stdlib/encodings/latin_1.pyi +30 -0
  311. package/dist/typeshed-fallback/stdlib/encodings/mac_arabic.pyi +21 -0
  312. package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -0
  313. package/dist/typeshed-fallback/stdlib/encodings/mac_croatian.pyi +21 -0
  314. package/dist/typeshed-fallback/stdlib/encodings/mac_cyrillic.pyi +21 -0
  315. package/dist/typeshed-fallback/stdlib/encodings/mac_farsi.pyi +21 -0
  316. package/dist/typeshed-fallback/stdlib/encodings/mac_greek.pyi +21 -0
  317. package/dist/typeshed-fallback/stdlib/encodings/mac_iceland.pyi +21 -0
  318. package/dist/typeshed-fallback/stdlib/encodings/mac_latin2.pyi +21 -0
  319. package/dist/typeshed-fallback/stdlib/encodings/mac_roman.pyi +21 -0
  320. package/dist/typeshed-fallback/stdlib/encodings/mac_romanian.pyi +21 -0
  321. package/dist/typeshed-fallback/stdlib/encodings/mac_turkish.pyi +21 -0
  322. package/dist/typeshed-fallback/stdlib/encodings/mbcs.pyi +28 -0
  323. package/dist/typeshed-fallback/stdlib/encodings/oem.pyi +28 -0
  324. package/dist/typeshed-fallback/stdlib/encodings/palmos.pyi +21 -0
  325. package/dist/typeshed-fallback/stdlib/encodings/ptcp154.pyi +21 -0
  326. package/dist/typeshed-fallback/stdlib/encodings/punycode.pyi +33 -0
  327. package/dist/typeshed-fallback/stdlib/encodings/quopri_codec.pyi +26 -0
  328. package/dist/typeshed-fallback/stdlib/encodings/raw_unicode_escape.pyi +34 -0
  329. package/dist/typeshed-fallback/stdlib/encodings/rot_13.pyi +23 -0
  330. package/dist/typeshed-fallback/stdlib/encodings/shift_jis.pyi +23 -0
  331. package/dist/typeshed-fallback/stdlib/encodings/shift_jis_2004.pyi +23 -0
  332. package/dist/typeshed-fallback/stdlib/encodings/shift_jisx0213.pyi +23 -0
  333. package/dist/typeshed-fallback/stdlib/encodings/tis_620.pyi +21 -0
  334. package/dist/typeshed-fallback/stdlib/encodings/undefined.pyi +20 -0
  335. package/dist/typeshed-fallback/stdlib/encodings/unicode_escape.pyi +34 -0
  336. package/dist/typeshed-fallback/stdlib/encodings/utf_16.pyi +20 -0
  337. package/dist/typeshed-fallback/stdlib/encodings/utf_16_be.pyi +26 -0
  338. package/dist/typeshed-fallback/stdlib/encodings/utf_16_le.pyi +26 -0
  339. package/dist/typeshed-fallback/stdlib/encodings/utf_32.pyi +20 -0
  340. package/dist/typeshed-fallback/stdlib/encodings/utf_32_be.pyi +26 -0
  341. package/dist/typeshed-fallback/stdlib/encodings/utf_32_le.pyi +26 -0
  342. package/dist/typeshed-fallback/stdlib/encodings/utf_7.pyi +26 -0
  343. package/dist/typeshed-fallback/stdlib/encodings/utf_8.pyi +26 -21
  344. package/dist/typeshed-fallback/stdlib/encodings/utf_8_sig.pyi +22 -22
  345. package/dist/typeshed-fallback/stdlib/encodings/uu_codec.pyi +28 -0
  346. package/dist/typeshed-fallback/stdlib/encodings/zlib_codec.pyi +26 -0
  347. package/dist/typeshed-fallback/stdlib/ensurepip/__init__.pyi +12 -12
  348. package/dist/typeshed-fallback/stdlib/enum.pyi +348 -348
  349. package/dist/typeshed-fallback/stdlib/errno.pyi +237 -237
  350. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +34 -34
  351. package/dist/typeshed-fallback/stdlib/fcntl.pyi +3 -1
  352. package/dist/typeshed-fallback/stdlib/filecmp.pyi +74 -74
  353. package/dist/typeshed-fallback/stdlib/fileinput.pyi +219 -219
  354. package/dist/typeshed-fallback/stdlib/fnmatch.pyi +9 -9
  355. package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
  356. package/dist/typeshed-fallback/stdlib/fractions.pyi +162 -162
  357. package/dist/typeshed-fallback/stdlib/ftplib.pyi +178 -178
  358. package/dist/typeshed-fallback/stdlib/functools.pyi +270 -270
  359. package/dist/typeshed-fallback/stdlib/gc.pyi +144 -144
  360. package/dist/typeshed-fallback/stdlib/genericpath.pyi +59 -59
  361. package/dist/typeshed-fallback/stdlib/getopt.pyi +15 -15
  362. package/dist/typeshed-fallback/stdlib/getpass.pyi +8 -8
  363. package/dist/typeshed-fallback/stdlib/gettext.pyi +171 -169
  364. package/dist/typeshed-fallback/stdlib/glob.pyi +50 -50
  365. package/dist/typeshed-fallback/stdlib/graphlib.pyi +34 -34
  366. package/dist/typeshed-fallback/stdlib/gzip.pyi +162 -162
  367. package/dist/typeshed-fallback/stdlib/hashlib.pyi +104 -163
  368. package/dist/typeshed-fallback/stdlib/heapq.pyi +19 -19
  369. package/dist/typeshed-fallback/stdlib/hmac.pyi +42 -65
  370. package/dist/typeshed-fallback/stdlib/html/__init__.pyi +6 -6
  371. package/dist/typeshed-fallback/stdlib/html/entities.pyi +6 -6
  372. package/dist/typeshed-fallback/stdlib/html/parser.pyi +34 -34
  373. package/dist/typeshed-fallback/stdlib/http/__init__.pyi +112 -112
  374. package/dist/typeshed-fallback/stdlib/http/client.pyi +246 -246
  375. package/dist/typeshed-fallback/stdlib/http/cookiejar.pyi +159 -159
  376. package/dist/typeshed-fallback/stdlib/http/cookies.pyi +66 -66
  377. package/dist/typeshed-fallback/stdlib/http/server.pyi +83 -83
  378. package/dist/typeshed-fallback/stdlib/imaplib.pyi +168 -168
  379. package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
  380. package/dist/typeshed-fallback/stdlib/importlib/__init__.pyi +15 -15
  381. package/dist/typeshed-fallback/stdlib/importlib/_abc.pyi +15 -15
  382. package/dist/typeshed-fallback/stdlib/importlib/_bootstrap.pyi +2 -2
  383. package/dist/typeshed-fallback/stdlib/importlib/_bootstrap_external.pyi +2 -2
  384. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +175 -175
  385. package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +20 -20
  386. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +342 -371
  387. package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +65 -65
  388. package/dist/typeshed-fallback/stdlib/importlib/readers.pyi +68 -68
  389. package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +70 -70
  390. package/dist/typeshed-fallback/stdlib/importlib/resources/_common.pyi +42 -42
  391. package/dist/typeshed-fallback/stdlib/importlib/resources/abc.pyi +14 -12
  392. package/dist/typeshed-fallback/stdlib/importlib/resources/readers.pyi +14 -14
  393. package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +58 -58
  394. package/dist/typeshed-fallback/stdlib/importlib/simple.pyi +11 -11
  395. package/dist/typeshed-fallback/stdlib/importlib/util.pyi +33 -33
  396. package/dist/typeshed-fallback/stdlib/inspect.pyi +642 -642
  397. package/dist/typeshed-fallback/stdlib/io.pyi +60 -60
  398. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +509 -355
  399. package/dist/typeshed-fallback/stdlib/itertools.pyi +574 -574
  400. package/dist/typeshed-fallback/stdlib/json/__init__.pyi +61 -61
  401. package/dist/typeshed-fallback/stdlib/json/decoder.pyi +32 -32
  402. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +52 -52
  403. package/dist/typeshed-fallback/stdlib/json/scanner.pyi +3 -0
  404. package/dist/typeshed-fallback/stdlib/json/tool.pyi +1 -1
  405. package/dist/typeshed-fallback/stdlib/keyword.pyi +25 -25
  406. package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +2 -12
  407. package/dist/typeshed-fallback/stdlib/linecache.pyi +23 -23
  408. package/dist/typeshed-fallback/stdlib/locale.pyi +156 -156
  409. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +698 -698
  410. package/dist/typeshed-fallback/stdlib/logging/config.pyi +134 -134
  411. package/dist/typeshed-fallback/stdlib/logging/handlers.pyi +277 -277
  412. package/dist/typeshed-fallback/stdlib/lzma.pyi +174 -174
  413. package/dist/typeshed-fallback/stdlib/mailbox.pyi +276 -276
  414. package/dist/typeshed-fallback/stdlib/marshal.pyi +128 -176
  415. package/dist/typeshed-fallback/stdlib/math.pyi +438 -442
  416. package/dist/typeshed-fallback/stdlib/mimetypes.pyi +56 -56
  417. package/dist/typeshed-fallback/stdlib/mmap.pyi +185 -185
  418. package/dist/typeshed-fallback/stdlib/modulefinder.pyi +68 -66
  419. package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
  420. package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
  421. package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
  422. package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
  423. package/dist/typeshed-fallback/stdlib/multiprocessing/__init__.pyi +90 -90
  424. package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +89 -89
  425. package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +216 -215
  426. package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +79 -79
  427. package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/connection.pyi +39 -39
  428. package/dist/typeshed-fallback/stdlib/multiprocessing/forkserver.pyi +31 -31
  429. package/dist/typeshed-fallback/stdlib/multiprocessing/heap.pyi +36 -36
  430. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +266 -266
  431. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +109 -109
  432. package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +50 -50
  433. package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +53 -53
  434. package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +87 -87
  435. package/dist/typeshed-fallback/stdlib/multiprocessing/resource_sharer.pyi +20 -20
  436. package/dist/typeshed-fallback/stdlib/multiprocessing/resource_tracker.pyi +18 -18
  437. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +58 -58
  438. package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +129 -128
  439. package/dist/typeshed-fallback/stdlib/multiprocessing/spawn.pyi +32 -32
  440. package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +59 -55
  441. package/dist/typeshed-fallback/stdlib/multiprocessing/util.pyi +98 -98
  442. package/dist/typeshed-fallback/stdlib/netrc.pyi +23 -23
  443. package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
  444. package/dist/typeshed-fallback/stdlib/ntpath.pyi +126 -126
  445. package/dist/typeshed-fallback/stdlib/nturl2path.pyi +2 -2
  446. package/dist/typeshed-fallback/stdlib/numbers.pyi +229 -229
  447. package/dist/typeshed-fallback/stdlib/opcode.pyi +65 -65
  448. package/dist/typeshed-fallback/stdlib/operator.pyi +221 -221
  449. package/dist/typeshed-fallback/stdlib/optparse.pyi +257 -257
  450. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +2946 -2491
  451. package/dist/typeshed-fallback/stdlib/os/path.pyi +8 -8
  452. package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
  453. package/dist/typeshed-fallback/stdlib/pathlib.pyi +329 -329
  454. package/dist/typeshed-fallback/stdlib/pdb.pyi +206 -206
  455. package/dist/typeshed-fallback/stdlib/pickle.pyi +459 -459
  456. package/dist/typeshed-fallback/stdlib/pickletools.pyi +167 -167
  457. package/dist/typeshed-fallback/stdlib/pkgutil.pyi +53 -53
  458. package/dist/typeshed-fallback/stdlib/platform.pyi +97 -67
  459. package/dist/typeshed-fallback/stdlib/plistlib.pyi +113 -113
  460. package/dist/typeshed-fallback/stdlib/poplib.pyi +72 -72
  461. package/dist/typeshed-fallback/stdlib/posix.pyi +30 -10
  462. package/dist/typeshed-fallback/stdlib/posixpath.pyi +182 -182
  463. package/dist/typeshed-fallback/stdlib/pprint.pyi +112 -112
  464. package/dist/typeshed-fallback/stdlib/profile.pyi +31 -31
  465. package/dist/typeshed-fallback/stdlib/pstats.pyi +98 -80
  466. package/dist/typeshed-fallback/stdlib/py_compile.pyi +34 -34
  467. package/dist/typeshed-fallback/stdlib/pyclbr.pyi +74 -74
  468. package/dist/typeshed-fallback/stdlib/pydoc.pyi +333 -333
  469. package/dist/typeshed-fallback/stdlib/pydoc_data/topics.pyi +1 -1
  470. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +131 -129
  471. package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +53 -53
  472. package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +15 -15
  473. package/dist/typeshed-fallback/stdlib/queue.pyi +63 -63
  474. package/dist/typeshed-fallback/stdlib/quopri.pyi +11 -11
  475. package/dist/typeshed-fallback/stdlib/random.pyi +141 -141
  476. package/dist/typeshed-fallback/stdlib/re.pyi +476 -476
  477. package/dist/typeshed-fallback/stdlib/readline.pyi +1 -7
  478. package/dist/typeshed-fallback/stdlib/reprlib.pyi +65 -65
  479. package/dist/typeshed-fallback/stdlib/rlcompleter.pyi +9 -9
  480. package/dist/typeshed-fallback/stdlib/runpy.pyi +24 -24
  481. package/dist/typeshed-fallback/stdlib/sched.pyi +52 -49
  482. package/dist/typeshed-fallback/stdlib/secrets.pyi +15 -15
  483. package/dist/typeshed-fallback/stdlib/select.pyi +247 -247
  484. package/dist/typeshed-fallback/stdlib/selectors.pyi +67 -67
  485. package/dist/typeshed-fallback/stdlib/shelve.pyi +59 -59
  486. package/dist/typeshed-fallback/stdlib/shlex.pyi +63 -63
  487. package/dist/typeshed-fallback/stdlib/shutil.pyi +230 -230
  488. package/dist/typeshed-fallback/stdlib/signal.pyi +263 -263
  489. package/dist/typeshed-fallback/stdlib/site.pyi +36 -36
  490. package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
  491. package/dist/typeshed-fallback/stdlib/smtplib.pyi +204 -204
  492. package/dist/typeshed-fallback/stdlib/socket.pyi +1413 -856
  493. package/dist/typeshed-fallback/stdlib/socketserver.pyi +169 -169
  494. package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
  495. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +785 -787
  496. package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +241 -241
  497. package/dist/typeshed-fallback/stdlib/sqlite3/dump.pyi +2 -0
  498. package/dist/typeshed-fallback/stdlib/sre_compile.pyi +11 -11
  499. package/dist/typeshed-fallback/stdlib/sre_constants.pyi +124 -124
  500. package/dist/typeshed-fallback/stdlib/sre_parse.pyi +104 -104
  501. package/dist/typeshed-fallback/stdlib/ssl.pyi +558 -560
  502. package/dist/typeshed-fallback/stdlib/stat.pyi +7 -7
  503. package/dist/typeshed-fallback/stdlib/statistics.pyi +176 -176
  504. package/dist/typeshed-fallback/stdlib/string.pyi +83 -83
  505. package/dist/typeshed-fallback/stdlib/stringprep.pyi +27 -27
  506. package/dist/typeshed-fallback/stdlib/struct.pyi +5 -5
  507. package/dist/typeshed-fallback/stdlib/subprocess.pyi +2640 -2640
  508. package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
  509. package/dist/typeshed-fallback/stdlib/symtable.pyi +90 -90
  510. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +773 -707
  511. package/dist/typeshed-fallback/stdlib/sysconfig.pyi +48 -48
  512. package/dist/typeshed-fallback/stdlib/tabnanny.pyi +16 -16
  513. package/dist/typeshed-fallback/stdlib/tarfile.pyi +593 -593
  514. package/dist/typeshed-fallback/stdlib/tempfile.pyi +497 -497
  515. package/dist/typeshed-fallback/stdlib/termios.pyi +108 -72
  516. package/dist/typeshed-fallback/stdlib/textwrap.pyi +103 -103
  517. package/dist/typeshed-fallback/stdlib/threading.pyi +279 -279
  518. package/dist/typeshed-fallback/stdlib/time.pyi +380 -380
  519. package/dist/typeshed-fallback/stdlib/timeit.pyi +32 -32
  520. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3900 -3847
  521. package/dist/typeshed-fallback/stdlib/tkinter/colorchooser.pyi +20 -20
  522. package/dist/typeshed-fallback/stdlib/tkinter/commondialog.pyi +14 -14
  523. package/dist/typeshed-fallback/stdlib/tkinter/constants.pyi +80 -80
  524. package/dist/typeshed-fallback/stdlib/tkinter/dialog.pyi +16 -16
  525. package/dist/typeshed-fallback/stdlib/tkinter/dnd.pyi +20 -20
  526. package/dist/typeshed-fallback/stdlib/tkinter/filedialog.pyi +151 -151
  527. package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +118 -116
  528. package/dist/typeshed-fallback/stdlib/tkinter/messagebox.pyi +44 -44
  529. package/dist/typeshed-fallback/stdlib/tkinter/scrolledtext.pyi +9 -9
  530. package/dist/typeshed-fallback/stdlib/tkinter/simpledialog.pyi +54 -54
  531. package/dist/typeshed-fallback/stdlib/tkinter/ttk.pyi +1207 -1207
  532. package/dist/typeshed-fallback/stdlib/token.pyi +160 -160
  533. package/dist/typeshed-fallback/stdlib/tokenize.pyi +186 -184
  534. package/dist/typeshed-fallback/stdlib/tomllib.pyi +10 -10
  535. package/dist/typeshed-fallback/stdlib/trace.pyi +90 -90
  536. package/dist/typeshed-fallback/stdlib/traceback.pyi +300 -300
  537. package/dist/typeshed-fallback/stdlib/tracemalloc.pyi +124 -124
  538. package/dist/typeshed-fallback/stdlib/turtle.pyi +732 -721
  539. package/dist/typeshed-fallback/stdlib/types.pyi +909 -913
  540. package/dist/typeshed-fallback/stdlib/typing.pyi +1145 -1147
  541. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +19 -47
  542. package/dist/typeshed-fallback/stdlib/unicodedata.pyi +303 -303
  543. package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +63 -68
  544. package/dist/typeshed-fallback/stdlib/unittest/_log.pyi +27 -27
  545. package/dist/typeshed-fallback/stdlib/unittest/async_case.pyi +25 -25
  546. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +361 -361
  547. package/dist/typeshed-fallback/stdlib/unittest/loader.pyi +55 -55
  548. package/dist/typeshed-fallback/stdlib/unittest/main.pyi +73 -73
  549. package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +468 -468
  550. package/dist/typeshed-fallback/stdlib/unittest/result.pyi +47 -47
  551. package/dist/typeshed-fallback/stdlib/unittest/runner.pyi +92 -92
  552. package/dist/typeshed-fallback/stdlib/unittest/signals.pyi +15 -15
  553. package/dist/typeshed-fallback/stdlib/unittest/suite.pyi +22 -22
  554. package/dist/typeshed-fallback/stdlib/unittest/util.pyi +23 -23
  555. package/dist/typeshed-fallback/stdlib/urllib/error.pyi +23 -23
  556. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +258 -258
  557. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +408 -408
  558. package/dist/typeshed-fallback/stdlib/urllib/response.pyi +43 -43
  559. package/dist/typeshed-fallback/stdlib/urllib/robotparser.pyi +20 -20
  560. package/dist/typeshed-fallback/stdlib/uuid.pyi +100 -100
  561. package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +107 -107
  562. package/dist/typeshed-fallback/stdlib/warnings.pyi +127 -127
  563. package/dist/typeshed-fallback/stdlib/wave.pyi +85 -85
  564. package/dist/typeshed-fallback/stdlib/weakref.pyi +198 -198
  565. package/dist/typeshed-fallback/stdlib/webbrowser.pyi +78 -77
  566. package/dist/typeshed-fallback/stdlib/wsgiref/handlers.pyi +91 -91
  567. package/dist/typeshed-fallback/stdlib/wsgiref/headers.pyi +26 -26
  568. package/dist/typeshed-fallback/stdlib/wsgiref/simple_server.pyi +37 -37
  569. package/dist/typeshed-fallback/stdlib/wsgiref/types.pyi +32 -32
  570. package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +26 -26
  571. package/dist/typeshed-fallback/stdlib/wsgiref/validate.pyi +50 -50
  572. package/dist/typeshed-fallback/stdlib/xml/__init__.pyi +3 -1
  573. package/dist/typeshed-fallback/stdlib/xml/dom/NodeFilter.pyi +19 -19
  574. package/dist/typeshed-fallback/stdlib/xml/dom/__init__.pyi +69 -69
  575. package/dist/typeshed-fallback/stdlib/xml/dom/domreg.pyi +8 -8
  576. package/dist/typeshed-fallback/stdlib/xml/dom/expatbuilder.pyi +100 -100
  577. package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +26 -26
  578. package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +426 -426
  579. package/dist/typeshed-fallback/stdlib/xml/dom/pulldom.pyi +94 -94
  580. package/dist/typeshed-fallback/stdlib/xml/dom/xmlbuilder.pyi +108 -108
  581. package/dist/typeshed-fallback/stdlib/xml/etree/ElementInclude.pyi +29 -29
  582. package/dist/typeshed-fallback/stdlib/xml/etree/ElementPath.pyi +34 -34
  583. package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +347 -347
  584. package/dist/typeshed-fallback/stdlib/xml/etree/cElementTree.pyi +1 -1
  585. package/dist/typeshed-fallback/stdlib/xml/parsers/__init__.pyi +1 -1
  586. package/dist/typeshed-fallback/stdlib/xml/parsers/expat/__init__.pyi +7 -7
  587. package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +3 -3
  588. package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +3 -3
  589. package/dist/typeshed-fallback/stdlib/xml/sax/__init__.pyi +25 -25
  590. package/dist/typeshed-fallback/stdlib/xml/sax/_exceptions.pyi +19 -19
  591. package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +55 -55
  592. package/dist/typeshed-fallback/stdlib/xml/sax/saxutils.pyi +60 -60
  593. package/dist/typeshed-fallback/stdlib/xml/sax/xmlreader.pyi +87 -87
  594. package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +296 -296
  595. package/dist/typeshed-fallback/stdlib/xmlrpc/server.pyi +144 -144
  596. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
  597. package/dist/typeshed-fallback/stdlib/zipapp.pyi +20 -20
  598. package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +384 -384
  599. package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +103 -101
  600. package/dist/typeshed-fallback/stdlib/zipimport.pyi +41 -70
  601. package/dist/typeshed-fallback/stdlib/zlib.pyi +162 -157
  602. package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +41 -47
  603. package/dist/typeshed-fallback/stdlib/zoneinfo/_common.pyi +13 -13
  604. package/dist/typeshed-fallback/stdlib/zoneinfo/_tzpath.pyi +13 -13
  605. package/dist/typeshed-fallback/stubs/Deprecated/METADATA.toml +1 -1
  606. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
  607. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
  608. package/dist/typeshed-fallback/stubs/bleach/METADATA.toml +1 -1
  609. package/dist/typeshed-fallback/stubs/docutils/docutils/core.pyi +216 -1
  610. package/dist/typeshed-fallback/stubs/docutils/docutils/writers/__init__.pyi +60 -2
  611. package/dist/typeshed-fallback/stubs/gevent/METADATA.toml +1 -1
  612. package/dist/typeshed-fallback/stubs/gevent/gevent/events.pyi +3 -1
  613. package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +6 -2
  614. package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +14 -0
  615. package/dist/typeshed-fallback/stubs/icalendar/icalendar/alarms.pyi +54 -0
  616. package/dist/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +137 -11
  617. package/dist/typeshed-fallback/stubs/icalendar/icalendar/prop.pyi +8 -7
  618. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/__init__.pyi +3 -2
  619. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids.pyi +15 -0
  620. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/equivalent_timezone_ids_result.pyi +6 -0
  621. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzid.pyi +8 -0
  622. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +2 -2
  623. package/dist/typeshed-fallback/stubs/icalendar/icalendar/tools.pyi +12 -1
  624. package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +1 -1
  625. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +0 -2
  626. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +0 -31
  627. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +1 -1
  628. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +3 -1
  629. package/dist/typeshed-fallback/stubs/networkx/networkx/drawing/layout.pyi +4 -0
  630. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi +0 -4
  631. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +12 -2
  632. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/text.pyi +1 -4
  633. package/dist/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi +20 -2
  634. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/__init__.pyi +2 -1
  635. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
  636. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/_writer.pyi +4 -2
  637. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/cell.pyi +2 -2
  638. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi +2 -1
  639. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/workbook.pyi +2 -2
  640. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +5 -14
  641. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +2 -3
  642. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_writer.pyi +4 -3
  643. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/merge.pyi +2 -1
  644. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +30 -19
  645. package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
  646. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +3 -1
  647. package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +2 -2
  648. package/dist/typeshed-fallback/stubs/pysftp/pysftp/__init__.pyi +2 -2
  649. package/dist/typeshed-fallback/stubs/pywin32/isapi/install.pyi +98 -0
  650. package/dist/typeshed-fallback/stubs/pywin32/win32/win32clipboard.pyi +26 -24
  651. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
  652. package/dist/typeshed-fallback/stubs/setuptools/distutils/spawn.pyi +1 -0
  653. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +6 -7
  654. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +2 -2
  655. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -2
  656. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +7 -0
  657. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -2
  658. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -8
  659. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +3 -5
  660. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -1
  661. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +6 -7
  662. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +12 -17
  663. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/editable_wheel.pyi +1 -1
  664. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +1 -1
  665. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_egg_info.pyi +1 -1
  666. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/sdist.pyi +2 -1
  667. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/test.pyi +2 -2
  668. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/__init__.pyi +1 -14
  669. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
  670. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/setupcfg.pyi +7 -5
  671. package/dist/typeshed-fallback/stubs/setuptools/setuptools/depends.pyi +8 -4
  672. package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +1 -1
  673. package/dist/typeshed-fallback/stubs/setuptools/setuptools/msvc.pyi +7 -8
  674. package/dist/typeshed-fallback/stubs/setuptools/setuptools/package_index.pyi +7 -3
  675. package/dist/typeshed-fallback/stubs/setuptools/setuptools/sandbox.pyi +2 -4
  676. package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +2 -1
  677. package/dist/typeshed-fallback/stubs/tqdm/tqdm/contrib/discord.pyi +14 -3
  678. package/dist/typeshed-fallback/stubs/waitress/waitress/runner.pyi +1 -5
  679. package/package.json +5 -3
@@ -1,476 +1,476 @@
1
- import enum
2
- import sre_compile
3
- import sre_constants
4
- import sys
5
- from _typeshed import MaybeNone, ReadableBuffer
6
- from collections.abc import Callable, Iterator, Mapping
7
- from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload
8
- from typing_extensions import TypeAlias
9
-
10
- if sys.version_info >= (3, 9):
11
- from types import GenericAlias
12
-
13
- __all__ = [
14
- "match",
15
- "fullmatch",
16
- "search",
17
- "sub",
18
- "subn",
19
- "split",
20
- "findall",
21
- "finditer",
22
- "compile",
23
- "purge",
24
- "escape",
25
- "error",
26
- "A",
27
- "I",
28
- "L",
29
- "M",
30
- "S",
31
- "X",
32
- "U",
33
- "ASCII",
34
- "IGNORECASE",
35
- "LOCALE",
36
- "MULTILINE",
37
- "DOTALL",
38
- "VERBOSE",
39
- "UNICODE",
40
- "Match",
41
- "Pattern",
42
- ]
43
- if sys.version_info < (3, 13):
44
- __all__ += ["template"]
45
-
46
- if sys.version_info >= (3, 11):
47
- __all__ += ["NOFLAG", "RegexFlag"]
48
-
49
- if sys.version_info >= (3, 13):
50
- __all__ += ["PatternError"]
51
-
52
- PatternError = sre_constants.error
53
-
54
- _T = TypeVar("_T")
55
-
56
- # The implementation defines this in re._constants (version_info >= 3, 11) or
57
- # sre_constants. Typeshed has it here because its __module__ attribute is set to "re".
58
- class error(Exception):
59
- msg: str
60
- pattern: str | bytes | None
61
- pos: int | None
62
- lineno: int
63
- colno: int
64
- def __init__(self, msg: str, pattern: str | bytes | None = None, pos: int | None = None) -> None: ...
65
-
66
- @final
67
- class Match(Generic[AnyStr]):
68
- @property
69
- def pos(self) -> int:
70
- """The index into the string at which the RE engine started looking for a match."""
71
- ...
72
- @property
73
- def endpos(self) -> int:
74
- """The index into the string beyond which the RE engine will not go."""
75
- ...
76
- @property
77
- def lastindex(self) -> int | None:
78
- """The integer index of the last matched capturing group."""
79
- ...
80
- @property
81
- def lastgroup(self) -> str | None:
82
- """The name of the last matched capturing group."""
83
- ...
84
- @property
85
- def string(self) -> AnyStr:
86
- """The string passed to match() or search()."""
87
- ...
88
-
89
- # The regular expression object whose match() or search() method produced
90
- # this match instance.
91
- @property
92
- def re(self) -> Pattern[AnyStr]:
93
- """The regular expression object."""
94
- ...
95
- @overload
96
- def expand(self: Match[str], template: str) -> str:
97
- """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
98
- ...
99
- @overload
100
- def expand(self: Match[bytes], template: ReadableBuffer) -> bytes:
101
- """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
102
- ...
103
- @overload
104
- def expand(self, template: AnyStr) -> AnyStr:
105
- """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
106
- ...
107
- # group() returns "AnyStr" or "AnyStr | None", depending on the pattern.
108
- @overload
109
- def group(self, group: Literal[0] = 0, /) -> AnyStr:
110
- """
111
- group([group1, ...]) -> str or tuple.
112
- Return subgroup(s) of the match by indices or names.
113
- For 0 returns the entire match.
114
- """
115
- ...
116
- @overload
117
- def group(self, group: str | int, /) -> AnyStr | MaybeNone:
118
- """
119
- group([group1, ...]) -> str or tuple.
120
- Return subgroup(s) of the match by indices or names.
121
- For 0 returns the entire match.
122
- """
123
- ...
124
- @overload
125
- def group(self, group1: str | int, group2: str | int, /, *groups: str | int) -> tuple[AnyStr | MaybeNone, ...]:
126
- """
127
- group([group1, ...]) -> str or tuple.
128
- Return subgroup(s) of the match by indices or names.
129
- For 0 returns the entire match.
130
- """
131
- ...
132
- # Each item of groups()'s return tuple is either "AnyStr" or
133
- # "AnyStr | None", depending on the pattern.
134
- @overload
135
- def groups(self) -> tuple[AnyStr | MaybeNone, ...]:
136
- """
137
- Return a tuple containing all the subgroups of the match, from 1.
138
-
139
- default
140
- Is used for groups that did not participate in the match.
141
- """
142
- ...
143
- @overload
144
- def groups(self, default: _T) -> tuple[AnyStr | _T, ...]:
145
- """
146
- Return a tuple containing all the subgroups of the match, from 1.
147
-
148
- default
149
- Is used for groups that did not participate in the match.
150
- """
151
- ...
152
- # Each value in groupdict()'s return dict is either "AnyStr" or
153
- # "AnyStr | None", depending on the pattern.
154
- @overload
155
- def groupdict(self) -> dict[str, AnyStr | MaybeNone]:
156
- """
157
- Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
158
-
159
- default
160
- Is used for groups that did not participate in the match.
161
- """
162
- ...
163
- @overload
164
- def groupdict(self, default: _T) -> dict[str, AnyStr | _T]:
165
- """
166
- Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
167
-
168
- default
169
- Is used for groups that did not participate in the match.
170
- """
171
- ...
172
- def start(self, group: int | str = 0, /) -> int:
173
- """Return index of the start of the substring matched by group."""
174
- ...
175
- def end(self, group: int | str = 0, /) -> int:
176
- """Return index of the end of the substring matched by group."""
177
- ...
178
- def span(self, group: int | str = 0, /) -> tuple[int, int]:
179
- """For match object m, return the 2-tuple (m.start(group), m.end(group))."""
180
- ...
181
- @property
182
- def regs(self) -> tuple[tuple[int, int], ...]: ... # undocumented
183
- # __getitem__() returns "AnyStr" or "AnyStr | None", depending on the pattern.
184
- @overload
185
- def __getitem__(self, key: Literal[0], /) -> AnyStr:
186
- """Return self[key]."""
187
- ...
188
- @overload
189
- def __getitem__(self, key: int | str, /) -> AnyStr | MaybeNone:
190
- """Return self[key]."""
191
- ...
192
- def __copy__(self) -> Match[AnyStr]: ...
193
- def __deepcopy__(self, memo: Any, /) -> Match[AnyStr]: ...
194
- if sys.version_info >= (3, 9):
195
- def __class_getitem__(cls, item: Any, /) -> GenericAlias:
196
- """See PEP 585"""
197
- ...
198
-
199
- @final
200
- class Pattern(Generic[AnyStr]):
201
- @property
202
- def flags(self) -> int:
203
- """The regex matching flags."""
204
- ...
205
- @property
206
- def groupindex(self) -> Mapping[str, int]:
207
- """A dictionary mapping group names to group numbers."""
208
- ...
209
- @property
210
- def groups(self) -> int:
211
- """The number of capturing groups in the pattern."""
212
- ...
213
- @property
214
- def pattern(self) -> AnyStr:
215
- """The pattern string from which the RE object was compiled."""
216
- ...
217
- @overload
218
- def search(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
219
- """
220
- Scan through string looking for a match, and return a corresponding match object instance.
221
-
222
- Return None if no position in the string matches.
223
- """
224
- ...
225
- @overload
226
- def search(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> Match[bytes] | None:
227
- """
228
- Scan through string looking for a match, and return a corresponding match object instance.
229
-
230
- Return None if no position in the string matches.
231
- """
232
- ...
233
- @overload
234
- def search(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
235
- """
236
- Scan through string looking for a match, and return a corresponding match object instance.
237
-
238
- Return None if no position in the string matches.
239
- """
240
- ...
241
- @overload
242
- def match(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
243
- """Matches zero or more characters at the beginning of the string."""
244
- ...
245
- @overload
246
- def match(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> Match[bytes] | None:
247
- """Matches zero or more characters at the beginning of the string."""
248
- ...
249
- @overload
250
- def match(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
251
- """Matches zero or more characters at the beginning of the string."""
252
- ...
253
- @overload
254
- def fullmatch(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
255
- """Matches against all of the string."""
256
- ...
257
- @overload
258
- def fullmatch(
259
- self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize
260
- ) -> Match[bytes] | None:
261
- """Matches against all of the string."""
262
- ...
263
- @overload
264
- def fullmatch(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
265
- """Matches against all of the string."""
266
- ...
267
- @overload
268
- def split(self: Pattern[str], string: str, maxsplit: int = 0) -> list[str | MaybeNone]:
269
- """Split string by the occurrences of pattern."""
270
- ...
271
- @overload
272
- def split(self: Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0) -> list[bytes | MaybeNone]:
273
- """Split string by the occurrences of pattern."""
274
- ...
275
- @overload
276
- def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | MaybeNone]:
277
- """Split string by the occurrences of pattern."""
278
- ...
279
- # return type depends on the number of groups in the pattern
280
- @overload
281
- def findall(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]:
282
- """Return a list of all non-overlapping matches of pattern in string."""
283
- ...
284
- @overload
285
- def findall(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]:
286
- """Return a list of all non-overlapping matches of pattern in string."""
287
- ...
288
- @overload
289
- def findall(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> list[AnyStr]:
290
- """Return a list of all non-overlapping matches of pattern in string."""
291
- ...
292
- @overload
293
- def finditer(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Iterator[Match[str]]:
294
- """
295
- Return an iterator over all non-overlapping matches for the RE pattern in string.
296
-
297
- For each match, the iterator returns a match object.
298
- """
299
- ...
300
- @overload
301
- def finditer(
302
- self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize
303
- ) -> Iterator[Match[bytes]]:
304
- """
305
- Return an iterator over all non-overlapping matches for the RE pattern in string.
306
-
307
- For each match, the iterator returns a match object.
308
- """
309
- ...
310
- @overload
311
- def finditer(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Iterator[Match[AnyStr]]:
312
- """
313
- Return an iterator over all non-overlapping matches for the RE pattern in string.
314
-
315
- For each match, the iterator returns a match object.
316
- """
317
- ...
318
- @overload
319
- def sub(self: Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0) -> str:
320
- """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
321
- ...
322
- @overload
323
- def sub(
324
- self: Pattern[bytes],
325
- repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
326
- string: ReadableBuffer,
327
- count: int = 0,
328
- ) -> bytes:
329
- """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
330
- ...
331
- @overload
332
- def sub(self, repl: AnyStr | Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = 0) -> AnyStr:
333
- """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
334
- ...
335
- @overload
336
- def subn(self: Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0) -> tuple[str, int]:
337
- """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
338
- ...
339
- @overload
340
- def subn(
341
- self: Pattern[bytes],
342
- repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
343
- string: ReadableBuffer,
344
- count: int = 0,
345
- ) -> tuple[bytes, int]:
346
- """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
347
- ...
348
- @overload
349
- def subn(self, repl: AnyStr | Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = 0) -> tuple[AnyStr, int]:
350
- """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
351
- ...
352
- def __copy__(self) -> Pattern[AnyStr]: ...
353
- def __deepcopy__(self, memo: Any, /) -> Pattern[AnyStr]: ...
354
- def __eq__(self, value: object, /) -> bool:
355
- """Return self==value."""
356
- ...
357
- def __hash__(self) -> int:
358
- """Return hash(self)."""
359
- ...
360
- if sys.version_info >= (3, 9):
361
- def __class_getitem__(cls, item: Any, /) -> GenericAlias:
362
- """See PEP 585"""
363
- ...
364
-
365
- # ----- re variables and constants -----
366
-
367
- class RegexFlag(enum.IntFlag):
368
- A = sre_compile.SRE_FLAG_ASCII
369
- ASCII = A
370
- DEBUG = sre_compile.SRE_FLAG_DEBUG
371
- I = sre_compile.SRE_FLAG_IGNORECASE
372
- IGNORECASE = I
373
- L = sre_compile.SRE_FLAG_LOCALE
374
- LOCALE = L
375
- M = sre_compile.SRE_FLAG_MULTILINE
376
- MULTILINE = M
377
- S = sre_compile.SRE_FLAG_DOTALL
378
- DOTALL = S
379
- X = sre_compile.SRE_FLAG_VERBOSE
380
- VERBOSE = X
381
- U = sre_compile.SRE_FLAG_UNICODE
382
- UNICODE = U
383
- if sys.version_info < (3, 13):
384
- T = sre_compile.SRE_FLAG_TEMPLATE
385
- TEMPLATE = T
386
- if sys.version_info >= (3, 11):
387
- NOFLAG = 0
388
-
389
- A = RegexFlag.A
390
- ASCII = RegexFlag.ASCII
391
- DEBUG = RegexFlag.DEBUG
392
- I = RegexFlag.I
393
- IGNORECASE = RegexFlag.IGNORECASE
394
- L = RegexFlag.L
395
- LOCALE = RegexFlag.LOCALE
396
- M = RegexFlag.M
397
- MULTILINE = RegexFlag.MULTILINE
398
- S = RegexFlag.S
399
- DOTALL = RegexFlag.DOTALL
400
- X = RegexFlag.X
401
- VERBOSE = RegexFlag.VERBOSE
402
- U = RegexFlag.U
403
- UNICODE = RegexFlag.UNICODE
404
- if sys.version_info < (3, 13):
405
- T = RegexFlag.T
406
- TEMPLATE = RegexFlag.TEMPLATE
407
- if sys.version_info >= (3, 11):
408
- NOFLAG = RegexFlag.NOFLAG
409
- _FlagsType: TypeAlias = int | RegexFlag
410
-
411
- # Type-wise the compile() overloads are unnecessary, they could also be modeled using
412
- # unions in the parameter types. However mypy has a bug regarding TypeVar
413
- # constraints (https://github.com/python/mypy/issues/11880),
414
- # which limits us here because AnyStr is a constrained TypeVar.
415
-
416
- # pattern arguments do *not* accept arbitrary buffers such as bytearray,
417
- # because the pattern must be hashable.
418
- @overload
419
- def compile(pattern: AnyStr, flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
420
- @overload
421
- def compile(pattern: Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
422
- @overload
423
- def search(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
424
- @overload
425
- def search(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
426
- @overload
427
- def match(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
428
- @overload
429
- def match(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
430
- @overload
431
- def fullmatch(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
432
- @overload
433
- def fullmatch(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
434
- @overload
435
- def split(pattern: str | Pattern[str], string: str, maxsplit: int = 0, flags: _FlagsType = 0) -> list[str | MaybeNone]: ...
436
- @overload
437
- def split(
438
- pattern: bytes | Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0, flags: _FlagsType = 0
439
- ) -> list[bytes | MaybeNone]: ...
440
- @overload
441
- def findall(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> list[Any]: ...
442
- @overload
443
- def findall(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> list[Any]: ...
444
- @overload
445
- def finditer(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Iterator[Match[str]]: ...
446
- @overload
447
- def finditer(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Iterator[Match[bytes]]: ...
448
- @overload
449
- def sub(
450
- pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0, flags: _FlagsType = 0
451
- ) -> str: ...
452
- @overload
453
- def sub(
454
- pattern: bytes | Pattern[bytes],
455
- repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
456
- string: ReadableBuffer,
457
- count: int = 0,
458
- flags: _FlagsType = 0,
459
- ) -> bytes: ...
460
- @overload
461
- def subn(
462
- pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0, flags: _FlagsType = 0
463
- ) -> tuple[str, int]: ...
464
- @overload
465
- def subn(
466
- pattern: bytes | Pattern[bytes],
467
- repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
468
- string: ReadableBuffer,
469
- count: int = 0,
470
- flags: _FlagsType = 0,
471
- ) -> tuple[bytes, int]: ...
472
- def escape(pattern: AnyStr) -> AnyStr: ...
473
- def purge() -> None: ...
474
-
475
- if sys.version_info < (3, 13):
476
- def template(pattern: AnyStr | Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
1
+ import enum
2
+ import sre_compile
3
+ import sre_constants
4
+ import sys
5
+ from _typeshed import MaybeNone, ReadableBuffer
6
+ from collections.abc import Callable, Iterator, Mapping
7
+ from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload
8
+ from typing_extensions import TypeAlias
9
+
10
+ if sys.version_info >= (3, 9):
11
+ from types import GenericAlias
12
+
13
+ __all__ = [
14
+ "match",
15
+ "fullmatch",
16
+ "search",
17
+ "sub",
18
+ "subn",
19
+ "split",
20
+ "findall",
21
+ "finditer",
22
+ "compile",
23
+ "purge",
24
+ "escape",
25
+ "error",
26
+ "A",
27
+ "I",
28
+ "L",
29
+ "M",
30
+ "S",
31
+ "X",
32
+ "U",
33
+ "ASCII",
34
+ "IGNORECASE",
35
+ "LOCALE",
36
+ "MULTILINE",
37
+ "DOTALL",
38
+ "VERBOSE",
39
+ "UNICODE",
40
+ "Match",
41
+ "Pattern",
42
+ ]
43
+ if sys.version_info < (3, 13):
44
+ __all__ += ["template"]
45
+
46
+ if sys.version_info >= (3, 11):
47
+ __all__ += ["NOFLAG", "RegexFlag"]
48
+
49
+ if sys.version_info >= (3, 13):
50
+ __all__ += ["PatternError"]
51
+
52
+ PatternError = sre_constants.error
53
+
54
+ _T = TypeVar("_T")
55
+
56
+ # The implementation defines this in re._constants (version_info >= 3, 11) or
57
+ # sre_constants. Typeshed has it here because its __module__ attribute is set to "re".
58
+ class error(Exception):
59
+ msg: str
60
+ pattern: str | bytes | None
61
+ pos: int | None
62
+ lineno: int
63
+ colno: int
64
+ def __init__(self, msg: str, pattern: str | bytes | None = None, pos: int | None = None) -> None: ...
65
+
66
+ @final
67
+ class Match(Generic[AnyStr]):
68
+ @property
69
+ def pos(self) -> int:
70
+ """The index into the string at which the RE engine started looking for a match."""
71
+ ...
72
+ @property
73
+ def endpos(self) -> int:
74
+ """The index into the string beyond which the RE engine will not go."""
75
+ ...
76
+ @property
77
+ def lastindex(self) -> int | None:
78
+ """The integer index of the last matched capturing group."""
79
+ ...
80
+ @property
81
+ def lastgroup(self) -> str | None:
82
+ """The name of the last matched capturing group."""
83
+ ...
84
+ @property
85
+ def string(self) -> AnyStr:
86
+ """The string passed to match() or search()."""
87
+ ...
88
+
89
+ # The regular expression object whose match() or search() method produced
90
+ # this match instance.
91
+ @property
92
+ def re(self) -> Pattern[AnyStr]:
93
+ """The regular expression object."""
94
+ ...
95
+ @overload
96
+ def expand(self: Match[str], template: str) -> str:
97
+ """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
98
+ ...
99
+ @overload
100
+ def expand(self: Match[bytes], template: ReadableBuffer) -> bytes:
101
+ """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
102
+ ...
103
+ @overload
104
+ def expand(self, template: AnyStr) -> AnyStr:
105
+ """Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."""
106
+ ...
107
+ # group() returns "AnyStr" or "AnyStr | None", depending on the pattern.
108
+ @overload
109
+ def group(self, group: Literal[0] = 0, /) -> AnyStr:
110
+ """
111
+ group([group1, ...]) -> str or tuple.
112
+ Return subgroup(s) of the match by indices or names.
113
+ For 0 returns the entire match.
114
+ """
115
+ ...
116
+ @overload
117
+ def group(self, group: str | int, /) -> AnyStr | MaybeNone:
118
+ """
119
+ group([group1, ...]) -> str or tuple.
120
+ Return subgroup(s) of the match by indices or names.
121
+ For 0 returns the entire match.
122
+ """
123
+ ...
124
+ @overload
125
+ def group(self, group1: str | int, group2: str | int, /, *groups: str | int) -> tuple[AnyStr | MaybeNone, ...]:
126
+ """
127
+ group([group1, ...]) -> str or tuple.
128
+ Return subgroup(s) of the match by indices or names.
129
+ For 0 returns the entire match.
130
+ """
131
+ ...
132
+ # Each item of groups()'s return tuple is either "AnyStr" or
133
+ # "AnyStr | None", depending on the pattern.
134
+ @overload
135
+ def groups(self) -> tuple[AnyStr | MaybeNone, ...]:
136
+ """
137
+ Return a tuple containing all the subgroups of the match, from 1.
138
+
139
+ default
140
+ Is used for groups that did not participate in the match.
141
+ """
142
+ ...
143
+ @overload
144
+ def groups(self, default: _T) -> tuple[AnyStr | _T, ...]:
145
+ """
146
+ Return a tuple containing all the subgroups of the match, from 1.
147
+
148
+ default
149
+ Is used for groups that did not participate in the match.
150
+ """
151
+ ...
152
+ # Each value in groupdict()'s return dict is either "AnyStr" or
153
+ # "AnyStr | None", depending on the pattern.
154
+ @overload
155
+ def groupdict(self) -> dict[str, AnyStr | MaybeNone]:
156
+ """
157
+ Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
158
+
159
+ default
160
+ Is used for groups that did not participate in the match.
161
+ """
162
+ ...
163
+ @overload
164
+ def groupdict(self, default: _T) -> dict[str, AnyStr | _T]:
165
+ """
166
+ Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
167
+
168
+ default
169
+ Is used for groups that did not participate in the match.
170
+ """
171
+ ...
172
+ def start(self, group: int | str = 0, /) -> int:
173
+ """Return index of the start of the substring matched by group."""
174
+ ...
175
+ def end(self, group: int | str = 0, /) -> int:
176
+ """Return index of the end of the substring matched by group."""
177
+ ...
178
+ def span(self, group: int | str = 0, /) -> tuple[int, int]:
179
+ """For match object m, return the 2-tuple (m.start(group), m.end(group))."""
180
+ ...
181
+ @property
182
+ def regs(self) -> tuple[tuple[int, int], ...]: ... # undocumented
183
+ # __getitem__() returns "AnyStr" or "AnyStr | None", depending on the pattern.
184
+ @overload
185
+ def __getitem__(self, key: Literal[0], /) -> AnyStr:
186
+ """Return self[key]."""
187
+ ...
188
+ @overload
189
+ def __getitem__(self, key: int | str, /) -> AnyStr | MaybeNone:
190
+ """Return self[key]."""
191
+ ...
192
+ def __copy__(self) -> Match[AnyStr]: ...
193
+ def __deepcopy__(self, memo: Any, /) -> Match[AnyStr]: ...
194
+ if sys.version_info >= (3, 9):
195
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
196
+ """See PEP 585"""
197
+ ...
198
+
199
+ @final
200
+ class Pattern(Generic[AnyStr]):
201
+ @property
202
+ def flags(self) -> int:
203
+ """The regex matching flags."""
204
+ ...
205
+ @property
206
+ def groupindex(self) -> Mapping[str, int]:
207
+ """A dictionary mapping group names to group numbers."""
208
+ ...
209
+ @property
210
+ def groups(self) -> int:
211
+ """The number of capturing groups in the pattern."""
212
+ ...
213
+ @property
214
+ def pattern(self) -> AnyStr:
215
+ """The pattern string from which the RE object was compiled."""
216
+ ...
217
+ @overload
218
+ def search(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
219
+ """
220
+ Scan through string looking for a match, and return a corresponding match object instance.
221
+
222
+ Return None if no position in the string matches.
223
+ """
224
+ ...
225
+ @overload
226
+ def search(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> Match[bytes] | None:
227
+ """
228
+ Scan through string looking for a match, and return a corresponding match object instance.
229
+
230
+ Return None if no position in the string matches.
231
+ """
232
+ ...
233
+ @overload
234
+ def search(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
235
+ """
236
+ Scan through string looking for a match, and return a corresponding match object instance.
237
+
238
+ Return None if no position in the string matches.
239
+ """
240
+ ...
241
+ @overload
242
+ def match(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
243
+ """Matches zero or more characters at the beginning of the string."""
244
+ ...
245
+ @overload
246
+ def match(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> Match[bytes] | None:
247
+ """Matches zero or more characters at the beginning of the string."""
248
+ ...
249
+ @overload
250
+ def match(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
251
+ """Matches zero or more characters at the beginning of the string."""
252
+ ...
253
+ @overload
254
+ def fullmatch(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Match[str] | None:
255
+ """Matches against all of the string."""
256
+ ...
257
+ @overload
258
+ def fullmatch(
259
+ self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize
260
+ ) -> Match[bytes] | None:
261
+ """Matches against all of the string."""
262
+ ...
263
+ @overload
264
+ def fullmatch(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None:
265
+ """Matches against all of the string."""
266
+ ...
267
+ @overload
268
+ def split(self: Pattern[str], string: str, maxsplit: int = 0) -> list[str | MaybeNone]:
269
+ """Split string by the occurrences of pattern."""
270
+ ...
271
+ @overload
272
+ def split(self: Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0) -> list[bytes | MaybeNone]:
273
+ """Split string by the occurrences of pattern."""
274
+ ...
275
+ @overload
276
+ def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | MaybeNone]:
277
+ """Split string by the occurrences of pattern."""
278
+ ...
279
+ # return type depends on the number of groups in the pattern
280
+ @overload
281
+ def findall(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]:
282
+ """Return a list of all non-overlapping matches of pattern in string."""
283
+ ...
284
+ @overload
285
+ def findall(self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]:
286
+ """Return a list of all non-overlapping matches of pattern in string."""
287
+ ...
288
+ @overload
289
+ def findall(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> list[AnyStr]:
290
+ """Return a list of all non-overlapping matches of pattern in string."""
291
+ ...
292
+ @overload
293
+ def finditer(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> Iterator[Match[str]]:
294
+ """
295
+ Return an iterator over all non-overlapping matches for the RE pattern in string.
296
+
297
+ For each match, the iterator returns a match object.
298
+ """
299
+ ...
300
+ @overload
301
+ def finditer(
302
+ self: Pattern[bytes], string: ReadableBuffer, pos: int = 0, endpos: int = sys.maxsize
303
+ ) -> Iterator[Match[bytes]]:
304
+ """
305
+ Return an iterator over all non-overlapping matches for the RE pattern in string.
306
+
307
+ For each match, the iterator returns a match object.
308
+ """
309
+ ...
310
+ @overload
311
+ def finditer(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Iterator[Match[AnyStr]]:
312
+ """
313
+ Return an iterator over all non-overlapping matches for the RE pattern in string.
314
+
315
+ For each match, the iterator returns a match object.
316
+ """
317
+ ...
318
+ @overload
319
+ def sub(self: Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0) -> str:
320
+ """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
321
+ ...
322
+ @overload
323
+ def sub(
324
+ self: Pattern[bytes],
325
+ repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
326
+ string: ReadableBuffer,
327
+ count: int = 0,
328
+ ) -> bytes:
329
+ """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
330
+ ...
331
+ @overload
332
+ def sub(self, repl: AnyStr | Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = 0) -> AnyStr:
333
+ """Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."""
334
+ ...
335
+ @overload
336
+ def subn(self: Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0) -> tuple[str, int]:
337
+ """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
338
+ ...
339
+ @overload
340
+ def subn(
341
+ self: Pattern[bytes],
342
+ repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
343
+ string: ReadableBuffer,
344
+ count: int = 0,
345
+ ) -> tuple[bytes, int]:
346
+ """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
347
+ ...
348
+ @overload
349
+ def subn(self, repl: AnyStr | Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = 0) -> tuple[AnyStr, int]:
350
+ """Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."""
351
+ ...
352
+ def __copy__(self) -> Pattern[AnyStr]: ...
353
+ def __deepcopy__(self, memo: Any, /) -> Pattern[AnyStr]: ...
354
+ def __eq__(self, value: object, /) -> bool:
355
+ """Return self==value."""
356
+ ...
357
+ def __hash__(self) -> int:
358
+ """Return hash(self)."""
359
+ ...
360
+ if sys.version_info >= (3, 9):
361
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
362
+ """See PEP 585"""
363
+ ...
364
+
365
+ # ----- re variables and constants -----
366
+
367
+ class RegexFlag(enum.IntFlag):
368
+ A = sre_compile.SRE_FLAG_ASCII
369
+ ASCII = A
370
+ DEBUG = sre_compile.SRE_FLAG_DEBUG
371
+ I = sre_compile.SRE_FLAG_IGNORECASE
372
+ IGNORECASE = I
373
+ L = sre_compile.SRE_FLAG_LOCALE
374
+ LOCALE = L
375
+ M = sre_compile.SRE_FLAG_MULTILINE
376
+ MULTILINE = M
377
+ S = sre_compile.SRE_FLAG_DOTALL
378
+ DOTALL = S
379
+ X = sre_compile.SRE_FLAG_VERBOSE
380
+ VERBOSE = X
381
+ U = sre_compile.SRE_FLAG_UNICODE
382
+ UNICODE = U
383
+ if sys.version_info < (3, 13):
384
+ T = sre_compile.SRE_FLAG_TEMPLATE
385
+ TEMPLATE = T
386
+ if sys.version_info >= (3, 11):
387
+ NOFLAG = 0
388
+
389
+ A = RegexFlag.A
390
+ ASCII = RegexFlag.ASCII
391
+ DEBUG = RegexFlag.DEBUG
392
+ I = RegexFlag.I
393
+ IGNORECASE = RegexFlag.IGNORECASE
394
+ L = RegexFlag.L
395
+ LOCALE = RegexFlag.LOCALE
396
+ M = RegexFlag.M
397
+ MULTILINE = RegexFlag.MULTILINE
398
+ S = RegexFlag.S
399
+ DOTALL = RegexFlag.DOTALL
400
+ X = RegexFlag.X
401
+ VERBOSE = RegexFlag.VERBOSE
402
+ U = RegexFlag.U
403
+ UNICODE = RegexFlag.UNICODE
404
+ if sys.version_info < (3, 13):
405
+ T = RegexFlag.T
406
+ TEMPLATE = RegexFlag.TEMPLATE
407
+ if sys.version_info >= (3, 11):
408
+ NOFLAG = RegexFlag.NOFLAG
409
+ _FlagsType: TypeAlias = int | RegexFlag
410
+
411
+ # Type-wise the compile() overloads are unnecessary, they could also be modeled using
412
+ # unions in the parameter types. However mypy has a bug regarding TypeVar
413
+ # constraints (https://github.com/python/mypy/issues/11880),
414
+ # which limits us here because AnyStr is a constrained TypeVar.
415
+
416
+ # pattern arguments do *not* accept arbitrary buffers such as bytearray,
417
+ # because the pattern must be hashable.
418
+ @overload
419
+ def compile(pattern: AnyStr, flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
420
+ @overload
421
+ def compile(pattern: Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
422
+ @overload
423
+ def search(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
424
+ @overload
425
+ def search(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
426
+ @overload
427
+ def match(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
428
+ @overload
429
+ def match(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
430
+ @overload
431
+ def fullmatch(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None: ...
432
+ @overload
433
+ def fullmatch(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
434
+ @overload
435
+ def split(pattern: str | Pattern[str], string: str, maxsplit: int = 0, flags: _FlagsType = 0) -> list[str | MaybeNone]: ...
436
+ @overload
437
+ def split(
438
+ pattern: bytes | Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0, flags: _FlagsType = 0
439
+ ) -> list[bytes | MaybeNone]: ...
440
+ @overload
441
+ def findall(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> list[Any]: ...
442
+ @overload
443
+ def findall(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> list[Any]: ...
444
+ @overload
445
+ def finditer(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Iterator[Match[str]]: ...
446
+ @overload
447
+ def finditer(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Iterator[Match[bytes]]: ...
448
+ @overload
449
+ def sub(
450
+ pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0, flags: _FlagsType = 0
451
+ ) -> str: ...
452
+ @overload
453
+ def sub(
454
+ pattern: bytes | Pattern[bytes],
455
+ repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
456
+ string: ReadableBuffer,
457
+ count: int = 0,
458
+ flags: _FlagsType = 0,
459
+ ) -> bytes: ...
460
+ @overload
461
+ def subn(
462
+ pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, count: int = 0, flags: _FlagsType = 0
463
+ ) -> tuple[str, int]: ...
464
+ @overload
465
+ def subn(
466
+ pattern: bytes | Pattern[bytes],
467
+ repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
468
+ string: ReadableBuffer,
469
+ count: int = 0,
470
+ flags: _FlagsType = 0,
471
+ ) -> tuple[bytes, int]: ...
472
+ def escape(pattern: AnyStr) -> AnyStr: ...
473
+ def purge() -> None: ...
474
+
475
+ if sys.version_info < (3, 13):
476
+ def template(pattern: AnyStr | Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ...