mypy-dev 2.4.0a1__cp315-cp315-win_amd64.whl

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 (1464) hide show
  1. 08ae81f72d5a2b5fa9e0__mypyc.cp315-win_amd64.pyd +0 -0
  2. mypy/__init__.cp315-win_amd64.pyd +0 -0
  3. mypy/__init__.py +1 -0
  4. mypy/__main__.py +52 -0
  5. mypy/api.cp315-win_amd64.pyd +0 -0
  6. mypy/api.py +95 -0
  7. mypy/applytype.cp315-win_amd64.pyd +0 -0
  8. mypy/applytype.py +317 -0
  9. mypy/argmap.cp315-win_amd64.pyd +0 -0
  10. mypy/argmap.py +269 -0
  11. mypy/binder.cp315-win_amd64.pyd +0 -0
  12. mypy/binder.py +710 -0
  13. mypy/bogus_type.py +27 -0
  14. mypy/build.cp315-win_amd64.pyd +0 -0
  15. mypy/build.py +5430 -0
  16. mypy/build_worker/__init__.cp315-win_amd64.pyd +0 -0
  17. mypy/build_worker/__init__.py +0 -0
  18. mypy/build_worker/__main__.py +6 -0
  19. mypy/build_worker/worker.cp315-win_amd64.pyd +0 -0
  20. mypy/build_worker/worker.py +361 -0
  21. mypy/cache.cp315-win_amd64.pyd +0 -0
  22. mypy/cache.py +612 -0
  23. mypy/checker.cp315-win_amd64.pyd +0 -0
  24. mypy/checker.py +10027 -0
  25. mypy/checker_shared.cp315-win_amd64.pyd +0 -0
  26. mypy/checker_shared.py +377 -0
  27. mypy/checker_state.cp315-win_amd64.pyd +0 -0
  28. mypy/checker_state.py +30 -0
  29. mypy/checkexpr.cp315-win_amd64.pyd +0 -0
  30. mypy/checkexpr.py +7032 -0
  31. mypy/checkmember.cp315-win_amd64.pyd +0 -0
  32. mypy/checkmember.py +1593 -0
  33. mypy/checkpattern.cp315-win_amd64.pyd +0 -0
  34. mypy/checkpattern.py +885 -0
  35. mypy/checkstrformat.cp315-win_amd64.pyd +0 -0
  36. mypy/checkstrformat.py +1103 -0
  37. mypy/config_parser.cp315-win_amd64.pyd +0 -0
  38. mypy/config_parser.py +734 -0
  39. mypy/constant_fold.cp315-win_amd64.pyd +0 -0
  40. mypy/constant_fold.py +187 -0
  41. mypy/constraints.cp315-win_amd64.pyd +0 -0
  42. mypy/constraints.py +1743 -0
  43. mypy/copytype.cp315-win_amd64.pyd +0 -0
  44. mypy/copytype.py +137 -0
  45. mypy/defaults.cp315-win_amd64.pyd +0 -0
  46. mypy/defaults.py +58 -0
  47. mypy/dmypy/__init__.cp315-win_amd64.pyd +0 -0
  48. mypy/dmypy/__init__.py +0 -0
  49. mypy/dmypy/__main__.py +6 -0
  50. mypy/dmypy/client.cp315-win_amd64.pyd +0 -0
  51. mypy/dmypy/client.py +732 -0
  52. mypy/dmypy_os.cp315-win_amd64.pyd +0 -0
  53. mypy/dmypy_os.py +43 -0
  54. mypy/dmypy_server.cp315-win_amd64.pyd +0 -0
  55. mypy/dmypy_server.py +1132 -0
  56. mypy/dmypy_util.cp315-win_amd64.pyd +0 -0
  57. mypy/dmypy_util.py +117 -0
  58. mypy/erasetype.cp315-win_amd64.pyd +0 -0
  59. mypy/erasetype.py +301 -0
  60. mypy/error_formatter.cp315-win_amd64.pyd +0 -0
  61. mypy/error_formatter.py +39 -0
  62. mypy/errorcodes.cp315-win_amd64.pyd +0 -0
  63. mypy/errorcodes.py +340 -0
  64. mypy/errors.cp315-win_amd64.pyd +0 -0
  65. mypy/errors.py +1468 -0
  66. mypy/evalexpr.cp315-win_amd64.pyd +0 -0
  67. mypy/evalexpr.py +211 -0
  68. mypy/expandtype.cp315-win_amd64.pyd +0 -0
  69. mypy/expandtype.py +662 -0
  70. mypy/exportjson.py +616 -0
  71. mypy/exprtotype.cp315-win_amd64.pyd +0 -0
  72. mypy/exprtotype.py +285 -0
  73. mypy/fastparse.cp315-win_amd64.pyd +0 -0
  74. mypy/fastparse.py +2259 -0
  75. mypy/find_sources.cp315-win_amd64.pyd +0 -0
  76. mypy/find_sources.py +257 -0
  77. mypy/fixup.cp315-win_amd64.pyd +0 -0
  78. mypy/fixup.py +438 -0
  79. mypy/freetree.cp315-win_amd64.pyd +0 -0
  80. mypy/freetree.py +23 -0
  81. mypy/fscache.cp315-win_amd64.pyd +0 -0
  82. mypy/fscache.py +312 -0
  83. mypy/fswatcher.cp315-win_amd64.pyd +0 -0
  84. mypy/fswatcher.py +106 -0
  85. mypy/gclogger.cp315-win_amd64.pyd +0 -0
  86. mypy/gclogger.py +48 -0
  87. mypy/git.cp315-win_amd64.pyd +0 -0
  88. mypy/git.py +69 -0
  89. mypy/graph_utils.cp315-win_amd64.pyd +0 -0
  90. mypy/graph_utils.py +161 -0
  91. mypy/indirection.cp315-win_amd64.pyd +0 -0
  92. mypy/indirection.py +176 -0
  93. mypy/infer.cp315-win_amd64.pyd +0 -0
  94. mypy/infer.py +80 -0
  95. mypy/inspections.cp315-win_amd64.pyd +0 -0
  96. mypy/inspections.py +626 -0
  97. mypy/ipc.cp315-win_amd64.pyd +0 -0
  98. mypy/ipc.py +493 -0
  99. mypy/join.cp315-win_amd64.pyd +0 -0
  100. mypy/join.py +962 -0
  101. mypy/known_modules.cp315-win_amd64.pyd +0 -0
  102. mypy/known_modules.py +174 -0
  103. mypy/literals.cp315-win_amd64.pyd +0 -0
  104. mypy/literals.py +327 -0
  105. mypy/lookup.cp315-win_amd64.pyd +0 -0
  106. mypy/lookup.py +80 -0
  107. mypy/main.cp315-win_amd64.pyd +0 -0
  108. mypy/main.py +1772 -0
  109. mypy/maptype.cp315-win_amd64.pyd +0 -0
  110. mypy/maptype.py +109 -0
  111. mypy/meet.cp315-win_amd64.pyd +0 -0
  112. mypy/meet.py +1371 -0
  113. mypy/memprofile.cp315-win_amd64.pyd +0 -0
  114. mypy/memprofile.py +122 -0
  115. mypy/message_registry.cp315-win_amd64.pyd +0 -0
  116. mypy/message_registry.py +378 -0
  117. mypy/messages.cp315-win_amd64.pyd +0 -0
  118. mypy/messages.py +3530 -0
  119. mypy/metastore.cp315-win_amd64.pyd +0 -0
  120. mypy/metastore.py +278 -0
  121. mypy/mixedtraverser.cp315-win_amd64.pyd +0 -0
  122. mypy/mixedtraverser.py +147 -0
  123. mypy/modulefinder.cp315-win_amd64.pyd +0 -0
  124. mypy/modulefinder.py +1008 -0
  125. mypy/moduleinspect.cp315-win_amd64.pyd +0 -0
  126. mypy/moduleinspect.py +184 -0
  127. mypy/modules_state.cp315-win_amd64.pyd +0 -0
  128. mypy/modules_state.py +20 -0
  129. mypy/mro.cp315-win_amd64.pyd +0 -0
  130. mypy/mro.py +62 -0
  131. mypy/nativeparse.cp315-win_amd64.pyd +0 -0
  132. mypy/nativeparse.py +2089 -0
  133. mypy/nodes.cp315-win_amd64.pyd +0 -0
  134. mypy/nodes.py +5593 -0
  135. mypy/operators.cp315-win_amd64.pyd +0 -0
  136. mypy/operators.py +126 -0
  137. mypy/options.cp315-win_amd64.pyd +0 -0
  138. mypy/options.py +674 -0
  139. mypy/parse.cp315-win_amd64.pyd +0 -0
  140. mypy/parse.py +117 -0
  141. mypy/partially_defined.cp315-win_amd64.pyd +0 -0
  142. mypy/partially_defined.py +703 -0
  143. mypy/patterns.cp315-win_amd64.pyd +0 -0
  144. mypy/patterns.py +150 -0
  145. mypy/plugin.cp315-win_amd64.pyd +0 -0
  146. mypy/plugin.py +945 -0
  147. mypy/plugins/__init__.py +0 -0
  148. mypy/plugins/attrs.cp315-win_amd64.pyd +0 -0
  149. mypy/plugins/attrs.py +1179 -0
  150. mypy/plugins/common.cp315-win_amd64.pyd +0 -0
  151. mypy/plugins/common.py +441 -0
  152. mypy/plugins/constants.cp315-win_amd64.pyd +0 -0
  153. mypy/plugins/constants.py +20 -0
  154. mypy/plugins/ctypes.cp315-win_amd64.pyd +0 -0
  155. mypy/plugins/ctypes.py +245 -0
  156. mypy/plugins/dataclasses.cp315-win_amd64.pyd +0 -0
  157. mypy/plugins/dataclasses.py +1131 -0
  158. mypy/plugins/default.cp315-win_amd64.pyd +0 -0
  159. mypy/plugins/default.py +613 -0
  160. mypy/plugins/enums.cp315-win_amd64.pyd +0 -0
  161. mypy/plugins/enums.py +299 -0
  162. mypy/plugins/functools.cp315-win_amd64.pyd +0 -0
  163. mypy/plugins/functools.py +399 -0
  164. mypy/plugins/proper_plugin.cp315-win_amd64.pyd +0 -0
  165. mypy/plugins/proper_plugin.py +178 -0
  166. mypy/plugins/singledispatch.cp315-win_amd64.pyd +0 -0
  167. mypy/plugins/singledispatch.py +213 -0
  168. mypy/py.typed +1 -0
  169. mypy/pyinfo.py +79 -0
  170. mypy/reachability.cp315-win_amd64.pyd +0 -0
  171. mypy/reachability.py +370 -0
  172. mypy/refinfo.cp315-win_amd64.pyd +0 -0
  173. mypy/refinfo.py +92 -0
  174. mypy/renaming.cp315-win_amd64.pyd +0 -0
  175. mypy/renaming.py +583 -0
  176. mypy/report.cp315-win_amd64.pyd +0 -0
  177. mypy/report.py +930 -0
  178. mypy/scope.cp315-win_amd64.pyd +0 -0
  179. mypy/scope.py +125 -0
  180. mypy/semanal.cp315-win_amd64.pyd +0 -0
  181. mypy/semanal.py +8466 -0
  182. mypy/semanal_classprop.cp315-win_amd64.pyd +0 -0
  183. mypy/semanal_classprop.py +188 -0
  184. mypy/semanal_enum.cp315-win_amd64.pyd +0 -0
  185. mypy/semanal_enum.py +259 -0
  186. mypy/semanal_infer.cp315-win_amd64.pyd +0 -0
  187. mypy/semanal_infer.py +135 -0
  188. mypy/semanal_main.cp315-win_amd64.pyd +0 -0
  189. mypy/semanal_main.py +542 -0
  190. mypy/semanal_namedtuple.cp315-win_amd64.pyd +0 -0
  191. mypy/semanal_namedtuple.py +679 -0
  192. mypy/semanal_newtype.cp315-win_amd64.pyd +0 -0
  193. mypy/semanal_newtype.py +272 -0
  194. mypy/semanal_pass1.cp315-win_amd64.pyd +0 -0
  195. mypy/semanal_pass1.py +159 -0
  196. mypy/semanal_shared.cp315-win_amd64.pyd +0 -0
  197. mypy/semanal_shared.py +499 -0
  198. mypy/semanal_typeargs.cp315-win_amd64.pyd +0 -0
  199. mypy/semanal_typeargs.py +309 -0
  200. mypy/semanal_typeddict.cp315-win_amd64.pyd +0 -0
  201. mypy/semanal_typeddict.py +826 -0
  202. mypy/server/__init__.py +0 -0
  203. mypy/server/astdiff.cp315-win_amd64.pyd +0 -0
  204. mypy/server/astdiff.py +552 -0
  205. mypy/server/astmerge.cp315-win_amd64.pyd +0 -0
  206. mypy/server/astmerge.py +583 -0
  207. mypy/server/aststrip.cp315-win_amd64.pyd +0 -0
  208. mypy/server/aststrip.py +255 -0
  209. mypy/server/deps.cp315-win_amd64.pyd +0 -0
  210. mypy/server/deps.py +1149 -0
  211. mypy/server/mergecheck.cp315-win_amd64.pyd +0 -0
  212. mypy/server/mergecheck.py +84 -0
  213. mypy/server/objgraph.cp315-win_amd64.pyd +0 -0
  214. mypy/server/objgraph.py +101 -0
  215. mypy/server/subexpr.cp315-win_amd64.pyd +0 -0
  216. mypy/server/subexpr.py +208 -0
  217. mypy/server/target.cp315-win_amd64.pyd +0 -0
  218. mypy/server/target.py +11 -0
  219. mypy/server/trigger.cp315-win_amd64.pyd +0 -0
  220. mypy/server/trigger.py +26 -0
  221. mypy/server/update.cp315-win_amd64.pyd +0 -0
  222. mypy/server/update.py +1372 -0
  223. mypy/sharedparse.cp315-win_amd64.pyd +0 -0
  224. mypy/sharedparse.py +114 -0
  225. mypy/solve.cp315-win_amd64.pyd +0 -0
  226. mypy/solve.py +602 -0
  227. mypy/split_namespace.py +35 -0
  228. mypy/state.cp315-win_amd64.pyd +0 -0
  229. mypy/state.py +29 -0
  230. mypy/stats.cp315-win_amd64.pyd +0 -0
  231. mypy/stats.py +494 -0
  232. mypy/strconv.cp315-win_amd64.pyd +0 -0
  233. mypy/strconv.py +707 -0
  234. mypy/stubdoc.py +545 -0
  235. mypy/stubgen.cp315-win_amd64.pyd +0 -0
  236. mypy/stubgen.py +2064 -0
  237. mypy/stubgenc.py +1046 -0
  238. mypy/stubinfo.cp315-win_amd64.pyd +0 -0
  239. mypy/stubinfo.py +321 -0
  240. mypy/stubtest.py +2661 -0
  241. mypy/stubutil.cp315-win_amd64.pyd +0 -0
  242. mypy/stubutil.py +895 -0
  243. mypy/subtypes.cp315-win_amd64.pyd +0 -0
  244. mypy/subtypes.py +2386 -0
  245. mypy/suggestions.cp315-win_amd64.pyd +0 -0
  246. mypy/suggestions.py +1068 -0
  247. mypy/test/__init__.py +0 -0
  248. mypy/test/config.py +31 -0
  249. mypy/test/data.py +848 -0
  250. mypy/test/helpers.py +540 -0
  251. mypy/test/meta/__init__.py +0 -0
  252. mypy/test/meta/_pytest.py +72 -0
  253. mypy/test/meta/test_diff_helper.py +47 -0
  254. mypy/test/meta/test_parse_data.py +69 -0
  255. mypy/test/meta/test_update_data.py +131 -0
  256. mypy/test/test_config_parser.py +130 -0
  257. mypy/test/test_diff_cache.py +209 -0
  258. mypy/test/test_find_sources.py +376 -0
  259. mypy/test/test_nativeparse.py +305 -0
  260. mypy/test/test_ref_info.py +46 -0
  261. mypy/test/testapi.py +45 -0
  262. mypy/test/testargs.py +78 -0
  263. mypy/test/testcheck.py +358 -0
  264. mypy/test/testcmdline.py +157 -0
  265. mypy/test/testconstraints.py +134 -0
  266. mypy/test/testdaemon.py +132 -0
  267. mypy/test/testdeps.py +82 -0
  268. mypy/test/testdiff.py +70 -0
  269. mypy/test/testerrorstream.py +46 -0
  270. mypy/test/testexportjson.py +103 -0
  271. mypy/test/testfinegrained.py +442 -0
  272. mypy/test/testfinegrainedcache.py +18 -0
  273. mypy/test/testformatter.py +85 -0
  274. mypy/test/testfscache.py +100 -0
  275. mypy/test/testgraph.py +138 -0
  276. mypy/test/testinfer.py +373 -0
  277. mypy/test/testipc.py +119 -0
  278. mypy/test/testmerge.py +235 -0
  279. mypy/test/testmodulefinder.py +284 -0
  280. mypy/test/testmypyc.py +26 -0
  281. mypy/test/testoutput.py +64 -0
  282. mypy/test/testparse.py +124 -0
  283. mypy/test/testpep561.py +174 -0
  284. mypy/test/testpythoneval.py +116 -0
  285. mypy/test/testreports.py +59 -0
  286. mypy/test/testsemanal.py +210 -0
  287. mypy/test/testsolve.py +287 -0
  288. mypy/test/teststubgen.py +1650 -0
  289. mypy/test/teststubinfo.py +24 -0
  290. mypy/test/teststubtest.py +3360 -0
  291. mypy/test/testsubtypes.py +306 -0
  292. mypy/test/testtransform.py +64 -0
  293. mypy/test/testtypegen.py +83 -0
  294. mypy/test/testtypes.py +1642 -0
  295. mypy/test/testutil.py +111 -0
  296. mypy/test/typefixture.py +419 -0
  297. mypy/test/update_data.py +87 -0
  298. mypy/test/visitors.cp315-win_amd64.pyd +0 -0
  299. mypy/test/visitors.py +63 -0
  300. mypy/traverser.cp315-win_amd64.pyd +0 -0
  301. mypy/traverser.py +1105 -0
  302. mypy/treetransform.cp315-win_amd64.pyd +0 -0
  303. mypy/treetransform.py +820 -0
  304. mypy/tvar_scope.cp315-win_amd64.pyd +0 -0
  305. mypy/tvar_scope.py +154 -0
  306. mypy/type_visitor.cp315-win_amd64.pyd +0 -0
  307. mypy/type_visitor.py +630 -0
  308. mypy/typeanal.cp315-win_amd64.pyd +0 -0
  309. mypy/typeanal.py +2937 -0
  310. mypy/typeops.cp315-win_amd64.pyd +0 -0
  311. mypy/typeops.py +1353 -0
  312. mypy/types.cp315-win_amd64.pyd +0 -0
  313. mypy/types.py +4586 -0
  314. mypy/types_utils.cp315-win_amd64.pyd +0 -0
  315. mypy/types_utils.py +183 -0
  316. mypy/typeshed/LICENSE +237 -0
  317. mypy/typeshed/stdlib/VERSIONS +349 -0
  318. mypy/typeshed/stdlib/__future__.pyi +36 -0
  319. mypy/typeshed/stdlib/__main__.pyi +1 -0
  320. mypy/typeshed/stdlib/_ast.pyi +141 -0
  321. mypy/typeshed/stdlib/_asyncio.pyi +114 -0
  322. mypy/typeshed/stdlib/_bisect.pyi +103 -0
  323. mypy/typeshed/stdlib/_blake2.pyi +119 -0
  324. mypy/typeshed/stdlib/_bz2.pyi +24 -0
  325. mypy/typeshed/stdlib/_codecs.pyi +122 -0
  326. mypy/typeshed/stdlib/_collections_abc.pyi +105 -0
  327. mypy/typeshed/stdlib/_compat_pickle.pyi +10 -0
  328. mypy/typeshed/stdlib/_compression.pyi +39 -0
  329. mypy/typeshed/stdlib/_contextvars.pyi +69 -0
  330. mypy/typeshed/stdlib/_csv.pyi +116 -0
  331. mypy/typeshed/stdlib/_ctypes.pyi +370 -0
  332. mypy/typeshed/stdlib/_curses.pyi +583 -0
  333. mypy/typeshed/stdlib/_curses_panel.pyi +27 -0
  334. mypy/typeshed/stdlib/_dbm.pyi +46 -0
  335. mypy/typeshed/stdlib/_decimal.pyi +73 -0
  336. mypy/typeshed/stdlib/_frozen_importlib.pyi +115 -0
  337. mypy/typeshed/stdlib/_frozen_importlib_external.pyi +180 -0
  338. mypy/typeshed/stdlib/_gdbm.pyi +50 -0
  339. mypy/typeshed/stdlib/_hashlib.pyi +127 -0
  340. mypy/typeshed/stdlib/_heapq.pyi +18 -0
  341. mypy/typeshed/stdlib/_imp.pyi +30 -0
  342. mypy/typeshed/stdlib/_interpchannels.pyi +86 -0
  343. mypy/typeshed/stdlib/_interpqueues.pyi +31 -0
  344. mypy/typeshed/stdlib/_interpreters.pyi +62 -0
  345. mypy/typeshed/stdlib/_io.pyi +330 -0
  346. mypy/typeshed/stdlib/_json.pyi +59 -0
  347. mypy/typeshed/stdlib/_locale.pyi +121 -0
  348. mypy/typeshed/stdlib/_lsprof.pyi +34 -0
  349. mypy/typeshed/stdlib/_lzma.pyi +71 -0
  350. mypy/typeshed/stdlib/_markupbase.pyi +10 -0
  351. mypy/typeshed/stdlib/_msi.pyi +97 -0
  352. mypy/typeshed/stdlib/_multibytecodec.pyi +49 -0
  353. mypy/typeshed/stdlib/_operator.pyi +127 -0
  354. mypy/typeshed/stdlib/_osx_support.pyi +34 -0
  355. mypy/typeshed/stdlib/_pickle.pyi +114 -0
  356. mypy/typeshed/stdlib/_posixsubprocess.pyi +59 -0
  357. mypy/typeshed/stdlib/_py_abc.pyi +14 -0
  358. mypy/typeshed/stdlib/_pydecimal.pyi +50 -0
  359. mypy/typeshed/stdlib/_queue.pyi +18 -0
  360. mypy/typeshed/stdlib/_random.pyi +14 -0
  361. mypy/typeshed/stdlib/_remote_debugging.pyi +183 -0
  362. mypy/typeshed/stdlib/_sitebuiltins.pyi +18 -0
  363. mypy/typeshed/stdlib/_socket.pyi +966 -0
  364. mypy/typeshed/stdlib/_sqlite3.pyi +311 -0
  365. mypy/typeshed/stdlib/_ssl.pyi +303 -0
  366. mypy/typeshed/stdlib/_stat.pyi +119 -0
  367. mypy/typeshed/stdlib/_struct.pyi +24 -0
  368. mypy/typeshed/stdlib/_thread.pyi +123 -0
  369. mypy/typeshed/stdlib/_threading_local.pyi +24 -0
  370. mypy/typeshed/stdlib/_tkinter.pyi +156 -0
  371. mypy/typeshed/stdlib/_tracemalloc.pyi +13 -0
  372. mypy/typeshed/stdlib/_typeshed/README.md +34 -0
  373. mypy/typeshed/stdlib/_typeshed/__init__.pyi +401 -0
  374. mypy/typeshed/stdlib/_typeshed/_type_checker_internals.pyi +99 -0
  375. mypy/typeshed/stdlib/_typeshed/dbapi.pyi +36 -0
  376. mypy/typeshed/stdlib/_typeshed/importlib.pyi +18 -0
  377. mypy/typeshed/stdlib/_typeshed/wsgi.pyi +43 -0
  378. mypy/typeshed/stdlib/_typeshed/xml.pyi +9 -0
  379. mypy/typeshed/stdlib/_warnings.pyi +54 -0
  380. mypy/typeshed/stdlib/_weakref.pyi +15 -0
  381. mypy/typeshed/stdlib/_weakrefset.pyi +49 -0
  382. mypy/typeshed/stdlib/_winapi.pyi +318 -0
  383. mypy/typeshed/stdlib/_zstd.pyi +102 -0
  384. mypy/typeshed/stdlib/abc.pyi +50 -0
  385. mypy/typeshed/stdlib/aifc.pyi +79 -0
  386. mypy/typeshed/stdlib/annotationlib.pyi +156 -0
  387. mypy/typeshed/stdlib/antigravity.pyi +3 -0
  388. mypy/typeshed/stdlib/argparse.pyi +866 -0
  389. mypy/typeshed/stdlib/array.pyi +113 -0
  390. mypy/typeshed/stdlib/ast.pyi +2199 -0
  391. mypy/typeshed/stdlib/asynchat.pyi +21 -0
  392. mypy/typeshed/stdlib/asyncio/__init__.pyi +1022 -0
  393. mypy/typeshed/stdlib/asyncio/base_events.pyi +498 -0
  394. mypy/typeshed/stdlib/asyncio/base_futures.pyi +17 -0
  395. mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +62 -0
  396. mypy/typeshed/stdlib/asyncio/base_tasks.pyi +17 -0
  397. mypy/typeshed/stdlib/asyncio/constants.pyi +20 -0
  398. mypy/typeshed/stdlib/asyncio/coroutines.pyi +45 -0
  399. mypy/typeshed/stdlib/asyncio/events.pyi +671 -0
  400. mypy/typeshed/stdlib/asyncio/exceptions.pyi +44 -0
  401. mypy/typeshed/stdlib/asyncio/format_helpers.pyi +31 -0
  402. mypy/typeshed/stdlib/asyncio/futures.pyi +19 -0
  403. mypy/typeshed/stdlib/asyncio/graph.pyi +29 -0
  404. mypy/typeshed/stdlib/asyncio/locks.pyi +83 -0
  405. mypy/typeshed/stdlib/asyncio/log.pyi +3 -0
  406. mypy/typeshed/stdlib/asyncio/mixins.pyi +9 -0
  407. mypy/typeshed/stdlib/asyncio/proactor_events.pyi +53 -0
  408. mypy/typeshed/stdlib/asyncio/protocols.pyi +39 -0
  409. mypy/typeshed/stdlib/asyncio/queues.pyi +45 -0
  410. mypy/typeshed/stdlib/asyncio/runners.pyi +41 -0
  411. mypy/typeshed/stdlib/asyncio/selector_events.pyi +10 -0
  412. mypy/typeshed/stdlib/asyncio/sslproto.pyi +164 -0
  413. mypy/typeshed/stdlib/asyncio/staggered.pyi +10 -0
  414. mypy/typeshed/stdlib/asyncio/streams.pyi +124 -0
  415. mypy/typeshed/stdlib/asyncio/subprocess.pyi +166 -0
  416. mypy/typeshed/stdlib/asyncio/taskgroups.pyi +41 -0
  417. mypy/typeshed/stdlib/asyncio/tasks.pyi +315 -0
  418. mypy/typeshed/stdlib/asyncio/threads.pyi +9 -0
  419. mypy/typeshed/stdlib/asyncio/timeouts.pyi +20 -0
  420. mypy/typeshed/stdlib/asyncio/tools.pyi +51 -0
  421. mypy/typeshed/stdlib/asyncio/transports.pyi +57 -0
  422. mypy/typeshed/stdlib/asyncio/trsock.pyi +137 -0
  423. mypy/typeshed/stdlib/asyncio/unix_events.pyi +277 -0
  424. mypy/typeshed/stdlib/asyncio/windows_events.pyi +122 -0
  425. mypy/typeshed/stdlib/asyncio/windows_utils.pyi +49 -0
  426. mypy/typeshed/stdlib/asyncore.pyi +91 -0
  427. mypy/typeshed/stdlib/atexit.pyi +11 -0
  428. mypy/typeshed/stdlib/audioop.pyi +44 -0
  429. mypy/typeshed/stdlib/base64.pyi +124 -0
  430. mypy/typeshed/stdlib/bdb.pyi +139 -0
  431. mypy/typeshed/stdlib/binascii.pyi +102 -0
  432. mypy/typeshed/stdlib/binhex.pyi +44 -0
  433. mypy/typeshed/stdlib/bisect.pyi +4 -0
  434. mypy/typeshed/stdlib/builtins.pyi +2470 -0
  435. mypy/typeshed/stdlib/bz2.pyi +121 -0
  436. mypy/typeshed/stdlib/cProfile.pyi +33 -0
  437. mypy/typeshed/stdlib/calendar.pyi +249 -0
  438. mypy/typeshed/stdlib/cgi.pyi +120 -0
  439. mypy/typeshed/stdlib/cgitb.pyi +32 -0
  440. mypy/typeshed/stdlib/chunk.pyi +20 -0
  441. mypy/typeshed/stdlib/cmath.pyi +36 -0
  442. mypy/typeshed/stdlib/cmd.pyi +46 -0
  443. mypy/typeshed/stdlib/code.pyi +55 -0
  444. mypy/typeshed/stdlib/codecs.pyi +357 -0
  445. mypy/typeshed/stdlib/codeop.pyi +21 -0
  446. mypy/typeshed/stdlib/collections/__init__.pyi +565 -0
  447. mypy/typeshed/stdlib/collections/abc.pyi +2 -0
  448. mypy/typeshed/stdlib/colorsys.pyi +15 -0
  449. mypy/typeshed/stdlib/compileall.pyi +51 -0
  450. mypy/typeshed/stdlib/compression/__init__.pyi +0 -0
  451. mypy/typeshed/stdlib/compression/_common/__init__.pyi +0 -0
  452. mypy/typeshed/stdlib/compression/_common/_streams.pyi +37 -0
  453. mypy/typeshed/stdlib/compression/bz2.pyi +1 -0
  454. mypy/typeshed/stdlib/compression/gzip.pyi +1 -0
  455. mypy/typeshed/stdlib/compression/lzma.pyi +1 -0
  456. mypy/typeshed/stdlib/compression/zlib.pyi +1 -0
  457. mypy/typeshed/stdlib/compression/zstd/__init__.pyi +94 -0
  458. mypy/typeshed/stdlib/compression/zstd/_zstdfile.pyi +117 -0
  459. mypy/typeshed/stdlib/concurrent/__init__.pyi +0 -0
  460. mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +71 -0
  461. mypy/typeshed/stdlib/concurrent/futures/_base.pyi +119 -0
  462. mypy/typeshed/stdlib/concurrent/futures/interpreter.pyi +82 -0
  463. mypy/typeshed/stdlib/concurrent/futures/process.pyi +247 -0
  464. mypy/typeshed/stdlib/concurrent/futures/thread.pyi +143 -0
  465. mypy/typeshed/stdlib/concurrent/interpreters/__init__.pyi +68 -0
  466. mypy/typeshed/stdlib/concurrent/interpreters/_crossinterp.pyi +30 -0
  467. mypy/typeshed/stdlib/concurrent/interpreters/_queues.pyi +74 -0
  468. mypy/typeshed/stdlib/configparser.pyi +507 -0
  469. mypy/typeshed/stdlib/contextlib.pyi +211 -0
  470. mypy/typeshed/stdlib/contextvars.pyi +3 -0
  471. mypy/typeshed/stdlib/copy.pyi +28 -0
  472. mypy/typeshed/stdlib/copyreg.pyi +20 -0
  473. mypy/typeshed/stdlib/crypt.pyi +26 -0
  474. mypy/typeshed/stdlib/csv.pyi +153 -0
  475. mypy/typeshed/stdlib/ctypes/__init__.pyi +394 -0
  476. mypy/typeshed/stdlib/ctypes/_endian.pyi +16 -0
  477. mypy/typeshed/stdlib/ctypes/macholib/__init__.pyi +3 -0
  478. mypy/typeshed/stdlib/ctypes/macholib/dyld.pyi +8 -0
  479. mypy/typeshed/stdlib/ctypes/macholib/dylib.pyi +14 -0
  480. mypy/typeshed/stdlib/ctypes/macholib/framework.pyi +14 -0
  481. mypy/typeshed/stdlib/ctypes/util.pyi +11 -0
  482. mypy/typeshed/stdlib/ctypes/wintypes.pyi +321 -0
  483. mypy/typeshed/stdlib/curses/__init__.pyi +38 -0
  484. mypy/typeshed/stdlib/curses/ascii.pyi +62 -0
  485. mypy/typeshed/stdlib/curses/has_key.pyi +1 -0
  486. mypy/typeshed/stdlib/curses/panel.pyi +1 -0
  487. mypy/typeshed/stdlib/curses/textpad.pyi +11 -0
  488. mypy/typeshed/stdlib/dataclasses.pyi +401 -0
  489. mypy/typeshed/stdlib/datetime.pyi +381 -0
  490. mypy/typeshed/stdlib/dbm/__init__.pyi +105 -0
  491. mypy/typeshed/stdlib/dbm/dumb.pyi +41 -0
  492. mypy/typeshed/stdlib/dbm/gnu.pyi +1 -0
  493. mypy/typeshed/stdlib/dbm/ndbm.pyi +1 -0
  494. mypy/typeshed/stdlib/dbm/sqlite3.pyi +34 -0
  495. mypy/typeshed/stdlib/decimal.pyi +278 -0
  496. mypy/typeshed/stdlib/difflib.pyi +157 -0
  497. mypy/typeshed/stdlib/dis.pyi +302 -0
  498. mypy/typeshed/stdlib/distutils/__init__.pyi +5 -0
  499. mypy/typeshed/stdlib/distutils/_msvccompiler.pyi +13 -0
  500. mypy/typeshed/stdlib/distutils/archive_util.pyi +36 -0
  501. mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +3 -0
  502. mypy/typeshed/stdlib/distutils/ccompiler.pyi +182 -0
  503. mypy/typeshed/stdlib/distutils/cmd.pyi +238 -0
  504. mypy/typeshed/stdlib/distutils/command/__init__.pyi +41 -0
  505. mypy/typeshed/stdlib/distutils/command/bdist.pyi +27 -0
  506. mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +22 -0
  507. mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +45 -0
  508. mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi +0 -0
  509. mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +53 -0
  510. mypy/typeshed/stdlib/distutils/command/build.pyi +34 -0
  511. mypy/typeshed/stdlib/distutils/command/build_clib.pyi +29 -0
  512. mypy/typeshed/stdlib/distutils/command/build_ext.pyi +52 -0
  513. mypy/typeshed/stdlib/distutils/command/build_py.pyi +45 -0
  514. mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +25 -0
  515. mypy/typeshed/stdlib/distutils/command/check.pyi +39 -0
  516. mypy/typeshed/stdlib/distutils/command/clean.pyi +18 -0
  517. mypy/typeshed/stdlib/distutils/command/config.pyi +84 -0
  518. mypy/typeshed/stdlib/distutils/command/install.pyi +67 -0
  519. mypy/typeshed/stdlib/distutils/command/install_data.pyi +20 -0
  520. mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +19 -0
  521. mypy/typeshed/stdlib/distutils/command/install_headers.pyi +17 -0
  522. mypy/typeshed/stdlib/distutils/command/install_lib.pyi +26 -0
  523. mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +19 -0
  524. mypy/typeshed/stdlib/distutils/command/register.pyi +20 -0
  525. mypy/typeshed/stdlib/distutils/command/sdist.pyi +45 -0
  526. mypy/typeshed/stdlib/distutils/command/upload.pyi +18 -0
  527. mypy/typeshed/stdlib/distutils/config.pyi +17 -0
  528. mypy/typeshed/stdlib/distutils/core.pyi +58 -0
  529. mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +20 -0
  530. mypy/typeshed/stdlib/distutils/debug.pyi +3 -0
  531. mypy/typeshed/stdlib/distutils/dep_util.pyi +14 -0
  532. mypy/typeshed/stdlib/distutils/dir_util.pyi +23 -0
  533. mypy/typeshed/stdlib/distutils/dist.pyi +318 -0
  534. mypy/typeshed/stdlib/distutils/errors.pyi +19 -0
  535. mypy/typeshed/stdlib/distutils/extension.pyi +36 -0
  536. mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +45 -0
  537. mypy/typeshed/stdlib/distutils/file_util.pyi +40 -0
  538. mypy/typeshed/stdlib/distutils/filelist.pyi +61 -0
  539. mypy/typeshed/stdlib/distutils/log.pyi +26 -0
  540. mypy/typeshed/stdlib/distutils/msvccompiler.pyi +3 -0
  541. mypy/typeshed/stdlib/distutils/spawn.pyi +10 -0
  542. mypy/typeshed/stdlib/distutils/sysconfig.pyi +32 -0
  543. mypy/typeshed/stdlib/distutils/text_file.pyi +21 -0
  544. mypy/typeshed/stdlib/distutils/unixccompiler.pyi +3 -0
  545. mypy/typeshed/stdlib/distutils/util.pyi +53 -0
  546. mypy/typeshed/stdlib/distutils/version.pyi +36 -0
  547. mypy/typeshed/stdlib/doctest.pyi +262 -0
  548. mypy/typeshed/stdlib/email/__init__.pyi +62 -0
  549. mypy/typeshed/stdlib/email/_header_value_parser.pyi +414 -0
  550. mypy/typeshed/stdlib/email/_policybase.pyi +80 -0
  551. mypy/typeshed/stdlib/email/base64mime.pyi +13 -0
  552. mypy/typeshed/stdlib/email/charset.pyi +44 -0
  553. mypy/typeshed/stdlib/email/contentmanager.pyi +11 -0
  554. mypy/typeshed/stdlib/email/encoders.pyi +8 -0
  555. mypy/typeshed/stdlib/email/errors.pyi +38 -0
  556. mypy/typeshed/stdlib/email/feedparser.pyi +24 -0
  557. mypy/typeshed/stdlib/email/generator.pyi +79 -0
  558. mypy/typeshed/stdlib/email/header.pyi +32 -0
  559. mypy/typeshed/stdlib/email/headerregistry.pyi +193 -0
  560. mypy/typeshed/stdlib/email/iterators.pyi +15 -0
  561. mypy/typeshed/stdlib/email/message.pyi +191 -0
  562. mypy/typeshed/stdlib/email/mime/__init__.pyi +0 -0
  563. mypy/typeshed/stdlib/email/mime/application.pyi +17 -0
  564. mypy/typeshed/stdlib/email/mime/audio.pyi +17 -0
  565. mypy/typeshed/stdlib/email/mime/base.pyi +8 -0
  566. mypy/typeshed/stdlib/email/mime/image.pyi +17 -0
  567. mypy/typeshed/stdlib/email/mime/message.pyi +8 -0
  568. mypy/typeshed/stdlib/email/mime/multipart.pyi +18 -0
  569. mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +5 -0
  570. mypy/typeshed/stdlib/email/mime/text.pyi +9 -0
  571. mypy/typeshed/stdlib/email/parser.pyi +42 -0
  572. mypy/typeshed/stdlib/email/policy.pyi +77 -0
  573. mypy/typeshed/stdlib/email/quoprimime.pyi +28 -0
  574. mypy/typeshed/stdlib/email/utils.pyi +72 -0
  575. mypy/typeshed/stdlib/encodings/__init__.pyi +15 -0
  576. mypy/typeshed/stdlib/encodings/aliases.pyi +1 -0
  577. mypy/typeshed/stdlib/encodings/ascii.pyi +30 -0
  578. mypy/typeshed/stdlib/encodings/base64_codec.pyi +26 -0
  579. mypy/typeshed/stdlib/encodings/big5.pyi +23 -0
  580. mypy/typeshed/stdlib/encodings/big5hkscs.pyi +23 -0
  581. mypy/typeshed/stdlib/encodings/bz2_codec.pyi +26 -0
  582. mypy/typeshed/stdlib/encodings/charmap.pyi +33 -0
  583. mypy/typeshed/stdlib/encodings/cp037.pyi +21 -0
  584. mypy/typeshed/stdlib/encodings/cp1006.pyi +21 -0
  585. mypy/typeshed/stdlib/encodings/cp1026.pyi +21 -0
  586. mypy/typeshed/stdlib/encodings/cp1125.pyi +21 -0
  587. mypy/typeshed/stdlib/encodings/cp1140.pyi +21 -0
  588. mypy/typeshed/stdlib/encodings/cp1250.pyi +21 -0
  589. mypy/typeshed/stdlib/encodings/cp1251.pyi +21 -0
  590. mypy/typeshed/stdlib/encodings/cp1252.pyi +21 -0
  591. mypy/typeshed/stdlib/encodings/cp1253.pyi +21 -0
  592. mypy/typeshed/stdlib/encodings/cp1254.pyi +21 -0
  593. mypy/typeshed/stdlib/encodings/cp1255.pyi +21 -0
  594. mypy/typeshed/stdlib/encodings/cp1256.pyi +21 -0
  595. mypy/typeshed/stdlib/encodings/cp1257.pyi +21 -0
  596. mypy/typeshed/stdlib/encodings/cp1258.pyi +21 -0
  597. mypy/typeshed/stdlib/encodings/cp273.pyi +21 -0
  598. mypy/typeshed/stdlib/encodings/cp424.pyi +21 -0
  599. mypy/typeshed/stdlib/encodings/cp437.pyi +21 -0
  600. mypy/typeshed/stdlib/encodings/cp500.pyi +21 -0
  601. mypy/typeshed/stdlib/encodings/cp720.pyi +21 -0
  602. mypy/typeshed/stdlib/encodings/cp737.pyi +21 -0
  603. mypy/typeshed/stdlib/encodings/cp775.pyi +21 -0
  604. mypy/typeshed/stdlib/encodings/cp850.pyi +21 -0
  605. mypy/typeshed/stdlib/encodings/cp852.pyi +21 -0
  606. mypy/typeshed/stdlib/encodings/cp855.pyi +21 -0
  607. mypy/typeshed/stdlib/encodings/cp856.pyi +21 -0
  608. mypy/typeshed/stdlib/encodings/cp857.pyi +21 -0
  609. mypy/typeshed/stdlib/encodings/cp858.pyi +21 -0
  610. mypy/typeshed/stdlib/encodings/cp860.pyi +21 -0
  611. mypy/typeshed/stdlib/encodings/cp861.pyi +21 -0
  612. mypy/typeshed/stdlib/encodings/cp862.pyi +21 -0
  613. mypy/typeshed/stdlib/encodings/cp863.pyi +21 -0
  614. mypy/typeshed/stdlib/encodings/cp864.pyi +21 -0
  615. mypy/typeshed/stdlib/encodings/cp865.pyi +21 -0
  616. mypy/typeshed/stdlib/encodings/cp866.pyi +21 -0
  617. mypy/typeshed/stdlib/encodings/cp869.pyi +21 -0
  618. mypy/typeshed/stdlib/encodings/cp874.pyi +21 -0
  619. mypy/typeshed/stdlib/encodings/cp875.pyi +21 -0
  620. mypy/typeshed/stdlib/encodings/cp932.pyi +23 -0
  621. mypy/typeshed/stdlib/encodings/cp949.pyi +23 -0
  622. mypy/typeshed/stdlib/encodings/cp950.pyi +23 -0
  623. mypy/typeshed/stdlib/encodings/euc_jis_2004.pyi +23 -0
  624. mypy/typeshed/stdlib/encodings/euc_jisx0213.pyi +23 -0
  625. mypy/typeshed/stdlib/encodings/euc_jp.pyi +23 -0
  626. mypy/typeshed/stdlib/encodings/euc_kr.pyi +23 -0
  627. mypy/typeshed/stdlib/encodings/gb18030.pyi +23 -0
  628. mypy/typeshed/stdlib/encodings/gb2312.pyi +23 -0
  629. mypy/typeshed/stdlib/encodings/gbk.pyi +23 -0
  630. mypy/typeshed/stdlib/encodings/hex_codec.pyi +26 -0
  631. mypy/typeshed/stdlib/encodings/hp_roman8.pyi +21 -0
  632. mypy/typeshed/stdlib/encodings/hz.pyi +23 -0
  633. mypy/typeshed/stdlib/encodings/idna.pyi +26 -0
  634. mypy/typeshed/stdlib/encodings/iso2022_jp.pyi +23 -0
  635. mypy/typeshed/stdlib/encodings/iso2022_jp_1.pyi +23 -0
  636. mypy/typeshed/stdlib/encodings/iso2022_jp_2.pyi +23 -0
  637. mypy/typeshed/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
  638. mypy/typeshed/stdlib/encodings/iso2022_jp_3.pyi +23 -0
  639. mypy/typeshed/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
  640. mypy/typeshed/stdlib/encodings/iso2022_kr.pyi +23 -0
  641. mypy/typeshed/stdlib/encodings/iso8859_1.pyi +21 -0
  642. mypy/typeshed/stdlib/encodings/iso8859_10.pyi +21 -0
  643. mypy/typeshed/stdlib/encodings/iso8859_11.pyi +21 -0
  644. mypy/typeshed/stdlib/encodings/iso8859_13.pyi +21 -0
  645. mypy/typeshed/stdlib/encodings/iso8859_14.pyi +21 -0
  646. mypy/typeshed/stdlib/encodings/iso8859_15.pyi +21 -0
  647. mypy/typeshed/stdlib/encodings/iso8859_16.pyi +21 -0
  648. mypy/typeshed/stdlib/encodings/iso8859_2.pyi +21 -0
  649. mypy/typeshed/stdlib/encodings/iso8859_3.pyi +21 -0
  650. mypy/typeshed/stdlib/encodings/iso8859_4.pyi +21 -0
  651. mypy/typeshed/stdlib/encodings/iso8859_5.pyi +21 -0
  652. mypy/typeshed/stdlib/encodings/iso8859_6.pyi +21 -0
  653. mypy/typeshed/stdlib/encodings/iso8859_7.pyi +21 -0
  654. mypy/typeshed/stdlib/encodings/iso8859_8.pyi +21 -0
  655. mypy/typeshed/stdlib/encodings/iso8859_9.pyi +21 -0
  656. mypy/typeshed/stdlib/encodings/johab.pyi +23 -0
  657. mypy/typeshed/stdlib/encodings/koi8_r.pyi +21 -0
  658. mypy/typeshed/stdlib/encodings/koi8_t.pyi +21 -0
  659. mypy/typeshed/stdlib/encodings/koi8_u.pyi +21 -0
  660. mypy/typeshed/stdlib/encodings/kz1048.pyi +21 -0
  661. mypy/typeshed/stdlib/encodings/latin_1.pyi +30 -0
  662. mypy/typeshed/stdlib/encodings/mac_arabic.pyi +21 -0
  663. mypy/typeshed/stdlib/encodings/mac_croatian.pyi +21 -0
  664. mypy/typeshed/stdlib/encodings/mac_cyrillic.pyi +21 -0
  665. mypy/typeshed/stdlib/encodings/mac_farsi.pyi +21 -0
  666. mypy/typeshed/stdlib/encodings/mac_greek.pyi +21 -0
  667. mypy/typeshed/stdlib/encodings/mac_iceland.pyi +21 -0
  668. mypy/typeshed/stdlib/encodings/mac_latin2.pyi +21 -0
  669. mypy/typeshed/stdlib/encodings/mac_roman.pyi +21 -0
  670. mypy/typeshed/stdlib/encodings/mac_romanian.pyi +21 -0
  671. mypy/typeshed/stdlib/encodings/mac_turkish.pyi +21 -0
  672. mypy/typeshed/stdlib/encodings/mbcs.pyi +28 -0
  673. mypy/typeshed/stdlib/encodings/oem.pyi +28 -0
  674. mypy/typeshed/stdlib/encodings/palmos.pyi +21 -0
  675. mypy/typeshed/stdlib/encodings/ptcp154.pyi +21 -0
  676. mypy/typeshed/stdlib/encodings/punycode.pyi +33 -0
  677. mypy/typeshed/stdlib/encodings/quopri_codec.pyi +26 -0
  678. mypy/typeshed/stdlib/encodings/raw_unicode_escape.pyi +23 -0
  679. mypy/typeshed/stdlib/encodings/rot_13.pyi +23 -0
  680. mypy/typeshed/stdlib/encodings/shift_jis.pyi +23 -0
  681. mypy/typeshed/stdlib/encodings/shift_jis_2004.pyi +23 -0
  682. mypy/typeshed/stdlib/encodings/shift_jisx0213.pyi +23 -0
  683. mypy/typeshed/stdlib/encodings/tis_620.pyi +21 -0
  684. mypy/typeshed/stdlib/encodings/undefined.pyi +20 -0
  685. mypy/typeshed/stdlib/encodings/unicode_escape.pyi +23 -0
  686. mypy/typeshed/stdlib/encodings/utf_16.pyi +20 -0
  687. mypy/typeshed/stdlib/encodings/utf_16_be.pyi +26 -0
  688. mypy/typeshed/stdlib/encodings/utf_16_le.pyi +26 -0
  689. mypy/typeshed/stdlib/encodings/utf_32.pyi +20 -0
  690. mypy/typeshed/stdlib/encodings/utf_32_be.pyi +26 -0
  691. mypy/typeshed/stdlib/encodings/utf_32_le.pyi +26 -0
  692. mypy/typeshed/stdlib/encodings/utf_7.pyi +26 -0
  693. mypy/typeshed/stdlib/encodings/utf_8.pyi +26 -0
  694. mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +22 -0
  695. mypy/typeshed/stdlib/encodings/uu_codec.pyi +28 -0
  696. mypy/typeshed/stdlib/encodings/zlib_codec.pyi +26 -0
  697. mypy/typeshed/stdlib/ensurepip/__init__.pyi +12 -0
  698. mypy/typeshed/stdlib/enum.pyi +374 -0
  699. mypy/typeshed/stdlib/errno.pyi +227 -0
  700. mypy/typeshed/stdlib/faulthandler.pyi +61 -0
  701. mypy/typeshed/stdlib/fcntl.pyi +157 -0
  702. mypy/typeshed/stdlib/filecmp.pyi +65 -0
  703. mypy/typeshed/stdlib/fileinput.pyi +141 -0
  704. mypy/typeshed/stdlib/fnmatch.pyi +16 -0
  705. mypy/typeshed/stdlib/fractions.pyi +185 -0
  706. mypy/typeshed/stdlib/ftplib.pyi +174 -0
  707. mypy/typeshed/stdlib/functools.pyi +281 -0
  708. mypy/typeshed/stdlib/gc.pyi +32 -0
  709. mypy/typeshed/stdlib/genericpath.pyi +98 -0
  710. mypy/typeshed/stdlib/getopt.pyi +27 -0
  711. mypy/typeshed/stdlib/getpass.pyi +14 -0
  712. mypy/typeshed/stdlib/gettext.pyi +190 -0
  713. mypy/typeshed/stdlib/glob.pyi +54 -0
  714. mypy/typeshed/stdlib/graphlib.pyi +29 -0
  715. mypy/typeshed/stdlib/grp.pyi +21 -0
  716. mypy/typeshed/stdlib/gzip.pyi +181 -0
  717. mypy/typeshed/stdlib/hashlib.pyi +112 -0
  718. mypy/typeshed/stdlib/heapq.pyi +32 -0
  719. mypy/typeshed/stdlib/hmac.pyi +33 -0
  720. mypy/typeshed/stdlib/html/__init__.pyi +7 -0
  721. mypy/typeshed/stdlib/html/entities.pyi +8 -0
  722. mypy/typeshed/stdlib/html/parser.pyi +40 -0
  723. mypy/typeshed/stdlib/http/__init__.pyi +118 -0
  724. mypy/typeshed/stdlib/http/client.pyi +318 -0
  725. mypy/typeshed/stdlib/http/cookiejar.pyi +158 -0
  726. mypy/typeshed/stdlib/http/cookies.pyi +53 -0
  727. mypy/typeshed/stdlib/http/server.pyi +139 -0
  728. mypy/typeshed/stdlib/imaplib.pyi +209 -0
  729. mypy/typeshed/stdlib/imghdr.pyi +18 -0
  730. mypy/typeshed/stdlib/imp.pyi +63 -0
  731. mypy/typeshed/stdlib/importlib/__init__.pyi +17 -0
  732. mypy/typeshed/stdlib/importlib/_abc.pyi +19 -0
  733. mypy/typeshed/stdlib/importlib/_bootstrap.pyi +2 -0
  734. mypy/typeshed/stdlib/importlib/_bootstrap_external.pyi +2 -0
  735. mypy/typeshed/stdlib/importlib/abc.pyi +150 -0
  736. mypy/typeshed/stdlib/importlib/machinery.pyi +43 -0
  737. mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +310 -0
  738. mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +65 -0
  739. mypy/typeshed/stdlib/importlib/metadata/diagnose.pyi +2 -0
  740. mypy/typeshed/stdlib/importlib/readers.pyi +69 -0
  741. mypy/typeshed/stdlib/importlib/resources/__init__.pyi +81 -0
  742. mypy/typeshed/stdlib/importlib/resources/_common.pyi +43 -0
  743. mypy/typeshed/stdlib/importlib/resources/_functional.pyi +35 -0
  744. mypy/typeshed/stdlib/importlib/resources/abc.pyi +64 -0
  745. mypy/typeshed/stdlib/importlib/resources/readers.pyi +14 -0
  746. mypy/typeshed/stdlib/importlib/resources/simple.pyi +59 -0
  747. mypy/typeshed/stdlib/importlib/simple.pyi +11 -0
  748. mypy/typeshed/stdlib/importlib/util.pyi +75 -0
  749. mypy/typeshed/stdlib/inspect.pyi +749 -0
  750. mypy/typeshed/stdlib/io.pyi +75 -0
  751. mypy/typeshed/stdlib/ipaddress.pyi +249 -0
  752. mypy/typeshed/stdlib/itertools.pyi +376 -0
  753. mypy/typeshed/stdlib/json/__init__.pyi +93 -0
  754. mypy/typeshed/stdlib/json/decoder.pyi +50 -0
  755. mypy/typeshed/stdlib/json/encoder.pyi +40 -0
  756. mypy/typeshed/stdlib/json/scanner.pyi +7 -0
  757. mypy/typeshed/stdlib/json/tool.pyi +1 -0
  758. mypy/typeshed/stdlib/keyword.pyi +16 -0
  759. mypy/typeshed/stdlib/lib2to3/__init__.pyi +0 -0
  760. mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +28 -0
  761. mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +42 -0
  762. mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi +0 -0
  763. mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +8 -0
  764. mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -0
  765. mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -0
  766. mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -0
  767. mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +16 -0
  768. mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +14 -0
  769. mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +8 -0
  770. mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -0
  771. mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -0
  772. mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +9 -0
  773. mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -0
  774. mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +8 -0
  775. mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -0
  776. mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -0
  777. mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -0
  778. mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +16 -0
  779. mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +21 -0
  780. mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -0
  781. mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +11 -0
  782. mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +9 -0
  783. mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -0
  784. mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -0
  785. mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -0
  786. mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +7 -0
  787. mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +9 -0
  788. mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -0
  789. mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -0
  790. mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +8 -0
  791. mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +19 -0
  792. mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -0
  793. mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -0
  794. mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +12 -0
  795. mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +8 -0
  796. mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +12 -0
  797. mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +8 -0
  798. mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -0
  799. mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -0
  800. mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +9 -0
  801. mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +17 -0
  802. mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +8 -0
  803. mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -0
  804. mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -0
  805. mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -0
  806. mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +8 -0
  807. mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +16 -0
  808. mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +8 -0
  809. mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -0
  810. mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -0
  811. mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -0
  812. mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -0
  813. mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -0
  814. mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +9 -0
  815. mypy/typeshed/stdlib/lib2to3/main.pyi +42 -0
  816. mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +8 -0
  817. mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +27 -0
  818. mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +25 -0
  819. mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +7 -0
  820. mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +30 -0
  821. mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +53 -0
  822. mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +69 -0
  823. mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +96 -0
  824. mypy/typeshed/stdlib/lib2to3/pygram.pyi +114 -0
  825. mypy/typeshed/stdlib/lib2to3/pytree.pyi +118 -0
  826. mypy/typeshed/stdlib/lib2to3/refactor.pyi +86 -0
  827. mypy/typeshed/stdlib/linecache.pyi +18 -0
  828. mypy/typeshed/stdlib/locale.pyi +160 -0
  829. mypy/typeshed/stdlib/logging/__init__.pyi +674 -0
  830. mypy/typeshed/stdlib/logging/config.pyi +141 -0
  831. mypy/typeshed/stdlib/logging/handlers.pyi +258 -0
  832. mypy/typeshed/stdlib/lzma.pyi +181 -0
  833. mypy/typeshed/stdlib/mailbox.pyi +301 -0
  834. mypy/typeshed/stdlib/mailcap.pyi +11 -0
  835. mypy/typeshed/stdlib/marshal.pyi +52 -0
  836. mypy/typeshed/stdlib/math/__init__.pyi +157 -0
  837. mypy/typeshed/stdlib/math/integer.pyi +8 -0
  838. mypy/typeshed/stdlib/mimetypes.pyi +56 -0
  839. mypy/typeshed/stdlib/mmap.pyi +187 -0
  840. mypy/typeshed/stdlib/modulefinder.pyi +68 -0
  841. mypy/typeshed/stdlib/msilib/__init__.pyi +177 -0
  842. mypy/typeshed/stdlib/msilib/schema.pyi +95 -0
  843. mypy/typeshed/stdlib/msilib/sequence.pyi +13 -0
  844. mypy/typeshed/stdlib/msilib/text.pyi +8 -0
  845. mypy/typeshed/stdlib/msvcrt.pyi +31 -0
  846. mypy/typeshed/stdlib/multiprocessing/__init__.pyi +90 -0
  847. mypy/typeshed/stdlib/multiprocessing/connection.pyi +94 -0
  848. mypy/typeshed/stdlib/multiprocessing/context.pyi +220 -0
  849. mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +89 -0
  850. mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +39 -0
  851. mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +78 -0
  852. mypy/typeshed/stdlib/multiprocessing/heap.pyi +41 -0
  853. mypy/typeshed/stdlib/multiprocessing/managers.pyi +390 -0
  854. mypy/typeshed/stdlib/multiprocessing/pool.pyi +101 -0
  855. mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +26 -0
  856. mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +16 -0
  857. mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +20 -0
  858. mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -0
  859. mypy/typeshed/stdlib/multiprocessing/process.pyi +43 -0
  860. mypy/typeshed/stdlib/multiprocessing/queues.pyi +46 -0
  861. mypy/typeshed/stdlib/multiprocessing/reduction.pyi +95 -0
  862. mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +20 -0
  863. mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +21 -0
  864. mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +43 -0
  865. mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +140 -0
  866. mypy/typeshed/stdlib/multiprocessing/spawn.pyi +32 -0
  867. mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +63 -0
  868. mypy/typeshed/stdlib/multiprocessing/util.pyi +109 -0
  869. mypy/typeshed/stdlib/netrc.pyi +23 -0
  870. mypy/typeshed/stdlib/nis.pyi +9 -0
  871. mypy/typeshed/stdlib/nntplib.pyi +120 -0
  872. mypy/typeshed/stdlib/nt.pyi +116 -0
  873. mypy/typeshed/stdlib/ntpath.pyi +134 -0
  874. mypy/typeshed/stdlib/nturl2path.pyi +6 -0
  875. mypy/typeshed/stdlib/numbers.pyi +220 -0
  876. mypy/typeshed/stdlib/opcode.pyi +53 -0
  877. mypy/typeshed/stdlib/operator.pyi +219 -0
  878. mypy/typeshed/stdlib/optparse.pyi +312 -0
  879. mypy/typeshed/stdlib/os/__init__.pyi +1879 -0
  880. mypy/typeshed/stdlib/os/path.pyi +8 -0
  881. mypy/typeshed/stdlib/ossaudiodev.pyi +132 -0
  882. mypy/typeshed/stdlib/pathlib/__init__.pyi +358 -0
  883. mypy/typeshed/stdlib/pathlib/types.pyi +8 -0
  884. mypy/typeshed/stdlib/pdb.pyi +275 -0
  885. mypy/typeshed/stdlib/pickle.pyi +240 -0
  886. mypy/typeshed/stdlib/pickletools.pyi +176 -0
  887. mypy/typeshed/stdlib/pipes.pyi +16 -0
  888. mypy/typeshed/stdlib/pkgutil.pyi +60 -0
  889. mypy/typeshed/stdlib/platform.pyi +100 -0
  890. mypy/typeshed/stdlib/plistlib.pyi +84 -0
  891. mypy/typeshed/stdlib/poplib.pyi +93 -0
  892. mypy/typeshed/stdlib/posix.pyi +427 -0
  893. mypy/typeshed/stdlib/posixpath.pyi +230 -0
  894. mypy/typeshed/stdlib/pprint.pyi +170 -0
  895. mypy/typeshed/stdlib/profile.pyi +31 -0
  896. mypy/typeshed/stdlib/profiling/__init__.pyi +3 -0
  897. mypy/typeshed/stdlib/profiling/sampling/__init__.pyi +17 -0
  898. mypy/typeshed/stdlib/profiling/sampling/collector.pyi +25 -0
  899. mypy/typeshed/stdlib/profiling/sampling/gecko_collector.pyi +111 -0
  900. mypy/typeshed/stdlib/profiling/sampling/heatmap_collector.pyi +24 -0
  901. mypy/typeshed/stdlib/profiling/sampling/jsonl_collector.pyi +15 -0
  902. mypy/typeshed/stdlib/profiling/sampling/pstats_collector.pyi +17 -0
  903. mypy/typeshed/stdlib/profiling/sampling/stack_collector.pyi +39 -0
  904. mypy/typeshed/stdlib/profiling/sampling/string_table.pyi +5 -0
  905. mypy/typeshed/stdlib/profiling/tracing.pyi +9 -0
  906. mypy/typeshed/stdlib/pstats.pyi +96 -0
  907. mypy/typeshed/stdlib/pty.pyi +24 -0
  908. mypy/typeshed/stdlib/pwd.pyi +27 -0
  909. mypy/typeshed/stdlib/py_compile.pyi +28 -0
  910. mypy/typeshed/stdlib/pyclbr.pyi +57 -0
  911. mypy/typeshed/stdlib/pydoc.pyi +348 -0
  912. mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  913. mypy/typeshed/stdlib/pydoc_data/module_docs.pyi +3 -0
  914. mypy/typeshed/stdlib/pydoc_data/topics.pyi +3 -0
  915. mypy/typeshed/stdlib/pyexpat/__init__.pyi +91 -0
  916. mypy/typeshed/stdlib/pyexpat/errors.pyi +53 -0
  917. mypy/typeshed/stdlib/pyexpat/model.pyi +13 -0
  918. mypy/typeshed/stdlib/queue.pyi +55 -0
  919. mypy/typeshed/stdlib/quopri.pyi +12 -0
  920. mypy/typeshed/stdlib/random.pyi +135 -0
  921. mypy/typeshed/stdlib/re.pyi +347 -0
  922. mypy/typeshed/stdlib/readline.pyi +39 -0
  923. mypy/typeshed/stdlib/reprlib.pyi +64 -0
  924. mypy/typeshed/stdlib/resource.pyi +102 -0
  925. mypy/typeshed/stdlib/rlcompleter.pyi +9 -0
  926. mypy/typeshed/stdlib/runpy.pyi +24 -0
  927. mypy/typeshed/stdlib/sched.pyi +34 -0
  928. mypy/typeshed/stdlib/secrets.pyi +17 -0
  929. mypy/typeshed/stdlib/select.pyi +171 -0
  930. mypy/typeshed/stdlib/selectors.pyi +67 -0
  931. mypy/typeshed/stdlib/shelve.pyi +110 -0
  932. mypy/typeshed/stdlib/shlex.pyi +63 -0
  933. mypy/typeshed/stdlib/shutil.pyi +243 -0
  934. mypy/typeshed/stdlib/signal.pyi +174 -0
  935. mypy/typeshed/stdlib/site.pyi +46 -0
  936. mypy/typeshed/stdlib/smtpd.pyi +92 -0
  937. mypy/typeshed/stdlib/smtplib.pyi +223 -0
  938. mypy/typeshed/stdlib/sndhdr.pyi +14 -0
  939. mypy/typeshed/stdlib/socket.pyi +1586 -0
  940. mypy/typeshed/stdlib/socketserver.pyi +170 -0
  941. mypy/typeshed/stdlib/spwd.pyi +45 -0
  942. mypy/typeshed/stdlib/sqlite3/__init__.pyi +510 -0
  943. mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +244 -0
  944. mypy/typeshed/stdlib/sqlite3/dump.pyi +2 -0
  945. mypy/typeshed/stdlib/sre_compile.pyi +12 -0
  946. mypy/typeshed/stdlib/sre_constants.pyi +135 -0
  947. mypy/typeshed/stdlib/sre_parse.pyi +102 -0
  948. mypy/typeshed/stdlib/ssl.pyi +540 -0
  949. mypy/typeshed/stdlib/stat.pyi +126 -0
  950. mypy/typeshed/stdlib/statistics.pyi +161 -0
  951. mypy/typeshed/stdlib/string/__init__.pyi +81 -0
  952. mypy/typeshed/stdlib/string/templatelib.pyi +36 -0
  953. mypy/typeshed/stdlib/stringprep.pyi +29 -0
  954. mypy/typeshed/stdlib/struct.pyi +5 -0
  955. mypy/typeshed/stdlib/subprocess.pyi +1484 -0
  956. mypy/typeshed/stdlib/sunau.pyi +82 -0
  957. mypy/typeshed/stdlib/symtable.pyi +95 -0
  958. mypy/typeshed/stdlib/sys/__init__.pyi +537 -0
  959. mypy/typeshed/stdlib/sys/__jit.pyi +11 -0
  960. mypy/typeshed/stdlib/sys/_monitoring.pyi +69 -0
  961. mypy/typeshed/stdlib/sysconfig.pyi +59 -0
  962. mypy/typeshed/stdlib/syslog.pyi +58 -0
  963. mypy/typeshed/stdlib/tabnanny.pyi +16 -0
  964. mypy/typeshed/stdlib/tarfile.pyi +864 -0
  965. mypy/typeshed/stdlib/telnetlib.pyi +123 -0
  966. mypy/typeshed/stdlib/tempfile.pyi +474 -0
  967. mypy/typeshed/stdlib/termios.pyi +303 -0
  968. mypy/typeshed/stdlib/textwrap.pyi +103 -0
  969. mypy/typeshed/stdlib/this.pyi +2 -0
  970. mypy/typeshed/stdlib/threading.pyi +221 -0
  971. mypy/typeshed/stdlib/time.pyi +117 -0
  972. mypy/typeshed/stdlib/timeit.pyi +46 -0
  973. mypy/typeshed/stdlib/tkinter/__init__.pyi +4370 -0
  974. mypy/typeshed/stdlib/tkinter/colorchooser.pyi +12 -0
  975. mypy/typeshed/stdlib/tkinter/commondialog.pyi +14 -0
  976. mypy/typeshed/stdlib/tkinter/constants.pyi +80 -0
  977. mypy/typeshed/stdlib/tkinter/dialog.pyi +13 -0
  978. mypy/typeshed/stdlib/tkinter/dnd.pyi +19 -0
  979. mypy/typeshed/stdlib/tkinter/filedialog.pyi +149 -0
  980. mypy/typeshed/stdlib/tkinter/font.pyi +120 -0
  981. mypy/typeshed/stdlib/tkinter/messagebox.pyi +98 -0
  982. mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +9 -0
  983. mypy/typeshed/stdlib/tkinter/simpledialog.pyi +58 -0
  984. mypy/typeshed/stdlib/tkinter/tix.pyi +299 -0
  985. mypy/typeshed/stdlib/tkinter/ttk.pyi +1434 -0
  986. mypy/typeshed/stdlib/token.pyi +166 -0
  987. mypy/typeshed/stdlib/tokenize.pyi +201 -0
  988. mypy/typeshed/stdlib/tomllib.pyi +27 -0
  989. mypy/typeshed/stdlib/trace.pyi +85 -0
  990. mypy/typeshed/stdlib/traceback.pyi +293 -0
  991. mypy/typeshed/stdlib/tracemalloc.pyi +123 -0
  992. mypy/typeshed/stdlib/tty.pyi +29 -0
  993. mypy/typeshed/stdlib/turtle.pyi +856 -0
  994. mypy/typeshed/stdlib/types.pyi +746 -0
  995. mypy/typeshed/stdlib/typing.pyi +1240 -0
  996. mypy/typeshed/stdlib/typing_extensions.pyi +746 -0
  997. mypy/typeshed/stdlib/unicodedata.pyi +94 -0
  998. mypy/typeshed/stdlib/unittest/__init__.pyi +63 -0
  999. mypy/typeshed/stdlib/unittest/_log.pyi +29 -0
  1000. mypy/typeshed/stdlib/unittest/async_case.pyi +24 -0
  1001. mypy/typeshed/stdlib/unittest/case.pyi +352 -0
  1002. mypy/typeshed/stdlib/unittest/loader.pyi +55 -0
  1003. mypy/typeshed/stdlib/unittest/main.pyi +74 -0
  1004. mypy/typeshed/stdlib/unittest/mock.pyi +555 -0
  1005. mypy/typeshed/stdlib/unittest/result.pyi +46 -0
  1006. mypy/typeshed/stdlib/unittest/runner.pyi +93 -0
  1007. mypy/typeshed/stdlib/unittest/signals.pyi +15 -0
  1008. mypy/typeshed/stdlib/unittest/suite.pyi +23 -0
  1009. mypy/typeshed/stdlib/unittest/util.pyi +39 -0
  1010. mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  1011. mypy/typeshed/stdlib/urllib/error.pyi +29 -0
  1012. mypy/typeshed/stdlib/urllib/parse.pyi +354 -0
  1013. mypy/typeshed/stdlib/urllib/request.pyi +443 -0
  1014. mypy/typeshed/stdlib/urllib/response.pyi +45 -0
  1015. mypy/typeshed/stdlib/urllib/robotparser.pyi +20 -0
  1016. mypy/typeshed/stdlib/uu.pyi +12 -0
  1017. mypy/typeshed/stdlib/uuid.pyi +106 -0
  1018. mypy/typeshed/stdlib/venv/__init__.pyi +86 -0
  1019. mypy/typeshed/stdlib/warnings.pyi +146 -0
  1020. mypy/typeshed/stdlib/wave.pyi +105 -0
  1021. mypy/typeshed/stdlib/weakref.pyi +213 -0
  1022. mypy/typeshed/stdlib/webbrowser.pyi +78 -0
  1023. mypy/typeshed/stdlib/winreg.pyi +137 -0
  1024. mypy/typeshed/stdlib/winsound.pyi +40 -0
  1025. mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  1026. mypy/typeshed/stdlib/wsgiref/handlers.pyi +91 -0
  1027. mypy/typeshed/stdlib/wsgiref/headers.pyi +27 -0
  1028. mypy/typeshed/stdlib/wsgiref/simple_server.pyi +37 -0
  1029. mypy/typeshed/stdlib/wsgiref/types.pyi +31 -0
  1030. mypy/typeshed/stdlib/wsgiref/util.pyi +26 -0
  1031. mypy/typeshed/stdlib/wsgiref/validate.pyi +50 -0
  1032. mypy/typeshed/stdlib/xdrlib.pyi +57 -0
  1033. mypy/typeshed/stdlib/xml/__init__.pyi +9 -0
  1034. mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +22 -0
  1035. mypy/typeshed/stdlib/xml/dom/__init__.pyi +101 -0
  1036. mypy/typeshed/stdlib/xml/dom/domreg.pyi +8 -0
  1037. mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +126 -0
  1038. mypy/typeshed/stdlib/xml/dom/minicompat.pyi +24 -0
  1039. mypy/typeshed/stdlib/xml/dom/minidom.pyi +693 -0
  1040. mypy/typeshed/stdlib/xml/dom/pulldom.pyi +109 -0
  1041. mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +82 -0
  1042. mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +28 -0
  1043. mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +42 -0
  1044. mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +402 -0
  1045. mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  1046. mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +1 -0
  1047. mypy/typeshed/stdlib/xml/parsers/__init__.pyi +1 -0
  1048. mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +7 -0
  1049. mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +1 -0
  1050. mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +1 -0
  1051. mypy/typeshed/stdlib/xml/sax/__init__.pyi +42 -0
  1052. mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +19 -0
  1053. mypy/typeshed/stdlib/xml/sax/expatreader.pyi +72 -0
  1054. mypy/typeshed/stdlib/xml/sax/handler.pyi +85 -0
  1055. mypy/typeshed/stdlib/xml/sax/saxutils.pyi +69 -0
  1056. mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +94 -0
  1057. mypy/typeshed/stdlib/xml/utils.pyi +2 -0
  1058. mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  1059. mypy/typeshed/stdlib/xmlrpc/client.pyi +300 -0
  1060. mypy/typeshed/stdlib/xmlrpc/server.pyi +149 -0
  1061. mypy/typeshed/stdlib/xxlimited.pyi +15 -0
  1062. mypy/typeshed/stdlib/zipapp.pyi +19 -0
  1063. mypy/typeshed/stdlib/zipfile/__init__.pyi +411 -0
  1064. mypy/typeshed/stdlib/zipfile/_path/__init__.pyi +87 -0
  1065. mypy/typeshed/stdlib/zipfile/_path/glob.pyi +26 -0
  1066. mypy/typeshed/stdlib/zipimport.pyi +44 -0
  1067. mypy/typeshed/stdlib/zlib.pyi +81 -0
  1068. mypy/typeshed/stdlib/zoneinfo/__init__.pyi +36 -0
  1069. mypy/typeshed/stdlib/zoneinfo/_common.pyi +14 -0
  1070. mypy/typeshed/stdlib/zoneinfo/_tzpath.pyi +13 -0
  1071. mypy/typeshed/stubs/librt/librt/__init__.pyi +0 -0
  1072. mypy/typeshed/stubs/librt/librt/base64.pyi +4 -0
  1073. mypy/typeshed/stubs/librt/librt/internal.pyi +22 -0
  1074. mypy/typeshed/stubs/librt/librt/random.pyi +22 -0
  1075. mypy/typeshed/stubs/librt/librt/strings.pyi +61 -0
  1076. mypy/typeshed/stubs/librt/librt/threading.pyi +16 -0
  1077. mypy/typeshed/stubs/librt/librt/time.pyi +1 -0
  1078. mypy/typeshed/stubs/librt/librt/vecs.pyi +24 -0
  1079. mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +222 -0
  1080. mypy/typestate.cp315-win_amd64.pyd +0 -0
  1081. mypy/typestate.py +328 -0
  1082. mypy/typetraverser.cp315-win_amd64.pyd +0 -0
  1083. mypy/typetraverser.py +166 -0
  1084. mypy/typevars.cp315-win_amd64.pyd +0 -0
  1085. mypy/typevars.py +84 -0
  1086. mypy/typevartuples.cp315-win_amd64.pyd +0 -0
  1087. mypy/typevartuples.py +36 -0
  1088. mypy/util.cp315-win_amd64.pyd +0 -0
  1089. mypy/util.py +1046 -0
  1090. mypy/version.py +1 -0
  1091. mypy/visitor.cp315-win_amd64.pyd +0 -0
  1092. mypy/visitor.py +639 -0
  1093. mypy/xml/mypy-html.css +104 -0
  1094. mypy/xml/mypy-html.xslt +81 -0
  1095. mypy/xml/mypy-txt.xslt +100 -0
  1096. mypy/xml/mypy.xsd +50 -0
  1097. mypy_dev-2.4.0a1.dist-info/METADATA +48 -0
  1098. mypy_dev-2.4.0a1.dist-info/RECORD +1464 -0
  1099. mypy_dev-2.4.0a1.dist-info/WHEEL +5 -0
  1100. mypy_dev-2.4.0a1.dist-info/entry_points.txt +6 -0
  1101. mypy_dev-2.4.0a1.dist-info/licenses/LICENSE +264 -0
  1102. mypy_dev-2.4.0a1.dist-info/licenses/mypy/typeshed/LICENSE +237 -0
  1103. mypy_dev-2.4.0a1.dist-info/top_level.txt +3 -0
  1104. mypyc/__init__.cp315-win_amd64.pyd +0 -0
  1105. mypyc/__init__.py +0 -0
  1106. mypyc/__main__.py +72 -0
  1107. mypyc/analysis/__init__.cp315-win_amd64.pyd +0 -0
  1108. mypyc/analysis/__init__.py +0 -0
  1109. mypyc/analysis/attrdefined.cp315-win_amd64.pyd +0 -0
  1110. mypyc/analysis/attrdefined.py +443 -0
  1111. mypyc/analysis/blockfreq.cp315-win_amd64.pyd +0 -0
  1112. mypyc/analysis/blockfreq.py +32 -0
  1113. mypyc/analysis/capsule_deps.cp315-win_amd64.pyd +0 -0
  1114. mypyc/analysis/capsule_deps.py +79 -0
  1115. mypyc/analysis/dataflow.cp315-win_amd64.pyd +0 -0
  1116. mypyc/analysis/dataflow.py +645 -0
  1117. mypyc/analysis/ircheck.cp315-win_amd64.pyd +0 -0
  1118. mypyc/analysis/ircheck.py +498 -0
  1119. mypyc/analysis/selfleaks.cp315-win_amd64.pyd +0 -0
  1120. mypyc/analysis/selfleaks.py +231 -0
  1121. mypyc/annotate.cp315-win_amd64.pyd +0 -0
  1122. mypyc/annotate.py +472 -0
  1123. mypyc/build.cp315-win_amd64.pyd +0 -0
  1124. mypyc/build.py +1078 -0
  1125. mypyc/build_setup.py +69 -0
  1126. mypyc/codegen/__init__.cp315-win_amd64.pyd +0 -0
  1127. mypyc/codegen/__init__.py +0 -0
  1128. mypyc/codegen/cstring.cp315-win_amd64.pyd +0 -0
  1129. mypyc/codegen/cstring.py +54 -0
  1130. mypyc/codegen/emit.cp315-win_amd64.pyd +0 -0
  1131. mypyc/codegen/emit.py +1505 -0
  1132. mypyc/codegen/emitclass.cp315-win_amd64.pyd +0 -0
  1133. mypyc/codegen/emitclass.py +1444 -0
  1134. mypyc/codegen/emitfunc.cp315-win_amd64.pyd +0 -0
  1135. mypyc/codegen/emitfunc.py +1083 -0
  1136. mypyc/codegen/emitmodule.cp315-win_amd64.pyd +0 -0
  1137. mypyc/codegen/emitmodule.py +1655 -0
  1138. mypyc/codegen/emitwrapper.cp315-win_amd64.pyd +0 -0
  1139. mypyc/codegen/emitwrapper.py +977 -0
  1140. mypyc/codegen/literals.cp315-win_amd64.pyd +0 -0
  1141. mypyc/codegen/literals.py +317 -0
  1142. mypyc/common.cp315-win_amd64.pyd +0 -0
  1143. mypyc/common.py +158 -0
  1144. mypyc/crash.cp315-win_amd64.pyd +0 -0
  1145. mypyc/crash.py +36 -0
  1146. mypyc/errors.cp315-win_amd64.pyd +0 -0
  1147. mypyc/errors.py +32 -0
  1148. mypyc/ir/__init__.cp315-win_amd64.pyd +0 -0
  1149. mypyc/ir/__init__.py +0 -0
  1150. mypyc/ir/class_ir.cp315-win_amd64.pyd +0 -0
  1151. mypyc/ir/class_ir.py +593 -0
  1152. mypyc/ir/deps.cp315-win_amd64.pyd +0 -0
  1153. mypyc/ir/deps.py +120 -0
  1154. mypyc/ir/func_ir.cp315-win_amd64.pyd +0 -0
  1155. mypyc/ir/func_ir.py +484 -0
  1156. mypyc/ir/module_ir.cp315-win_amd64.pyd +0 -0
  1157. mypyc/ir/module_ir.py +143 -0
  1158. mypyc/ir/ops.cp315-win_amd64.pyd +0 -0
  1159. mypyc/ir/ops.py +2124 -0
  1160. mypyc/ir/pprint.cp315-win_amd64.pyd +0 -0
  1161. mypyc/ir/pprint.py +535 -0
  1162. mypyc/ir/rtypes.cp315-win_amd64.pyd +0 -0
  1163. mypyc/ir/rtypes.py +1522 -0
  1164. mypyc/irbuild/__init__.cp315-win_amd64.pyd +0 -0
  1165. mypyc/irbuild/__init__.py +0 -0
  1166. mypyc/irbuild/ast_helpers.cp315-win_amd64.pyd +0 -0
  1167. mypyc/irbuild/ast_helpers.py +123 -0
  1168. mypyc/irbuild/builder.cp315-win_amd64.pyd +0 -0
  1169. mypyc/irbuild/builder.py +1932 -0
  1170. mypyc/irbuild/callable_class.cp315-win_amd64.pyd +0 -0
  1171. mypyc/irbuild/callable_class.py +244 -0
  1172. mypyc/irbuild/classdef.cp315-win_amd64.pyd +0 -0
  1173. mypyc/irbuild/classdef.py +968 -0
  1174. mypyc/irbuild/constant_fold.cp315-win_amd64.pyd +0 -0
  1175. mypyc/irbuild/constant_fold.py +97 -0
  1176. mypyc/irbuild/context.cp315-win_amd64.pyd +0 -0
  1177. mypyc/irbuild/context.py +206 -0
  1178. mypyc/irbuild/env_class.cp315-win_amd64.pyd +0 -0
  1179. mypyc/irbuild/env_class.py +344 -0
  1180. mypyc/irbuild/expression.cp315-win_amd64.pyd +0 -0
  1181. mypyc/irbuild/expression.py +1503 -0
  1182. mypyc/irbuild/for_helpers.cp315-win_amd64.pyd +0 -0
  1183. mypyc/irbuild/for_helpers.py +1369 -0
  1184. mypyc/irbuild/format_str_tokenizer.cp315-win_amd64.pyd +0 -0
  1185. mypyc/irbuild/format_str_tokenizer.py +260 -0
  1186. mypyc/irbuild/function.cp315-win_amd64.pyd +0 -0
  1187. mypyc/irbuild/function.py +1222 -0
  1188. mypyc/irbuild/generator.cp315-win_amd64.pyd +0 -0
  1189. mypyc/irbuild/generator.py +446 -0
  1190. mypyc/irbuild/ll_builder.cp315-win_amd64.pyd +0 -0
  1191. mypyc/irbuild/ll_builder.py +3173 -0
  1192. mypyc/irbuild/main.cp315-win_amd64.pyd +0 -0
  1193. mypyc/irbuild/main.py +173 -0
  1194. mypyc/irbuild/mapper.cp315-win_amd64.pyd +0 -0
  1195. mypyc/irbuild/mapper.py +244 -0
  1196. mypyc/irbuild/match.cp315-win_amd64.pyd +0 -0
  1197. mypyc/irbuild/match.py +367 -0
  1198. mypyc/irbuild/missingtypevisitor.cp315-win_amd64.pyd +0 -0
  1199. mypyc/irbuild/missingtypevisitor.py +20 -0
  1200. mypyc/irbuild/nonlocalcontrol.cp315-win_amd64.pyd +0 -0
  1201. mypyc/irbuild/nonlocalcontrol.py +235 -0
  1202. mypyc/irbuild/prebuildvisitor.cp315-win_amd64.pyd +0 -0
  1203. mypyc/irbuild/prebuildvisitor.py +305 -0
  1204. mypyc/irbuild/prepare.cp315-win_amd64.pyd +0 -0
  1205. mypyc/irbuild/prepare.py +1061 -0
  1206. mypyc/irbuild/specialize.cp315-win_amd64.pyd +0 -0
  1207. mypyc/irbuild/specialize.py +1589 -0
  1208. mypyc/irbuild/statement.cp315-win_amd64.pyd +0 -0
  1209. mypyc/irbuild/statement.py +1504 -0
  1210. mypyc/irbuild/targets.cp315-win_amd64.pyd +0 -0
  1211. mypyc/irbuild/targets.py +70 -0
  1212. mypyc/irbuild/util.cp315-win_amd64.pyd +0 -0
  1213. mypyc/irbuild/util.py +354 -0
  1214. mypyc/irbuild/vec.cp315-win_amd64.pyd +0 -0
  1215. mypyc/irbuild/vec.py +651 -0
  1216. mypyc/irbuild/visitor.cp315-win_amd64.pyd +0 -0
  1217. mypyc/irbuild/visitor.py +414 -0
  1218. mypyc/irbuild/vtable.cp315-win_amd64.pyd +0 -0
  1219. mypyc/irbuild/vtable.py +82 -0
  1220. mypyc/lib-rt/CPy.h +1072 -0
  1221. mypyc/lib-rt/base64/arch/avx/codec.c +76 -0
  1222. mypyc/lib-rt/base64/arch/avx/enc_loop_asm.c +264 -0
  1223. mypyc/lib-rt/base64/arch/avx2/codec.c +66 -0
  1224. mypyc/lib-rt/base64/arch/avx2/dec_loop.c +110 -0
  1225. mypyc/lib-rt/base64/arch/avx2/dec_reshuffle.c +34 -0
  1226. mypyc/lib-rt/base64/arch/avx2/enc_loop.c +89 -0
  1227. mypyc/lib-rt/base64/arch/avx2/enc_loop_asm.c +291 -0
  1228. mypyc/lib-rt/base64/arch/avx2/enc_reshuffle.c +83 -0
  1229. mypyc/lib-rt/base64/arch/avx2/enc_translate.c +30 -0
  1230. mypyc/lib-rt/base64/arch/avx512/codec.c +52 -0
  1231. mypyc/lib-rt/base64/arch/avx512/enc_loop.c +61 -0
  1232. mypyc/lib-rt/base64/arch/avx512/enc_reshuffle_translate.c +50 -0
  1233. mypyc/lib-rt/base64/arch/generic/32/dec_loop.c +86 -0
  1234. mypyc/lib-rt/base64/arch/generic/32/enc_loop.c +73 -0
  1235. mypyc/lib-rt/base64/arch/generic/64/enc_loop.c +77 -0
  1236. mypyc/lib-rt/base64/arch/generic/codec.c +41 -0
  1237. mypyc/lib-rt/base64/arch/generic/dec_head.c +37 -0
  1238. mypyc/lib-rt/base64/arch/generic/dec_tail.c +91 -0
  1239. mypyc/lib-rt/base64/arch/generic/enc_head.c +24 -0
  1240. mypyc/lib-rt/base64/arch/generic/enc_tail.c +34 -0
  1241. mypyc/lib-rt/base64/arch/neon32/codec.c +79 -0
  1242. mypyc/lib-rt/base64/arch/neon32/dec_loop.c +106 -0
  1243. mypyc/lib-rt/base64/arch/neon32/enc_loop.c +170 -0
  1244. mypyc/lib-rt/base64/arch/neon32/enc_reshuffle.c +31 -0
  1245. mypyc/lib-rt/base64/arch/neon32/enc_translate.c +57 -0
  1246. mypyc/lib-rt/base64/arch/neon64/codec.c +93 -0
  1247. mypyc/lib-rt/base64/arch/neon64/dec_loop.c +129 -0
  1248. mypyc/lib-rt/base64/arch/neon64/enc_loop.c +66 -0
  1249. mypyc/lib-rt/base64/arch/neon64/enc_loop_asm.c +168 -0
  1250. mypyc/lib-rt/base64/arch/neon64/enc_reshuffle.c +31 -0
  1251. mypyc/lib-rt/base64/arch/sse41/codec.c +66 -0
  1252. mypyc/lib-rt/base64/arch/sse42/codec.c +66 -0
  1253. mypyc/lib-rt/base64/arch/ssse3/codec.c +68 -0
  1254. mypyc/lib-rt/base64/arch/ssse3/dec_loop.c +173 -0
  1255. mypyc/lib-rt/base64/arch/ssse3/dec_reshuffle.c +33 -0
  1256. mypyc/lib-rt/base64/arch/ssse3/enc_loop.c +67 -0
  1257. mypyc/lib-rt/base64/arch/ssse3/enc_loop_asm.c +268 -0
  1258. mypyc/lib-rt/base64/arch/ssse3/enc_reshuffle.c +48 -0
  1259. mypyc/lib-rt/base64/arch/ssse3/enc_translate.c +33 -0
  1260. mypyc/lib-rt/base64/codec_choose.c +314 -0
  1261. mypyc/lib-rt/base64/codecs.h +57 -0
  1262. mypyc/lib-rt/base64/config.h +22 -0
  1263. mypyc/lib-rt/base64/env.h +84 -0
  1264. mypyc/lib-rt/base64/lib.c +164 -0
  1265. mypyc/lib-rt/base64/lib_openmp.c +149 -0
  1266. mypyc/lib-rt/base64/libbase64.h +146 -0
  1267. mypyc/lib-rt/base64/librt_base64.c +378 -0
  1268. mypyc/lib-rt/base64/librt_base64.h +10 -0
  1269. mypyc/lib-rt/base64/librt_base64_api.c +43 -0
  1270. mypyc/lib-rt/base64/librt_base64_api.h +15 -0
  1271. mypyc/lib-rt/base64/tables/table_dec_32bit.h +393 -0
  1272. mypyc/lib-rt/base64/tables/table_enc_12bit.h +1031 -0
  1273. mypyc/lib-rt/base64/tables/tables.c +40 -0
  1274. mypyc/lib-rt/base64/tables/tables.h +23 -0
  1275. mypyc/lib-rt/build_setup.py +69 -0
  1276. mypyc/lib-rt/bytearray_extra_ops.c +5 -0
  1277. mypyc/lib-rt/bytearray_extra_ops.h +10 -0
  1278. mypyc/lib-rt/bytes_extra_ops.c +45 -0
  1279. mypyc/lib-rt/bytes_extra_ops.h +31 -0
  1280. mypyc/lib-rt/bytes_ops.c +218 -0
  1281. mypyc/lib-rt/byteswriter_extra_ops.c +41 -0
  1282. mypyc/lib-rt/byteswriter_extra_ops.h +287 -0
  1283. mypyc/lib-rt/dict_ops.c +462 -0
  1284. mypyc/lib-rt/exc_ops.c +261 -0
  1285. mypyc/lib-rt/float_ops.c +239 -0
  1286. mypyc/lib-rt/function_wrapper.c +311 -0
  1287. mypyc/lib-rt/generic_ops.c +84 -0
  1288. mypyc/lib-rt/getargs.c +451 -0
  1289. mypyc/lib-rt/getargsfast.c +625 -0
  1290. mypyc/lib-rt/init.c +25 -0
  1291. mypyc/lib-rt/int_ops.c +715 -0
  1292. mypyc/lib-rt/internal/librt_internal.c +1308 -0
  1293. mypyc/lib-rt/internal/librt_internal.h +49 -0
  1294. mypyc/lib-rt/internal/librt_internal_api.c +43 -0
  1295. mypyc/lib-rt/internal/librt_internal_api.h +41 -0
  1296. mypyc/lib-rt/list_ops.c +439 -0
  1297. mypyc/lib-rt/misc_ops.c +1657 -0
  1298. mypyc/lib-rt/module_shim.tmpl +56 -0
  1299. mypyc/lib-rt/module_shim_no_gil_multiphase.tmpl +76 -0
  1300. mypyc/lib-rt/mypyc_util.h +204 -0
  1301. mypyc/lib-rt/pythoncapi_compat.h +2715 -0
  1302. mypyc/lib-rt/pythonsupport.c +230 -0
  1303. mypyc/lib-rt/pythonsupport.h +517 -0
  1304. mypyc/lib-rt/random/librt_random.c +762 -0
  1305. mypyc/lib-rt/random/librt_random.h +10 -0
  1306. mypyc/lib-rt/random/librt_random_api.c +45 -0
  1307. mypyc/lib-rt/random/librt_random_api.h +32 -0
  1308. mypyc/lib-rt/set_ops.c +17 -0
  1309. mypyc/lib-rt/static_data.c +75 -0
  1310. mypyc/lib-rt/static_data.h +72 -0
  1311. mypyc/lib-rt/str_extra_ops.c +4 -0
  1312. mypyc/lib-rt/str_extra_ops.h +29 -0
  1313. mypyc/lib-rt/str_ops.c +795 -0
  1314. mypyc/lib-rt/strings/librt_strings.c +1363 -0
  1315. mypyc/lib-rt/strings/librt_strings.h +131 -0
  1316. mypyc/lib-rt/strings/librt_strings_api.c +43 -0
  1317. mypyc/lib-rt/strings/librt_strings_api.h +37 -0
  1318. mypyc/lib-rt/strings/librt_strings_common.h +352 -0
  1319. mypyc/lib-rt/stringwriter_extra_ops.c +7 -0
  1320. mypyc/lib-rt/stringwriter_extra_ops.h +75 -0
  1321. mypyc/lib-rt/threading/librt_threading.c +714 -0
  1322. mypyc/lib-rt/threading/librt_threading.h +10 -0
  1323. mypyc/lib-rt/threading/librt_threading_api.c +43 -0
  1324. mypyc/lib-rt/threading/librt_threading_api.h +20 -0
  1325. mypyc/lib-rt/time/librt_time.c +128 -0
  1326. mypyc/lib-rt/time/librt_time.h +10 -0
  1327. mypyc/lib-rt/time/librt_time_api.c +43 -0
  1328. mypyc/lib-rt/time/librt_time_api.h +15 -0
  1329. mypyc/lib-rt/tuple_ops.c +62 -0
  1330. mypyc/lib-rt/vecs/librt_vecs.c +1129 -0
  1331. mypyc/lib-rt/vecs/librt_vecs.h +998 -0
  1332. mypyc/lib-rt/vecs/librt_vecs_api.c +51 -0
  1333. mypyc/lib-rt/vecs/librt_vecs_api.h +24 -0
  1334. mypyc/lib-rt/vecs/vec_bool.c +18 -0
  1335. mypyc/lib-rt/vecs/vec_float.c +19 -0
  1336. mypyc/lib-rt/vecs/vec_i16.c +19 -0
  1337. mypyc/lib-rt/vecs/vec_i32.c +19 -0
  1338. mypyc/lib-rt/vecs/vec_i64.c +19 -0
  1339. mypyc/lib-rt/vecs/vec_nested.c +765 -0
  1340. mypyc/lib-rt/vecs/vec_t.c +869 -0
  1341. mypyc/lib-rt/vecs/vec_template.c +846 -0
  1342. mypyc/lib-rt/vecs/vec_u8.c +19 -0
  1343. mypyc/lib-rt/vecs/vecs_internal.h +11 -0
  1344. mypyc/lib-rt/vecs_extra_ops.c +6 -0
  1345. mypyc/lib-rt/vecs_extra_ops.h +18 -0
  1346. mypyc/lower/__init__.cp315-win_amd64.pyd +0 -0
  1347. mypyc/lower/__init__.py +0 -0
  1348. mypyc/lower/int_ops.cp315-win_amd64.pyd +0 -0
  1349. mypyc/lower/int_ops.py +113 -0
  1350. mypyc/lower/list_ops.cp315-win_amd64.pyd +0 -0
  1351. mypyc/lower/list_ops.py +71 -0
  1352. mypyc/lower/misc_ops.cp315-win_amd64.pyd +0 -0
  1353. mypyc/lower/misc_ops.py +20 -0
  1354. mypyc/lower/registry.cp315-win_amd64.pyd +0 -0
  1355. mypyc/lower/registry.py +29 -0
  1356. mypyc/lower/vec_ops.cp315-win_amd64.pyd +0 -0
  1357. mypyc/lower/vec_ops.py +18 -0
  1358. mypyc/namegen.cp315-win_amd64.pyd +0 -0
  1359. mypyc/namegen.py +124 -0
  1360. mypyc/options.cp315-win_amd64.pyd +0 -0
  1361. mypyc/options.py +75 -0
  1362. mypyc/primitives/__init__.cp315-win_amd64.pyd +0 -0
  1363. mypyc/primitives/__init__.py +0 -0
  1364. mypyc/primitives/bytearray_ops.cp315-win_amd64.pyd +0 -0
  1365. mypyc/primitives/bytearray_ops.py +44 -0
  1366. mypyc/primitives/bytes_ops.cp315-win_amd64.pyd +0 -0
  1367. mypyc/primitives/bytes_ops.py +193 -0
  1368. mypyc/primitives/dict_ops.cp315-win_amd64.pyd +0 -0
  1369. mypyc/primitives/dict_ops.py +343 -0
  1370. mypyc/primitives/exc_ops.cp315-win_amd64.pyd +0 -0
  1371. mypyc/primitives/exc_ops.py +111 -0
  1372. mypyc/primitives/float_ops.cp315-win_amd64.pyd +0 -0
  1373. mypyc/primitives/float_ops.py +178 -0
  1374. mypyc/primitives/generic_ops.cp315-win_amd64.pyd +0 -0
  1375. mypyc/primitives/generic_ops.py +426 -0
  1376. mypyc/primitives/int_ops.cp315-win_amd64.pyd +0 -0
  1377. mypyc/primitives/int_ops.py +359 -0
  1378. mypyc/primitives/librt_random_ops.cp315-win_amd64.pyd +0 -0
  1379. mypyc/primitives/librt_random_ops.py +104 -0
  1380. mypyc/primitives/librt_strings_ops.cp315-win_amd64.pyd +0 -0
  1381. mypyc/primitives/librt_strings_ops.py +463 -0
  1382. mypyc/primitives/librt_threading_ops.cp315-win_amd64.pyd +0 -0
  1383. mypyc/primitives/librt_threading_ops.py +54 -0
  1384. mypyc/primitives/librt_time_ops.cp315-win_amd64.pyd +0 -0
  1385. mypyc/primitives/librt_time_ops.py +13 -0
  1386. mypyc/primitives/librt_vecs_ops.cp315-win_amd64.pyd +0 -0
  1387. mypyc/primitives/librt_vecs_ops.py +51 -0
  1388. mypyc/primitives/list_ops.cp315-win_amd64.pyd +0 -0
  1389. mypyc/primitives/list_ops.py +376 -0
  1390. mypyc/primitives/misc_ops.cp315-win_amd64.pyd +0 -0
  1391. mypyc/primitives/misc_ops.py +613 -0
  1392. mypyc/primitives/registry.cp315-win_amd64.pyd +0 -0
  1393. mypyc/primitives/registry.py +421 -0
  1394. mypyc/primitives/set_ops.cp315-win_amd64.pyd +0 -0
  1395. mypyc/primitives/set_ops.py +161 -0
  1396. mypyc/primitives/str_ops.cp315-win_amd64.pyd +0 -0
  1397. mypyc/primitives/str_ops.py +587 -0
  1398. mypyc/primitives/tuple_ops.cp315-win_amd64.pyd +0 -0
  1399. mypyc/primitives/tuple_ops.py +136 -0
  1400. mypyc/primitives/weakref_ops.cp315-win_amd64.pyd +0 -0
  1401. mypyc/primitives/weakref_ops.py +40 -0
  1402. mypyc/py.typed +0 -0
  1403. mypyc/rt_expandtype.cp315-win_amd64.pyd +0 -0
  1404. mypyc/rt_expandtype.py +32 -0
  1405. mypyc/rt_subtype.cp315-win_amd64.pyd +0 -0
  1406. mypyc/rt_subtype.py +84 -0
  1407. mypyc/sametype.cp315-win_amd64.pyd +0 -0
  1408. mypyc/sametype.py +87 -0
  1409. mypyc/subtype.cp315-win_amd64.pyd +0 -0
  1410. mypyc/subtype.py +103 -0
  1411. mypyc/test/__init__.py +0 -0
  1412. mypyc/test/config.py +13 -0
  1413. mypyc/test/librt_cache.py +243 -0
  1414. mypyc/test/test_alwaysdefined.py +46 -0
  1415. mypyc/test/test_analysis.py +77 -0
  1416. mypyc/test/test_annotate.py +71 -0
  1417. mypyc/test/test_capsule_deps.py +55 -0
  1418. mypyc/test/test_cheader.py +97 -0
  1419. mypyc/test/test_commandline.py +82 -0
  1420. mypyc/test/test_emit.py +176 -0
  1421. mypyc/test/test_emitclass.py +56 -0
  1422. mypyc/test/test_emitfunc.py +1101 -0
  1423. mypyc/test/test_emitmodule.py +76 -0
  1424. mypyc/test/test_emitwrapper.py +60 -0
  1425. mypyc/test/test_exceptions.py +64 -0
  1426. mypyc/test/test_expand_rtype.py +48 -0
  1427. mypyc/test/test_external.py +104 -0
  1428. mypyc/test/test_irbuild.py +109 -0
  1429. mypyc/test/test_ircheck.py +199 -0
  1430. mypyc/test/test_literals.py +138 -0
  1431. mypyc/test/test_lowering.py +67 -0
  1432. mypyc/test/test_misc.py +152 -0
  1433. mypyc/test/test_namegen.py +68 -0
  1434. mypyc/test/test_optimizations.py +74 -0
  1435. mypyc/test/test_pprint.py +42 -0
  1436. mypyc/test/test_rarray.py +48 -0
  1437. mypyc/test/test_refcount.py +65 -0
  1438. mypyc/test/test_run.py +549 -0
  1439. mypyc/test/test_serialization.py +106 -0
  1440. mypyc/test/test_statement.py +149 -0
  1441. mypyc/test/test_struct.py +112 -0
  1442. mypyc/test/test_tuplename.py +33 -0
  1443. mypyc/test/test_typeops.py +97 -0
  1444. mypyc/test/testutil.py +308 -0
  1445. mypyc/transform/__init__.cp315-win_amd64.pyd +0 -0
  1446. mypyc/transform/__init__.py +0 -0
  1447. mypyc/transform/copy_propagation.cp315-win_amd64.pyd +0 -0
  1448. mypyc/transform/copy_propagation.py +94 -0
  1449. mypyc/transform/exceptions.cp315-win_amd64.pyd +0 -0
  1450. mypyc/transform/exceptions.py +192 -0
  1451. mypyc/transform/flag_elimination.cp315-win_amd64.pyd +0 -0
  1452. mypyc/transform/flag_elimination.py +107 -0
  1453. mypyc/transform/ir_transform.cp315-win_amd64.pyd +0 -0
  1454. mypyc/transform/ir_transform.py +385 -0
  1455. mypyc/transform/log_trace.cp315-win_amd64.pyd +0 -0
  1456. mypyc/transform/log_trace.py +158 -0
  1457. mypyc/transform/lower.cp315-win_amd64.pyd +0 -0
  1458. mypyc/transform/lower.py +35 -0
  1459. mypyc/transform/refcount.cp315-win_amd64.pyd +0 -0
  1460. mypyc/transform/refcount.py +298 -0
  1461. mypyc/transform/spill.cp315-win_amd64.pyd +0 -0
  1462. mypyc/transform/spill.py +132 -0
  1463. mypyc/transform/uninit.cp315-win_amd64.pyd +0 -0
  1464. mypyc/transform/uninit.py +199 -0
Binary file
mypy/__init__.py ADDED
@@ -0,0 +1 @@
1
+ # This page intentionally left blank
mypy/__main__.py ADDED
@@ -0,0 +1,52 @@
1
+ """Mypy type checker command line tool."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+ import traceback
8
+
9
+ from mypy.fscache import FileSystemCache
10
+ from mypy.main import main, process_options
11
+ from mypy.util import FancyFormatter
12
+
13
+
14
+ def console_entry() -> None:
15
+ try:
16
+ main()
17
+ sys.stdout.flush()
18
+ sys.stderr.flush()
19
+ except BrokenPipeError:
20
+ # Python flushes standard streams on exit; redirect remaining output
21
+ # to devnull to avoid another BrokenPipeError at shutdown
22
+ devnull = os.open(os.devnull, os.O_WRONLY)
23
+ os.dup2(devnull, sys.stdout.fileno())
24
+ sys.exit(2)
25
+ except KeyboardInterrupt:
26
+ # Setting fscache prevents bogus errors when --package-root is set.
27
+ _, options = process_options(args=sys.argv[1:], fscache=FileSystemCache())
28
+ if options.show_traceback:
29
+ sys.stdout.write(traceback.format_exc())
30
+ formatter = FancyFormatter(sys.stdout, sys.stderr, False)
31
+ msg = "Interrupted\n"
32
+ sys.stdout.write(formatter.style(msg, color="red", bold=True))
33
+ sys.stdout.flush()
34
+ sys.stderr.flush()
35
+ sys.exit(2)
36
+ except Exception as e:
37
+ # Try reporting any uncaught error canonically, otherwise just flush the traceback.
38
+ try:
39
+ import mypy.errors
40
+
41
+ _, options = process_options(args=sys.argv[1:], fscache=FileSystemCache())
42
+ mypy.errors.report_internal_error(e, None, 0, None, options)
43
+ except Exception:
44
+ pass
45
+ sys.stdout.write(traceback.format_exc())
46
+ sys.stdout.flush()
47
+ sys.stderr.flush()
48
+ sys.exit(2)
49
+
50
+
51
+ if __name__ == "__main__":
52
+ console_entry()
Binary file
mypy/api.py ADDED
@@ -0,0 +1,95 @@
1
+ """This module makes it possible to use mypy as part of a Python application.
2
+
3
+ Since mypy still changes, the API was kept utterly simple and non-intrusive.
4
+ It just mimics command line activation without starting a new interpreter.
5
+ So the normal docs about the mypy command line apply.
6
+ Changes in the command line version of mypy will be immediately usable.
7
+
8
+ Just import this module and then call the 'run' function with a parameter of
9
+ type List[str], containing what normally would have been the command line
10
+ arguments to mypy.
11
+
12
+ Function 'run' returns a Tuple[str, str, int], namely
13
+ (<normal_report>, <error_report>, <exit_status>),
14
+ in which <normal_report> is what mypy normally writes to sys.stdout,
15
+ <error_report> is what mypy normally writes to sys.stderr and exit_status is
16
+ the exit status mypy normally returns to the operating system.
17
+
18
+ Any pretty formatting is left to the caller.
19
+
20
+ The 'run_dmypy' function is similar, but instead mimics invocation of
21
+ dmypy. Note that run_dmypy is not thread-safe and modifies sys.stdout
22
+ and sys.stderr during its invocation.
23
+
24
+ Note that these APIs don't support incremental generation of error
25
+ messages.
26
+
27
+ Trivial example of code using this module:
28
+
29
+ import sys
30
+ from mypy import api
31
+
32
+ result = api.run(sys.argv[1:])
33
+
34
+ if result[0]:
35
+ print('\nType checking report:\n')
36
+ print(result[0]) # stdout
37
+
38
+ if result[1]:
39
+ print('\nError report:\n')
40
+ print(result[1]) # stderr
41
+
42
+ print('\nExit status:', result[2])
43
+
44
+ """
45
+
46
+ from __future__ import annotations
47
+
48
+ import sys
49
+ from collections.abc import Callable
50
+ from io import StringIO
51
+ from typing import TextIO
52
+
53
+
54
+ def _run(main_wrapper: Callable[[TextIO, TextIO], None]) -> tuple[str, str, int]:
55
+ stdout = StringIO()
56
+ stderr = StringIO()
57
+
58
+ try:
59
+ main_wrapper(stdout, stderr)
60
+ exit_status = 0
61
+ except SystemExit as system_exit:
62
+ assert isinstance(system_exit.code, int)
63
+ exit_status = system_exit.code
64
+
65
+ return stdout.getvalue(), stderr.getvalue(), exit_status
66
+
67
+
68
+ def run(args: list[str]) -> tuple[str, str, int]:
69
+ # Lazy import to avoid needing to import all of mypy to call run_dmypy
70
+ from mypy.main import main
71
+
72
+ return _run(
73
+ lambda stdout, stderr: main(args=args, stdout=stdout, stderr=stderr, clean_exit=True)
74
+ )
75
+
76
+
77
+ def run_dmypy(args: list[str]) -> tuple[str, str, int]:
78
+ from mypy.dmypy.client import main
79
+
80
+ # A bunch of effort has been put into threading stdout and stderr
81
+ # through the main API to avoid the threadsafety problems of
82
+ # modifying sys.stdout/sys.stderr, but that hasn't been done for
83
+ # the dmypy client, so we just do the non-threadsafe thing.
84
+ def f(stdout: TextIO, stderr: TextIO) -> None:
85
+ old_stdout = sys.stdout
86
+ old_stderr = sys.stderr
87
+ try:
88
+ sys.stdout = stdout
89
+ sys.stderr = stderr
90
+ main(args)
91
+ finally:
92
+ sys.stdout = old_stdout
93
+ sys.stderr = old_stderr
94
+
95
+ return _run(f)
Binary file
mypy/applytype.py ADDED
@@ -0,0 +1,317 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Callable, Iterable, Sequence
4
+
5
+ import mypy.subtypes
6
+ from mypy.erasetype import erase_typevars
7
+ from mypy.expandtype import expand_type
8
+ from mypy.nodes import Context, TypeInfo
9
+ from mypy.type_visitor import TypeTranslator
10
+ from mypy.typeops import get_all_type_vars
11
+ from mypy.types import (
12
+ AnyType,
13
+ CallableType,
14
+ Instance,
15
+ Parameters,
16
+ ParamSpecFlavor,
17
+ ParamSpecType,
18
+ PartialType,
19
+ ProperType,
20
+ Type,
21
+ TypeAliasType,
22
+ TypeVarId,
23
+ TypeVarLikeType,
24
+ TypeVarTupleType,
25
+ TypeVarType,
26
+ UninhabitedType,
27
+ UnpackType,
28
+ get_proper_type,
29
+ remove_dups,
30
+ )
31
+
32
+
33
+ def get_target_type(
34
+ tvar: TypeVarLikeType,
35
+ type: Type,
36
+ callable: CallableType,
37
+ report_incompatible_typevar_value: Callable[[CallableType, Type, str, Context], None],
38
+ context: Context,
39
+ skip_unsatisfied: bool,
40
+ id_to_type: dict[TypeVarId, Type],
41
+ ) -> Type | None:
42
+ p_type = get_proper_type(type)
43
+ if isinstance(p_type, UninhabitedType) and p_type.ambiguous and tvar.has_default():
44
+ # Gradually expand defaults, as they may depend on previous type variables.
45
+ return expand_type(tvar.default, id_to_type)
46
+ if isinstance(tvar, ParamSpecType):
47
+ return type
48
+ if isinstance(tvar, TypeVarTupleType):
49
+ return type
50
+ assert isinstance(tvar, TypeVarType)
51
+ values = tvar.values
52
+ if values:
53
+ if isinstance(p_type, AnyType):
54
+ return type
55
+ if isinstance(p_type, TypeVarType) and p_type.values:
56
+ # Allow substituting T1 for T if every allowed value of T1
57
+ # is also a legal value of T.
58
+ if all(any(mypy.subtypes.is_same_type(v, v1) for v in values) for v1 in p_type.values):
59
+ return type
60
+ matching = []
61
+ for value in values:
62
+ if mypy.subtypes.is_subtype(type, value):
63
+ matching.append(value)
64
+ if matching:
65
+ best = matching[0]
66
+ # If there are more than one matching value, we select the narrowest
67
+ for match in matching[1:]:
68
+ if mypy.subtypes.is_subtype(match, best):
69
+ best = match
70
+ return best
71
+ if skip_unsatisfied:
72
+ return None
73
+ report_incompatible_typevar_value(callable, type, tvar.name, context)
74
+ else:
75
+ upper_bound = tvar.upper_bound
76
+ if tvar.name == "Self":
77
+ # Internally constructed Self-types contain class type variables in upper bound,
78
+ # so we need to erase them to avoid false positives. This is safe because we do
79
+ # not support type variables in upper bounds of user defined types.
80
+ upper_bound = erase_typevars(upper_bound)
81
+ if not mypy.subtypes.is_subtype(type, upper_bound):
82
+ if skip_unsatisfied:
83
+ return None
84
+ report_incompatible_typevar_value(callable, type, tvar.name, context)
85
+ return type
86
+
87
+
88
+ def apply_generic_arguments(
89
+ callable: CallableType,
90
+ orig_types: Sequence[Type | None],
91
+ report_incompatible_typevar_value: Callable[[CallableType, Type, str, Context], None],
92
+ context: Context,
93
+ skip_unsatisfied: bool = False,
94
+ ) -> CallableType:
95
+ """Apply generic type arguments to a callable type.
96
+
97
+ For example, applying [int] to 'def [T] (T) -> T' results in
98
+ 'def (int) -> int'.
99
+
100
+ Note that each type can be None; in this case, it will not be applied.
101
+
102
+ If `skip_unsatisfied` is True, then just skip the types that don't satisfy type variable
103
+ bound or constraints, instead of giving an error.
104
+ """
105
+ tvars = callable.variables
106
+ assert len(orig_types) <= len(tvars)
107
+ # Check that inferred type variable values are compatible with allowed
108
+ # values and bounds. Also, promote subtype values to allowed values.
109
+ # Create a map from type variable id to target type.
110
+ id_to_type: dict[TypeVarId, Type] = {}
111
+
112
+ for tvar, type in zip(tvars, orig_types):
113
+ assert not isinstance(type, PartialType), "Internal error: must never apply partial type"
114
+ if type is None:
115
+ continue
116
+
117
+ target_type = get_target_type(
118
+ tvar,
119
+ type,
120
+ callable,
121
+ report_incompatible_typevar_value,
122
+ context,
123
+ skip_unsatisfied,
124
+ id_to_type,
125
+ )
126
+ if target_type is not None:
127
+ id_to_type[tvar.id] = target_type
128
+
129
+ # TODO: validate arg_kinds/arg_names for ParamSpec and TypeVarTuple replacements,
130
+ # not just type variable bounds above.
131
+ param_spec = callable.param_spec()
132
+ if param_spec is not None:
133
+ nt = id_to_type.get(param_spec.id)
134
+ if nt is not None:
135
+ # ParamSpec expansion is special-cased, so we need to always expand callable
136
+ # as a whole, not expanding arguments individually.
137
+ callable = expand_type(callable, id_to_type)
138
+ assert isinstance(callable, CallableType)
139
+ return callable.copy_modified(
140
+ variables=[tv for tv in tvars if tv.id not in id_to_type]
141
+ )
142
+
143
+ # Apply arguments to argument types.
144
+ var_arg = callable.var_arg()
145
+ if var_arg is not None and isinstance(var_arg.typ, UnpackType):
146
+ # Same as for ParamSpec, callable with variadic types needs to be expanded as a whole.
147
+ callable = expand_type(callable, id_to_type)
148
+ assert isinstance(callable, CallableType)
149
+ return callable.copy_modified(variables=[tv for tv in tvars if tv.id not in id_to_type])
150
+ else:
151
+ callable = callable.copy_modified(
152
+ arg_types=[expand_type(at, id_to_type) for at in callable.arg_types]
153
+ )
154
+
155
+ # Apply arguments to TypeGuard and TypeIs if any.
156
+ if callable.type_guard is not None:
157
+ type_guard = expand_type(callable.type_guard, id_to_type)
158
+ else:
159
+ type_guard = None
160
+ if callable.type_is is not None:
161
+ type_is = expand_type(callable.type_is, id_to_type)
162
+ else:
163
+ type_is = None
164
+
165
+ # The callable may retain some type vars if only some were applied.
166
+ # TODO: move apply_poly() logic here when new inference
167
+ # becomes universally used (i.e. in all passes + in unification).
168
+ # With this new logic we can actually *add* some new free variables.
169
+ remaining_tvars: list[TypeVarLikeType] = []
170
+ for tv in tvars:
171
+ if tv.id in id_to_type:
172
+ continue
173
+ if not tv.has_default():
174
+ remaining_tvars.append(tv)
175
+ continue
176
+ # TypeVarLike isn't in id_to_type mapping.
177
+ # Only expand the TypeVar default here.
178
+ typ = expand_type(tv, id_to_type)
179
+ assert isinstance(typ, TypeVarLikeType)
180
+ remaining_tvars.append(typ)
181
+
182
+ instance_type = None
183
+ if callable.instance_type is not None:
184
+ instance_type = expand_type(callable.instance_type, id_to_type)
185
+ assert isinstance(instance_type, ProperType)
186
+
187
+ return callable.copy_modified(
188
+ ret_type=expand_type(callable.ret_type, id_to_type),
189
+ variables=remaining_tvars,
190
+ type_guard=type_guard,
191
+ type_is=type_is,
192
+ instance_type=instance_type,
193
+ )
194
+
195
+
196
+ def apply_poly(tp: CallableType, poly_tvars: Sequence[TypeVarLikeType]) -> CallableType | None:
197
+ """Make free type variables generic in the type if possible.
198
+
199
+ This will translate the type `tp` while trying to create valid bindings for
200
+ type variables `poly_tvars` while traversing the type. This follows the same rules
201
+ as we do during semantic analysis phase, examples:
202
+ * Callable[Callable[[T], T], T] -> def [T] (def (T) -> T) -> T
203
+ * Callable[[], Callable[[T], T]] -> def () -> def [T] (T -> T)
204
+ * List[T] -> None (not possible)
205
+ """
206
+ try:
207
+ return tp.copy_modified(
208
+ arg_types=[t.accept(PolyTranslator(poly_tvars)) for t in tp.arg_types],
209
+ ret_type=tp.ret_type.accept(PolyTranslator(poly_tvars)),
210
+ variables=[],
211
+ )
212
+ except PolyTranslationError:
213
+ return None
214
+
215
+
216
+ class PolyTranslationError(Exception):
217
+ pass
218
+
219
+
220
+ class PolyTranslator(TypeTranslator):
221
+ """Make free type variables generic in the type if possible.
222
+
223
+ See docstring for apply_poly() for details.
224
+ """
225
+
226
+ def __init__(
227
+ self,
228
+ poly_tvars: Iterable[TypeVarLikeType],
229
+ bound_tvars: frozenset[TypeVarLikeType] = frozenset(),
230
+ seen_aliases: frozenset[TypeInfo] = frozenset(),
231
+ ) -> None:
232
+ super().__init__()
233
+ self.poly_tvars = set(poly_tvars)
234
+ # This is a simplified version of TypeVarScope used during semantic analysis.
235
+ self.bound_tvars = bound_tvars
236
+ self.seen_aliases = seen_aliases
237
+
238
+ def collect_vars(self, t: CallableType | Parameters) -> list[TypeVarLikeType]:
239
+ found_vars = []
240
+ for arg in t.arg_types:
241
+ for tv in get_all_type_vars(arg):
242
+ if isinstance(tv, ParamSpecType):
243
+ normalized: TypeVarLikeType = tv.copy_modified(
244
+ flavor=ParamSpecFlavor.BARE, prefix=Parameters([], [], [])
245
+ )
246
+ else:
247
+ normalized = tv
248
+ if normalized in self.poly_tvars and normalized not in self.bound_tvars:
249
+ found_vars.append(normalized)
250
+ return remove_dups(found_vars)
251
+
252
+ def visit_callable_type(self, t: CallableType) -> Type:
253
+ found_vars = self.collect_vars(t)
254
+ self.bound_tvars |= set(found_vars)
255
+ result = super().visit_callable_type(t)
256
+ self.bound_tvars -= set(found_vars)
257
+
258
+ assert isinstance(result, ProperType) and isinstance(result, CallableType)
259
+ result.variables = result.variables + tuple(found_vars)
260
+ return result
261
+
262
+ def visit_type_var(self, t: TypeVarType) -> Type:
263
+ if t in self.poly_tvars and t not in self.bound_tvars:
264
+ raise PolyTranslationError()
265
+ return super().visit_type_var(t)
266
+
267
+ def visit_param_spec(self, t: ParamSpecType) -> Type:
268
+ if t in self.poly_tvars and t not in self.bound_tvars:
269
+ raise PolyTranslationError()
270
+ return super().visit_param_spec(t)
271
+
272
+ def visit_type_var_tuple(self, t: TypeVarTupleType) -> Type:
273
+ if t in self.poly_tvars and t not in self.bound_tvars:
274
+ raise PolyTranslationError()
275
+ return super().visit_type_var_tuple(t)
276
+
277
+ def visit_type_alias_type(self, t: TypeAliasType) -> Type:
278
+ if not t.args:
279
+ return t.copy_modified()
280
+ if not t.is_recursive:
281
+ return get_proper_type(t).accept(self)
282
+ # We can't handle polymorphic application for recursive generic aliases
283
+ # without risking an infinite recursion, just give up for now.
284
+ raise PolyTranslationError()
285
+
286
+ def visit_instance(self, t: Instance) -> Type:
287
+ if t.type.has_param_spec_type:
288
+ # We need this special-casing to preserve the possibility to store a
289
+ # generic function in an instance type. Things like
290
+ # forall T . Foo[[x: T], T]
291
+ # are not really expressible in current type system, but this looks like
292
+ # a useful feature, so let's keep it.
293
+ param_spec_index = next(
294
+ i for (i, tv) in enumerate(t.type.defn.type_vars) if isinstance(tv, ParamSpecType)
295
+ )
296
+ p = get_proper_type(t.args[param_spec_index])
297
+ if isinstance(p, Parameters):
298
+ found_vars = self.collect_vars(p)
299
+ self.bound_tvars |= set(found_vars)
300
+ new_args = [a.accept(self) for a in t.args]
301
+ self.bound_tvars -= set(found_vars)
302
+
303
+ repl = new_args[param_spec_index]
304
+ assert isinstance(repl, ProperType) and isinstance(repl, Parameters)
305
+ repl.variables = list(repl.variables) + list(found_vars)
306
+ return t.copy_modified(args=new_args)
307
+ # There is the same problem with callback protocols as with aliases
308
+ # (callback protocols are essentially more flexible aliases to callables).
309
+ if t.args and t.type.is_protocol and t.type.protocol_members == ["__call__"]:
310
+ if t.type in self.seen_aliases:
311
+ raise PolyTranslationError()
312
+ call = mypy.subtypes.find_member("__call__", t, t, is_operator=True)
313
+ assert call is not None
314
+ return call.accept(
315
+ PolyTranslator(self.poly_tvars, self.bound_tvars, self.seen_aliases | {t.type})
316
+ )
317
+ return super().visit_instance(t)
Binary file