@gnost-cli/darwin-arm64 0.0.1 → 0.5.1-rc.1

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 (1407) hide show
  1. package/README.md +1 -1
  2. package/bundle/_internal/6ec57f84c680d3a3778b__mypyc.cpython-312-darwin.so +4 -0
  3. package/bundle/_internal/Python +0 -0
  4. package/bundle/_internal/Python.framework/Python +0 -0
  5. package/bundle/_internal/Python.framework/Resources/Info.plist +30 -0
  6. package/bundle/_internal/Python.framework/Versions/3.12/Python +0 -0
  7. package/bundle/_internal/Python.framework/Versions/3.12/Resources/Info.plist +30 -0
  8. package/bundle/_internal/Python.framework/Versions/Current/Python +0 -0
  9. package/bundle/_internal/Python.framework/Versions/Current/Resources/Info.plist +30 -0
  10. package/bundle/_internal/ast_serialize/ast_serialize.abi3.so +0 -0
  11. package/bundle/_internal/bandit/__init__.py +20 -0
  12. package/bundle/_internal/bandit/__main__.py +17 -0
  13. package/bundle/_internal/bandit/blacklists/__init__.py +0 -0
  14. package/bundle/_internal/bandit/blacklists/calls.py +670 -0
  15. package/bundle/_internal/bandit/blacklists/imports.py +425 -0
  16. package/bundle/_internal/bandit/blacklists/utils.py +17 -0
  17. package/bundle/_internal/bandit/cli/__init__.py +0 -0
  18. package/bundle/_internal/bandit/cli/baseline.py +252 -0
  19. package/bundle/_internal/bandit/cli/config_generator.py +207 -0
  20. package/bundle/_internal/bandit/cli/main.py +701 -0
  21. package/bundle/_internal/bandit/core/__init__.py +15 -0
  22. package/bundle/_internal/bandit/core/blacklisting.py +72 -0
  23. package/bundle/_internal/bandit/core/config.py +271 -0
  24. package/bundle/_internal/bandit/core/constants.py +40 -0
  25. package/bundle/_internal/bandit/core/context.py +316 -0
  26. package/bundle/_internal/bandit/core/docs_utils.py +54 -0
  27. package/bundle/_internal/bandit/core/extension_loader.py +114 -0
  28. package/bundle/_internal/bandit/core/issue.py +245 -0
  29. package/bundle/_internal/bandit/core/manager.py +499 -0
  30. package/bundle/_internal/bandit/core/meta_ast.py +44 -0
  31. package/bundle/_internal/bandit/core/metrics.py +106 -0
  32. package/bundle/_internal/bandit/core/node_visitor.py +297 -0
  33. package/bundle/_internal/bandit/core/test_properties.py +83 -0
  34. package/bundle/_internal/bandit/core/test_set.py +114 -0
  35. package/bundle/_internal/bandit/core/tester.py +168 -0
  36. package/bundle/_internal/bandit/core/utils.py +398 -0
  37. package/bundle/_internal/bandit/formatters/__init__.py +0 -0
  38. package/bundle/_internal/bandit/formatters/csv.py +82 -0
  39. package/bundle/_internal/bandit/formatters/custom.py +161 -0
  40. package/bundle/_internal/bandit/formatters/html.py +394 -0
  41. package/bundle/_internal/bandit/formatters/json.py +155 -0
  42. package/bundle/_internal/bandit/formatters/sarif.py +374 -0
  43. package/bundle/_internal/bandit/formatters/screen.py +244 -0
  44. package/bundle/_internal/bandit/formatters/text.py +200 -0
  45. package/bundle/_internal/bandit/formatters/utils.py +14 -0
  46. package/bundle/_internal/bandit/formatters/xml.py +97 -0
  47. package/bundle/_internal/bandit/formatters/yaml.py +126 -0
  48. package/bundle/_internal/bandit/plugins/__init__.py +0 -0
  49. package/bundle/_internal/bandit/plugins/app_debug.py +63 -0
  50. package/bundle/_internal/bandit/plugins/asserts.py +83 -0
  51. package/bundle/_internal/bandit/plugins/crypto_request_no_cert_validation.py +75 -0
  52. package/bundle/_internal/bandit/plugins/django_sql_injection.py +155 -0
  53. package/bundle/_internal/bandit/plugins/django_xss.py +287 -0
  54. package/bundle/_internal/bandit/plugins/exec.py +55 -0
  55. package/bundle/_internal/bandit/plugins/general_bad_file_permissions.py +99 -0
  56. package/bundle/_internal/bandit/plugins/general_bind_all_interfaces.py +52 -0
  57. package/bundle/_internal/bandit/plugins/general_hardcoded_password.py +282 -0
  58. package/bundle/_internal/bandit/plugins/general_hardcoded_tmp.py +79 -0
  59. package/bundle/_internal/bandit/plugins/hashlib_insecure_functions.py +121 -0
  60. package/bundle/_internal/bandit/plugins/huggingface_unsafe_download.py +166 -0
  61. package/bundle/_internal/bandit/plugins/injection_paramiko.py +63 -0
  62. package/bundle/_internal/bandit/plugins/injection_shell.py +706 -0
  63. package/bundle/_internal/bandit/plugins/injection_sql.py +143 -0
  64. package/bundle/_internal/bandit/plugins/injection_wildcard.py +144 -0
  65. package/bundle/_internal/bandit/plugins/insecure_ssl_tls.py +285 -0
  66. package/bundle/_internal/bandit/plugins/jinja2_templates.py +134 -0
  67. package/bundle/_internal/bandit/plugins/logging_config_insecure_listen.py +58 -0
  68. package/bundle/_internal/bandit/plugins/mako_templates.py +69 -0
  69. package/bundle/_internal/bandit/plugins/markupsafe_markup_xss.py +118 -0
  70. package/bundle/_internal/bandit/plugins/pytorch_load.py +77 -0
  71. package/bundle/_internal/bandit/plugins/request_without_timeout.py +84 -0
  72. package/bundle/_internal/bandit/plugins/snmp_security_check.py +110 -0
  73. package/bundle/_internal/bandit/plugins/ssh_no_host_key_verification.py +76 -0
  74. package/bundle/_internal/bandit/plugins/tarfile_unsafe_members.py +121 -0
  75. package/bundle/_internal/bandit/plugins/trojansource.py +82 -0
  76. package/bundle/_internal/bandit/plugins/try_except_continue.py +108 -0
  77. package/bundle/_internal/bandit/plugins/try_except_pass.py +106 -0
  78. package/bundle/_internal/bandit/plugins/weak_cryptographic_key.py +165 -0
  79. package/bundle/_internal/bandit/plugins/yaml_load.py +76 -0
  80. package/bundle/_internal/bandit-1.9.4.dist-info/INSTALLER +1 -0
  81. package/bundle/_internal/bandit-1.9.4.dist-info/METADATA +212 -0
  82. package/bundle/_internal/bandit-1.9.4.dist-info/RECORD +150 -0
  83. package/bundle/_internal/bandit-1.9.4.dist-info/WHEEL +5 -0
  84. package/bundle/_internal/bandit-1.9.4.dist-info/entry_points.txt +63 -0
  85. package/bundle/_internal/bandit-1.9.4.dist-info/licenses/LICENSE +175 -0
  86. package/bundle/_internal/bandit-1.9.4.dist-info/pbr.json +1 -0
  87. package/bundle/_internal/bandit-1.9.4.dist-info/top_level.txt +1 -0
  88. package/bundle/_internal/base_library.zip +0 -0
  89. package/bundle/_internal/bin/ruff +0 -0
  90. package/bundle/_internal/gnost/__init__.py +1 -0
  91. package/bundle/_internal/gnost/analysis/__init__.py +0 -0
  92. package/bundle/_internal/gnost/analysis/analyzers/__init__.py +11 -0
  93. package/bundle/_internal/gnost/analysis/analyzers/maintainability_analyzer.py +901 -0
  94. package/bundle/_internal/gnost/analysis/analyzers/observability_analyzer.py +592 -0
  95. package/bundle/_internal/gnost/analysis/analyzers/readability_analyzer.py +968 -0
  96. package/bundle/_internal/gnost/analysis/analyzers/robustness_analyzer.py +944 -0
  97. package/bundle/_internal/gnost/analysis/config/mypy.ini +4 -0
  98. package/bundle/_internal/gnost/analysis/core/__init__.py +0 -0
  99. package/bundle/_internal/gnost/analysis/core/aggregator.py +584 -0
  100. package/bundle/_internal/gnost/analysis/core/engine.py +430 -0
  101. package/bundle/_internal/gnost/analysis/core/file_utils.py +209 -0
  102. package/bundle/_internal/gnost/analysis/core/interfaces.py +304 -0
  103. package/bundle/_internal/gnost/analysis/core/models.py +479 -0
  104. package/bundle/_internal/gnost/analysis/core/tool_runner.py +153 -0
  105. package/bundle/_internal/gnost/analysis/core/transformers.py +779 -0
  106. package/bundle/_internal/gnost/analysis/utils/__init__.py +0 -0
  107. package/bundle/_internal/gnost/analysis/utils/analyze.py +132 -0
  108. package/bundle/_internal/gnost/analysis/utils/df_handling.py +215 -0
  109. package/bundle/_internal/gnost/analysis/utils/duplicate_code.py +42 -0
  110. package/bundle/_internal/gnost/analysis/utils/extract.py +172 -0
  111. package/bundle/_internal/gnost/analysis/utils/mi.py +130 -0
  112. package/bundle/_internal/gnost/analysis/utils/tool_command.py +63 -0
  113. package/bundle/_internal/gnost/cli/__init__.py +3 -0
  114. package/bundle/_internal/gnost/cli/app.py +696 -0
  115. package/bundle/_internal/gnost/cli/commands/__init__.py +3 -0
  116. package/bundle/_internal/gnost/cli/commands/analysis.py +190 -0
  117. package/bundle/_internal/gnost/cli/commands/onboard.py +507 -0
  118. package/bundle/_internal/gnost/cli/commands/show.py +70 -0
  119. package/bundle/_internal/gnost/config/__init__.py +0 -0
  120. package/bundle/_internal/gnost/config/languages.py +10 -0
  121. package/bundle/_internal/gnost/config/settings.py +240 -0
  122. package/bundle/_internal/gnost/core/__init__.py +0 -0
  123. package/bundle/_internal/gnost/core/callgraph.py +399 -0
  124. package/bundle/_internal/gnost/core/caution.py +315 -0
  125. package/bundle/_internal/gnost/core/cycles.py +148 -0
  126. package/bundle/_internal/gnost/core/flow.py +204 -0
  127. package/bundle/_internal/gnost/core/graph.py +108 -0
  128. package/bundle/_internal/gnost/core/insight_builder.py +164 -0
  129. package/bundle/_internal/gnost/core/ranker.py +119 -0
  130. package/bundle/_internal/gnost/core/resolver.py +304 -0
  131. package/bundle/_internal/gnost/languages/base.py +108 -0
  132. package/bundle/_internal/gnost/languages/java.py +104 -0
  133. package/bundle/_internal/gnost/languages/javascript.py +153 -0
  134. package/bundle/_internal/gnost/languages/manifests.py +45 -0
  135. package/bundle/_internal/gnost/languages/python.py +318 -0
  136. package/bundle/_internal/gnost/languages/typescript.py +6 -0
  137. package/bundle/_internal/gnost/models/__init__.py +0 -0
  138. package/bundle/_internal/gnost/models/insights.py +68 -0
  139. package/bundle/_internal/gnost/reporters/__init__.py +3 -0
  140. package/bundle/_internal/gnost/reporters/analysis_html.py +1292 -0
  141. package/bundle/_internal/gnost/reporters/diagram_viewer.py +153 -0
  142. package/bundle/_internal/gnost/reporters/files.py +18 -0
  143. package/bundle/_internal/gnost/reporters/folders.py +18 -0
  144. package/bundle/_internal/gnost/reporters/insights_json.py +189 -0
  145. package/bundle/_internal/gnost/reporters/loc_summary.py +19 -0
  146. package/bundle/_internal/gnost/reporters/markdown.py +372 -0
  147. package/bundle/_internal/gnost/reporters/mermaid.py +543 -0
  148. package/bundle/_internal/gnost/reporters/mermaid_graph.py +309 -0
  149. package/bundle/_internal/gnost/reporters/readme.py +81 -0
  150. package/bundle/_internal/gnost/reporters/stats.py +13 -0
  151. package/bundle/_internal/gnost/reporters/summary.py +223 -0
  152. package/bundle/_internal/gnost/reporters/templates/analyzer_guides.json +247 -0
  153. package/bundle/_internal/gnost/reporters/templates/analyzer_guides_layout.html +9 -0
  154. package/bundle/_internal/gnost/reporters/templates/graph_viewer.html +427 -0
  155. package/bundle/_internal/gnost/reporters/vendor/THIRD_PARTY_NOTICES.md +205 -0
  156. package/bundle/_internal/gnost/reporters/vendor/cose-base.js +3214 -0
  157. package/bundle/_internal/gnost/reporters/vendor/cytoscape-fcose.js +1549 -0
  158. package/bundle/_internal/gnost/reporters/vendor/cytoscape.min.js +32 -0
  159. package/bundle/_internal/gnost/reporters/vendor/layout-base.js +5230 -0
  160. package/bundle/_internal/gnost/reporters/vendor/marked.min.js +6 -0
  161. package/bundle/_internal/gnost/reporters/vendor/mermaid.min.js +2314 -0
  162. package/bundle/_internal/gnost/reporters/vendor/svg-pan-zoom.min.js +3 -0
  163. package/bundle/_internal/gnost/reporters/vendor/vendor.json +44 -0
  164. package/bundle/_internal/gnost/routes/__init__.py +45 -0
  165. package/bundle/_internal/gnost/routes/java.py +72 -0
  166. package/bundle/_internal/gnost/routes/javascript.py +275 -0
  167. package/bundle/_internal/gnost/routes/models.py +58 -0
  168. package/bundle/_internal/gnost/routes/python.py +429 -0
  169. package/bundle/_internal/gnost/scanner/__init__.py +4 -0
  170. package/bundle/_internal/gnost/scanner/classify.py +13 -0
  171. package/bundle/_internal/gnost/scanner/engine.py +169 -0
  172. package/bundle/_internal/gnost/scanner/filters.py +196 -0
  173. package/bundle/_internal/gnost/scanner/loc.py +93 -0
  174. package/bundle/_internal/gnost/scanner/models.py +27 -0
  175. package/bundle/_internal/gnost/schemas/insights.schema.json +517 -0
  176. package/bundle/_internal/gnost/utils/__init__.py +0 -0
  177. package/bundle/_internal/gnost/utils/logger.py +85 -0
  178. package/bundle/_internal/gnost/utils/paths.py +29 -0
  179. package/bundle/_internal/gnost/utils/printer.py +46 -0
  180. package/bundle/_internal/gnost/utils/progress.py +20 -0
  181. package/bundle/_internal/gnost-0.5.1rc1.dist-info/INSTALLER +1 -0
  182. package/bundle/_internal/gnost-0.5.1rc1.dist-info/METADATA +130 -0
  183. package/bundle/_internal/gnost-0.5.1rc1.dist-info/RECORD +178 -0
  184. package/bundle/_internal/gnost-0.5.1rc1.dist-info/REQUESTED +0 -0
  185. package/bundle/_internal/gnost-0.5.1rc1.dist-info/WHEEL +5 -0
  186. package/bundle/_internal/gnost-0.5.1rc1.dist-info/direct_url.json +1 -0
  187. package/bundle/_internal/gnost-0.5.1rc1.dist-info/entry_points.txt +2 -0
  188. package/bundle/_internal/gnost-0.5.1rc1.dist-info/licenses/LICENSE +21 -0
  189. package/bundle/_internal/gnost-0.5.1rc1.dist-info/top_level.txt +1 -0
  190. package/bundle/_internal/libcrypto.3.dylib +0 -0
  191. package/bundle/_internal/libncurses.6.dylib +0 -0
  192. package/bundle/_internal/librt/base64.cpython-312-darwin.so +0 -0
  193. package/bundle/_internal/librt/internal.cpython-312-darwin.so +0 -0
  194. package/bundle/_internal/libssl.3.dylib +0 -0
  195. package/bundle/_internal/mypy/__init__.cpython-312-darwin.so +0 -0
  196. package/bundle/_internal/mypy/__init__.py +1 -0
  197. package/bundle/_internal/mypy/__main__.py +52 -0
  198. package/bundle/_internal/mypy/api.cpython-312-darwin.so +0 -0
  199. package/bundle/_internal/mypy/api.py +95 -0
  200. package/bundle/_internal/mypy/applytype.cpython-312-darwin.so +0 -0
  201. package/bundle/_internal/mypy/applytype.py +317 -0
  202. package/bundle/_internal/mypy/argmap.cpython-312-darwin.so +0 -0
  203. package/bundle/_internal/mypy/argmap.py +269 -0
  204. package/bundle/_internal/mypy/binder.cpython-312-darwin.so +0 -0
  205. package/bundle/_internal/mypy/binder.py +710 -0
  206. package/bundle/_internal/mypy/bogus_type.py +27 -0
  207. package/bundle/_internal/mypy/build.cpython-312-darwin.so +0 -0
  208. package/bundle/_internal/mypy/build.py +5533 -0
  209. package/bundle/_internal/mypy/build_worker/__init__.cpython-312-darwin.so +0 -0
  210. package/bundle/_internal/mypy/build_worker/__init__.py +0 -0
  211. package/bundle/_internal/mypy/build_worker/__main__.py +6 -0
  212. package/bundle/_internal/mypy/build_worker/worker.cpython-312-darwin.so +0 -0
  213. package/bundle/_internal/mypy/build_worker/worker.py +379 -0
  214. package/bundle/_internal/mypy/cache.cpython-312-darwin.so +0 -0
  215. package/bundle/_internal/mypy/cache.py +626 -0
  216. package/bundle/_internal/mypy/checker.cpython-312-darwin.so +0 -0
  217. package/bundle/_internal/mypy/checker.py +10110 -0
  218. package/bundle/_internal/mypy/checker_shared.cpython-312-darwin.so +0 -0
  219. package/bundle/_internal/mypy/checker_shared.py +377 -0
  220. package/bundle/_internal/mypy/checker_state.cpython-312-darwin.so +0 -0
  221. package/bundle/_internal/mypy/checker_state.py +30 -0
  222. package/bundle/_internal/mypy/checkexpr.cpython-312-darwin.so +0 -0
  223. package/bundle/_internal/mypy/checkexpr.py +7018 -0
  224. package/bundle/_internal/mypy/checkmember.cpython-312-darwin.so +0 -0
  225. package/bundle/_internal/mypy/checkmember.py +1593 -0
  226. package/bundle/_internal/mypy/checkpattern.cpython-312-darwin.so +0 -0
  227. package/bundle/_internal/mypy/checkpattern.py +883 -0
  228. package/bundle/_internal/mypy/checkstrformat.cpython-312-darwin.so +0 -0
  229. package/bundle/_internal/mypy/checkstrformat.py +1103 -0
  230. package/bundle/_internal/mypy/config_parser.cpython-312-darwin.so +0 -0
  231. package/bundle/_internal/mypy/config_parser.py +749 -0
  232. package/bundle/_internal/mypy/constant_fold.cpython-312-darwin.so +0 -0
  233. package/bundle/_internal/mypy/constant_fold.py +187 -0
  234. package/bundle/_internal/mypy/constraints.cpython-312-darwin.so +0 -0
  235. package/bundle/_internal/mypy/constraints.py +1748 -0
  236. package/bundle/_internal/mypy/copytype.cpython-312-darwin.so +0 -0
  237. package/bundle/_internal/mypy/copytype.py +137 -0
  238. package/bundle/_internal/mypy/defaults.cpython-312-darwin.so +0 -0
  239. package/bundle/_internal/mypy/defaults.py +67 -0
  240. package/bundle/_internal/mypy/dmypy/__init__.cpython-312-darwin.so +0 -0
  241. package/bundle/_internal/mypy/dmypy/__init__.py +0 -0
  242. package/bundle/_internal/mypy/dmypy/__main__.py +6 -0
  243. package/bundle/_internal/mypy/dmypy/client.cpython-312-darwin.so +0 -0
  244. package/bundle/_internal/mypy/dmypy/client.py +732 -0
  245. package/bundle/_internal/mypy/dmypy_os.cpython-312-darwin.so +0 -0
  246. package/bundle/_internal/mypy/dmypy_os.py +43 -0
  247. package/bundle/_internal/mypy/dmypy_server.cpython-312-darwin.so +0 -0
  248. package/bundle/_internal/mypy/dmypy_server.py +1132 -0
  249. package/bundle/_internal/mypy/dmypy_util.cpython-312-darwin.so +0 -0
  250. package/bundle/_internal/mypy/dmypy_util.py +117 -0
  251. package/bundle/_internal/mypy/erasetype.cpython-312-darwin.so +0 -0
  252. package/bundle/_internal/mypy/erasetype.py +301 -0
  253. package/bundle/_internal/mypy/error_formatter.cpython-312-darwin.so +0 -0
  254. package/bundle/_internal/mypy/error_formatter.py +39 -0
  255. package/bundle/_internal/mypy/errorcodes.cpython-312-darwin.so +0 -0
  256. package/bundle/_internal/mypy/errorcodes.py +340 -0
  257. package/bundle/_internal/mypy/errors.cpython-312-darwin.so +0 -0
  258. package/bundle/_internal/mypy/errors.py +1468 -0
  259. package/bundle/_internal/mypy/evalexpr.cpython-312-darwin.so +0 -0
  260. package/bundle/_internal/mypy/evalexpr.py +211 -0
  261. package/bundle/_internal/mypy/expandtype.cpython-312-darwin.so +0 -0
  262. package/bundle/_internal/mypy/expandtype.py +662 -0
  263. package/bundle/_internal/mypy/exportjson.py +616 -0
  264. package/bundle/_internal/mypy/exprtotype.cpython-312-darwin.so +0 -0
  265. package/bundle/_internal/mypy/exprtotype.py +285 -0
  266. package/bundle/_internal/mypy/fastparse.cpython-312-darwin.so +0 -0
  267. package/bundle/_internal/mypy/fastparse.py +2267 -0
  268. package/bundle/_internal/mypy/find_sources.cpython-312-darwin.so +0 -0
  269. package/bundle/_internal/mypy/find_sources.py +257 -0
  270. package/bundle/_internal/mypy/fixup.cpython-312-darwin.so +0 -0
  271. package/bundle/_internal/mypy/fixup.py +438 -0
  272. package/bundle/_internal/mypy/freetree.cpython-312-darwin.so +0 -0
  273. package/bundle/_internal/mypy/freetree.py +23 -0
  274. package/bundle/_internal/mypy/fscache.cpython-312-darwin.so +0 -0
  275. package/bundle/_internal/mypy/fscache.py +312 -0
  276. package/bundle/_internal/mypy/fswatcher.cpython-312-darwin.so +0 -0
  277. package/bundle/_internal/mypy/fswatcher.py +106 -0
  278. package/bundle/_internal/mypy/gclogger.cpython-312-darwin.so +0 -0
  279. package/bundle/_internal/mypy/gclogger.py +48 -0
  280. package/bundle/_internal/mypy/git.cpython-312-darwin.so +0 -0
  281. package/bundle/_internal/mypy/git.py +69 -0
  282. package/bundle/_internal/mypy/graph_utils.cpython-312-darwin.so +0 -0
  283. package/bundle/_internal/mypy/graph_utils.py +161 -0
  284. package/bundle/_internal/mypy/indirection.cpython-312-darwin.so +0 -0
  285. package/bundle/_internal/mypy/indirection.py +176 -0
  286. package/bundle/_internal/mypy/infer.cpython-312-darwin.so +0 -0
  287. package/bundle/_internal/mypy/infer.py +80 -0
  288. package/bundle/_internal/mypy/inspections.cpython-312-darwin.so +0 -0
  289. package/bundle/_internal/mypy/inspections.py +626 -0
  290. package/bundle/_internal/mypy/ipc.cpython-312-darwin.so +0 -0
  291. package/bundle/_internal/mypy/ipc.py +508 -0
  292. package/bundle/_internal/mypy/join.cpython-312-darwin.so +0 -0
  293. package/bundle/_internal/mypy/join.py +962 -0
  294. package/bundle/_internal/mypy/known_modules.cpython-312-darwin.so +0 -0
  295. package/bundle/_internal/mypy/known_modules.py +174 -0
  296. package/bundle/_internal/mypy/literals.cpython-312-darwin.so +0 -0
  297. package/bundle/_internal/mypy/literals.py +327 -0
  298. package/bundle/_internal/mypy/lookup.cpython-312-darwin.so +0 -0
  299. package/bundle/_internal/mypy/lookup.py +80 -0
  300. package/bundle/_internal/mypy/main.cpython-312-darwin.so +0 -0
  301. package/bundle/_internal/mypy/main.py +1793 -0
  302. package/bundle/_internal/mypy/maptype.cpython-312-darwin.so +0 -0
  303. package/bundle/_internal/mypy/maptype.py +109 -0
  304. package/bundle/_internal/mypy/meet.cpython-312-darwin.so +0 -0
  305. package/bundle/_internal/mypy/meet.py +1371 -0
  306. package/bundle/_internal/mypy/memprofile.cpython-312-darwin.so +0 -0
  307. package/bundle/_internal/mypy/memprofile.py +122 -0
  308. package/bundle/_internal/mypy/message_registry.cpython-312-darwin.so +0 -0
  309. package/bundle/_internal/mypy/message_registry.py +378 -0
  310. package/bundle/_internal/mypy/messages.cpython-312-darwin.so +0 -0
  311. package/bundle/_internal/mypy/messages.py +3535 -0
  312. package/bundle/_internal/mypy/metastore.cpython-312-darwin.so +0 -0
  313. package/bundle/_internal/mypy/metastore.py +278 -0
  314. package/bundle/_internal/mypy/mixedtraverser.cpython-312-darwin.so +0 -0
  315. package/bundle/_internal/mypy/mixedtraverser.py +147 -0
  316. package/bundle/_internal/mypy/modulefinder.cpython-312-darwin.so +0 -0
  317. package/bundle/_internal/mypy/modulefinder.py +1008 -0
  318. package/bundle/_internal/mypy/moduleinspect.cpython-312-darwin.so +0 -0
  319. package/bundle/_internal/mypy/moduleinspect.py +184 -0
  320. package/bundle/_internal/mypy/modules_state.cpython-312-darwin.so +0 -0
  321. package/bundle/_internal/mypy/modules_state.py +20 -0
  322. package/bundle/_internal/mypy/mro.cpython-312-darwin.so +0 -0
  323. package/bundle/_internal/mypy/mro.py +62 -0
  324. package/bundle/_internal/mypy/nativeparse.cpython-312-darwin.so +0 -0
  325. package/bundle/_internal/mypy/nativeparse.py +2199 -0
  326. package/bundle/_internal/mypy/nodes.cpython-312-darwin.so +0 -0
  327. package/bundle/_internal/mypy/nodes.py +5608 -0
  328. package/bundle/_internal/mypy/operators.cpython-312-darwin.so +0 -0
  329. package/bundle/_internal/mypy/operators.py +126 -0
  330. package/bundle/_internal/mypy/options.cpython-312-darwin.so +0 -0
  331. package/bundle/_internal/mypy/options.py +678 -0
  332. package/bundle/_internal/mypy/parse.cpython-312-darwin.so +0 -0
  333. package/bundle/_internal/mypy/parse.py +135 -0
  334. package/bundle/_internal/mypy/partially_defined.cpython-312-darwin.so +0 -0
  335. package/bundle/_internal/mypy/partially_defined.py +703 -0
  336. package/bundle/_internal/mypy/patterns.cpython-312-darwin.so +0 -0
  337. package/bundle/_internal/mypy/patterns.py +162 -0
  338. package/bundle/_internal/mypy/plugin.cpython-312-darwin.so +0 -0
  339. package/bundle/_internal/mypy/plugin.py +945 -0
  340. package/bundle/_internal/mypy/plugins/__init__.py +0 -0
  341. package/bundle/_internal/mypy/plugins/attrs.cpython-312-darwin.so +0 -0
  342. package/bundle/_internal/mypy/plugins/attrs.py +1179 -0
  343. package/bundle/_internal/mypy/plugins/common.cpython-312-darwin.so +0 -0
  344. package/bundle/_internal/mypy/plugins/common.py +441 -0
  345. package/bundle/_internal/mypy/plugins/constants.cpython-312-darwin.so +0 -0
  346. package/bundle/_internal/mypy/plugins/constants.py +20 -0
  347. package/bundle/_internal/mypy/plugins/ctypes.cpython-312-darwin.so +0 -0
  348. package/bundle/_internal/mypy/plugins/ctypes.py +245 -0
  349. package/bundle/_internal/mypy/plugins/dataclasses.cpython-312-darwin.so +0 -0
  350. package/bundle/_internal/mypy/plugins/dataclasses.py +1135 -0
  351. package/bundle/_internal/mypy/plugins/default.cpython-312-darwin.so +0 -0
  352. package/bundle/_internal/mypy/plugins/default.py +612 -0
  353. package/bundle/_internal/mypy/plugins/enums.cpython-312-darwin.so +0 -0
  354. package/bundle/_internal/mypy/plugins/enums.py +299 -0
  355. package/bundle/_internal/mypy/plugins/functools.cpython-312-darwin.so +0 -0
  356. package/bundle/_internal/mypy/plugins/functools.py +399 -0
  357. package/bundle/_internal/mypy/plugins/proper_plugin.cpython-312-darwin.so +0 -0
  358. package/bundle/_internal/mypy/plugins/proper_plugin.py +178 -0
  359. package/bundle/_internal/mypy/plugins/singledispatch.cpython-312-darwin.so +0 -0
  360. package/bundle/_internal/mypy/plugins/singledispatch.py +212 -0
  361. package/bundle/_internal/mypy/py.typed +1 -0
  362. package/bundle/_internal/mypy/pyinfo.py +79 -0
  363. package/bundle/_internal/mypy/reachability.cpython-312-darwin.so +0 -0
  364. package/bundle/_internal/mypy/reachability.py +388 -0
  365. package/bundle/_internal/mypy/refinfo.cpython-312-darwin.so +0 -0
  366. package/bundle/_internal/mypy/refinfo.py +92 -0
  367. package/bundle/_internal/mypy/renaming.cpython-312-darwin.so +0 -0
  368. package/bundle/_internal/mypy/renaming.py +583 -0
  369. package/bundle/_internal/mypy/report.cpython-312-darwin.so +0 -0
  370. package/bundle/_internal/mypy/report.py +930 -0
  371. package/bundle/_internal/mypy/scope.cpython-312-darwin.so +0 -0
  372. package/bundle/_internal/mypy/scope.py +125 -0
  373. package/bundle/_internal/mypy/semanal.cpython-312-darwin.so +0 -0
  374. package/bundle/_internal/mypy/semanal.py +8674 -0
  375. package/bundle/_internal/mypy/semanal_classprop.cpython-312-darwin.so +0 -0
  376. package/bundle/_internal/mypy/semanal_classprop.py +188 -0
  377. package/bundle/_internal/mypy/semanal_enum.cpython-312-darwin.so +0 -0
  378. package/bundle/_internal/mypy/semanal_enum.py +259 -0
  379. package/bundle/_internal/mypy/semanal_infer.cpython-312-darwin.so +0 -0
  380. package/bundle/_internal/mypy/semanal_infer.py +135 -0
  381. package/bundle/_internal/mypy/semanal_main.cpython-312-darwin.so +0 -0
  382. package/bundle/_internal/mypy/semanal_main.py +542 -0
  383. package/bundle/_internal/mypy/semanal_namedtuple.cpython-312-darwin.so +0 -0
  384. package/bundle/_internal/mypy/semanal_namedtuple.py +679 -0
  385. package/bundle/_internal/mypy/semanal_newtype.cpython-312-darwin.so +0 -0
  386. package/bundle/_internal/mypy/semanal_newtype.py +272 -0
  387. package/bundle/_internal/mypy/semanal_pass1.cpython-312-darwin.so +0 -0
  388. package/bundle/_internal/mypy/semanal_pass1.py +159 -0
  389. package/bundle/_internal/mypy/semanal_shared.cpython-312-darwin.so +0 -0
  390. package/bundle/_internal/mypy/semanal_shared.py +499 -0
  391. package/bundle/_internal/mypy/semanal_typeargs.cpython-312-darwin.so +0 -0
  392. package/bundle/_internal/mypy/semanal_typeargs.py +309 -0
  393. package/bundle/_internal/mypy/semanal_typeddict.cpython-312-darwin.so +0 -0
  394. package/bundle/_internal/mypy/semanal_typeddict.py +826 -0
  395. package/bundle/_internal/mypy/server/__init__.py +0 -0
  396. package/bundle/_internal/mypy/server/astdiff.cpython-312-darwin.so +0 -0
  397. package/bundle/_internal/mypy/server/astdiff.py +552 -0
  398. package/bundle/_internal/mypy/server/astmerge.cpython-312-darwin.so +0 -0
  399. package/bundle/_internal/mypy/server/astmerge.py +583 -0
  400. package/bundle/_internal/mypy/server/aststrip.cpython-312-darwin.so +0 -0
  401. package/bundle/_internal/mypy/server/aststrip.py +255 -0
  402. package/bundle/_internal/mypy/server/deps.cpython-312-darwin.so +0 -0
  403. package/bundle/_internal/mypy/server/deps.py +1153 -0
  404. package/bundle/_internal/mypy/server/mergecheck.cpython-312-darwin.so +0 -0
  405. package/bundle/_internal/mypy/server/mergecheck.py +84 -0
  406. package/bundle/_internal/mypy/server/objgraph.cpython-312-darwin.so +0 -0
  407. package/bundle/_internal/mypy/server/objgraph.py +101 -0
  408. package/bundle/_internal/mypy/server/subexpr.cpython-312-darwin.so +0 -0
  409. package/bundle/_internal/mypy/server/subexpr.py +208 -0
  410. package/bundle/_internal/mypy/server/target.cpython-312-darwin.so +0 -0
  411. package/bundle/_internal/mypy/server/target.py +11 -0
  412. package/bundle/_internal/mypy/server/trigger.cpython-312-darwin.so +0 -0
  413. package/bundle/_internal/mypy/server/trigger.py +26 -0
  414. package/bundle/_internal/mypy/server/update.cpython-312-darwin.so +0 -0
  415. package/bundle/_internal/mypy/server/update.py +1372 -0
  416. package/bundle/_internal/mypy/sharedparse.cpython-312-darwin.so +0 -0
  417. package/bundle/_internal/mypy/sharedparse.py +114 -0
  418. package/bundle/_internal/mypy/solve.cpython-312-darwin.so +0 -0
  419. package/bundle/_internal/mypy/solve.py +602 -0
  420. package/bundle/_internal/mypy/split_namespace.py +35 -0
  421. package/bundle/_internal/mypy/state.cpython-312-darwin.so +0 -0
  422. package/bundle/_internal/mypy/state.py +29 -0
  423. package/bundle/_internal/mypy/stats.cpython-312-darwin.so +0 -0
  424. package/bundle/_internal/mypy/stats.py +494 -0
  425. package/bundle/_internal/mypy/strconv.cpython-312-darwin.so +0 -0
  426. package/bundle/_internal/mypy/strconv.py +707 -0
  427. package/bundle/_internal/mypy/stubdoc.py +545 -0
  428. package/bundle/_internal/mypy/stubgen.cpython-312-darwin.so +0 -0
  429. package/bundle/_internal/mypy/stubgen.py +2064 -0
  430. package/bundle/_internal/mypy/stubgenc.py +1046 -0
  431. package/bundle/_internal/mypy/stubinfo.cpython-312-darwin.so +0 -0
  432. package/bundle/_internal/mypy/stubinfo.py +321 -0
  433. package/bundle/_internal/mypy/stubtest.py +2676 -0
  434. package/bundle/_internal/mypy/stubutil.cpython-312-darwin.so +0 -0
  435. package/bundle/_internal/mypy/stubutil.py +895 -0
  436. package/bundle/_internal/mypy/subtypes.cpython-312-darwin.so +0 -0
  437. package/bundle/_internal/mypy/subtypes.py +2572 -0
  438. package/bundle/_internal/mypy/suggestions.cpython-312-darwin.so +0 -0
  439. package/bundle/_internal/mypy/suggestions.py +1068 -0
  440. package/bundle/_internal/mypy/test/__init__.py +0 -0
  441. package/bundle/_internal/mypy/test/config.py +31 -0
  442. package/bundle/_internal/mypy/test/data.py +864 -0
  443. package/bundle/_internal/mypy/test/helpers.py +546 -0
  444. package/bundle/_internal/mypy/test/meta/__init__.py +0 -0
  445. package/bundle/_internal/mypy/test/meta/_pytest.py +72 -0
  446. package/bundle/_internal/mypy/test/meta/test_diff_helper.py +47 -0
  447. package/bundle/_internal/mypy/test/meta/test_parse_data.py +69 -0
  448. package/bundle/_internal/mypy/test/meta/test_update_data.py +131 -0
  449. package/bundle/_internal/mypy/test/test_config_parser.py +130 -0
  450. package/bundle/_internal/mypy/test/test_diff_cache.py +209 -0
  451. package/bundle/_internal/mypy/test/test_find_sources.py +376 -0
  452. package/bundle/_internal/mypy/test/test_nativeparse.py +306 -0
  453. package/bundle/_internal/mypy/test/test_ref_info.py +46 -0
  454. package/bundle/_internal/mypy/test/testapi.py +45 -0
  455. package/bundle/_internal/mypy/test/testargs.py +202 -0
  456. package/bundle/_internal/mypy/test/testcheck.py +360 -0
  457. package/bundle/_internal/mypy/test/testcmdline.py +162 -0
  458. package/bundle/_internal/mypy/test/testconstraints.py +134 -0
  459. package/bundle/_internal/mypy/test/testdaemon.py +132 -0
  460. package/bundle/_internal/mypy/test/testdeps.py +85 -0
  461. package/bundle/_internal/mypy/test/testdiff.py +70 -0
  462. package/bundle/_internal/mypy/test/testerrorstream.py +46 -0
  463. package/bundle/_internal/mypy/test/testexportjson.py +104 -0
  464. package/bundle/_internal/mypy/test/testfinegrained.py +453 -0
  465. package/bundle/_internal/mypy/test/testfinegrainedcache.py +18 -0
  466. package/bundle/_internal/mypy/test/testformatter.py +85 -0
  467. package/bundle/_internal/mypy/test/testfscache.py +100 -0
  468. package/bundle/_internal/mypy/test/testgraph.py +138 -0
  469. package/bundle/_internal/mypy/test/testinfer.py +373 -0
  470. package/bundle/_internal/mypy/test/testipc.py +154 -0
  471. package/bundle/_internal/mypy/test/testmerge.py +235 -0
  472. package/bundle/_internal/mypy/test/testmodulefinder.py +284 -0
  473. package/bundle/_internal/mypy/test/testmypyc.py +26 -0
  474. package/bundle/_internal/mypy/test/testoutput.py +64 -0
  475. package/bundle/_internal/mypy/test/testparse.py +131 -0
  476. package/bundle/_internal/mypy/test/testpep561.py +174 -0
  477. package/bundle/_internal/mypy/test/testpythoneval.py +116 -0
  478. package/bundle/_internal/mypy/test/testreports.py +59 -0
  479. package/bundle/_internal/mypy/test/testsemanal.py +219 -0
  480. package/bundle/_internal/mypy/test/testsolve.py +287 -0
  481. package/bundle/_internal/mypy/test/teststubgen.py +1650 -0
  482. package/bundle/_internal/mypy/test/teststubinfo.py +24 -0
  483. package/bundle/_internal/mypy/test/teststubtest.py +3417 -0
  484. package/bundle/_internal/mypy/test/testsubtypes.py +306 -0
  485. package/bundle/_internal/mypy/test/testtransform.py +64 -0
  486. package/bundle/_internal/mypy/test/testtypegen.py +83 -0
  487. package/bundle/_internal/mypy/test/testtypes.py +1666 -0
  488. package/bundle/_internal/mypy/test/testutil.py +111 -0
  489. package/bundle/_internal/mypy/test/typefixture.py +419 -0
  490. package/bundle/_internal/mypy/test/update_data.py +87 -0
  491. package/bundle/_internal/mypy/test/visitors.cpython-312-darwin.so +0 -0
  492. package/bundle/_internal/mypy/test/visitors.py +77 -0
  493. package/bundle/_internal/mypy/traverser.cpython-312-darwin.so +0 -0
  494. package/bundle/_internal/mypy/traverser.py +1106 -0
  495. package/bundle/_internal/mypy/treetransform.cpython-312-darwin.so +0 -0
  496. package/bundle/_internal/mypy/treetransform.py +820 -0
  497. package/bundle/_internal/mypy/tvar_scope.cpython-312-darwin.so +0 -0
  498. package/bundle/_internal/mypy/tvar_scope.py +154 -0
  499. package/bundle/_internal/mypy/type_visitor.cpython-312-darwin.so +0 -0
  500. package/bundle/_internal/mypy/type_visitor.py +630 -0
  501. package/bundle/_internal/mypy/typeanal.cpython-312-darwin.so +0 -0
  502. package/bundle/_internal/mypy/typeanal.py +2961 -0
  503. package/bundle/_internal/mypy/typeops.cpython-312-darwin.so +0 -0
  504. package/bundle/_internal/mypy/typeops.py +1355 -0
  505. package/bundle/_internal/mypy/types.cpython-312-darwin.so +0 -0
  506. package/bundle/_internal/mypy/types.py +4639 -0
  507. package/bundle/_internal/mypy/types_utils.cpython-312-darwin.so +0 -0
  508. package/bundle/_internal/mypy/types_utils.py +183 -0
  509. package/bundle/_internal/mypy/typeshed/LICENSE +237 -0
  510. package/bundle/_internal/mypy/typeshed/stdlib/VERSIONS +349 -0
  511. package/bundle/_internal/mypy/typeshed/stdlib/__future__.pyi +36 -0
  512. package/bundle/_internal/mypy/typeshed/stdlib/__main__.pyi +1 -0
  513. package/bundle/_internal/mypy/typeshed/stdlib/_ast.pyi +141 -0
  514. package/bundle/_internal/mypy/typeshed/stdlib/_asyncio.pyi +114 -0
  515. package/bundle/_internal/mypy/typeshed/stdlib/_bisect.pyi +103 -0
  516. package/bundle/_internal/mypy/typeshed/stdlib/_blake2.pyi +119 -0
  517. package/bundle/_internal/mypy/typeshed/stdlib/_bz2.pyi +24 -0
  518. package/bundle/_internal/mypy/typeshed/stdlib/_codecs.pyi +125 -0
  519. package/bundle/_internal/mypy/typeshed/stdlib/_collections_abc.pyi +105 -0
  520. package/bundle/_internal/mypy/typeshed/stdlib/_compat_pickle.pyi +10 -0
  521. package/bundle/_internal/mypy/typeshed/stdlib/_compression.pyi +39 -0
  522. package/bundle/_internal/mypy/typeshed/stdlib/_contextvars.pyi +69 -0
  523. package/bundle/_internal/mypy/typeshed/stdlib/_csv.pyi +116 -0
  524. package/bundle/_internal/mypy/typeshed/stdlib/_ctypes.pyi +375 -0
  525. package/bundle/_internal/mypy/typeshed/stdlib/_curses.pyi +583 -0
  526. package/bundle/_internal/mypy/typeshed/stdlib/_curses_panel.pyi +27 -0
  527. package/bundle/_internal/mypy/typeshed/stdlib/_dbm.pyi +46 -0
  528. package/bundle/_internal/mypy/typeshed/stdlib/_decimal.pyi +73 -0
  529. package/bundle/_internal/mypy/typeshed/stdlib/_frozen_importlib.pyi +121 -0
  530. package/bundle/_internal/mypy/typeshed/stdlib/_frozen_importlib_external.pyi +218 -0
  531. package/bundle/_internal/mypy/typeshed/stdlib/_gdbm.pyi +50 -0
  532. package/bundle/_internal/mypy/typeshed/stdlib/_hashlib.pyi +127 -0
  533. package/bundle/_internal/mypy/typeshed/stdlib/_heapq.pyi +18 -0
  534. package/bundle/_internal/mypy/typeshed/stdlib/_imp.pyi +30 -0
  535. package/bundle/_internal/mypy/typeshed/stdlib/_interpchannels.pyi +86 -0
  536. package/bundle/_internal/mypy/typeshed/stdlib/_interpqueues.pyi +31 -0
  537. package/bundle/_internal/mypy/typeshed/stdlib/_interpreters.pyi +68 -0
  538. package/bundle/_internal/mypy/typeshed/stdlib/_io.pyi +330 -0
  539. package/bundle/_internal/mypy/typeshed/stdlib/_json.pyi +59 -0
  540. package/bundle/_internal/mypy/typeshed/stdlib/_locale.pyi +121 -0
  541. package/bundle/_internal/mypy/typeshed/stdlib/_lsprof.pyi +34 -0
  542. package/bundle/_internal/mypy/typeshed/stdlib/_lzma.pyi +71 -0
  543. package/bundle/_internal/mypy/typeshed/stdlib/_markupbase.pyi +10 -0
  544. package/bundle/_internal/mypy/typeshed/stdlib/_msi.pyi +97 -0
  545. package/bundle/_internal/mypy/typeshed/stdlib/_multibytecodec.pyi +49 -0
  546. package/bundle/_internal/mypy/typeshed/stdlib/_operator.pyi +130 -0
  547. package/bundle/_internal/mypy/typeshed/stdlib/_osx_support.pyi +34 -0
  548. package/bundle/_internal/mypy/typeshed/stdlib/_pickle.pyi +114 -0
  549. package/bundle/_internal/mypy/typeshed/stdlib/_posixsubprocess.pyi +59 -0
  550. package/bundle/_internal/mypy/typeshed/stdlib/_py_abc.pyi +14 -0
  551. package/bundle/_internal/mypy/typeshed/stdlib/_pydecimal.pyi +50 -0
  552. package/bundle/_internal/mypy/typeshed/stdlib/_queue.pyi +18 -0
  553. package/bundle/_internal/mypy/typeshed/stdlib/_random.pyi +14 -0
  554. package/bundle/_internal/mypy/typeshed/stdlib/_remote_debugging.pyi +186 -0
  555. package/bundle/_internal/mypy/typeshed/stdlib/_sitebuiltins.pyi +18 -0
  556. package/bundle/_internal/mypy/typeshed/stdlib/_socket.pyi +966 -0
  557. package/bundle/_internal/mypy/typeshed/stdlib/_sqlite3.pyi +311 -0
  558. package/bundle/_internal/mypy/typeshed/stdlib/_ssl.pyi +303 -0
  559. package/bundle/_internal/mypy/typeshed/stdlib/_stat.pyi +119 -0
  560. package/bundle/_internal/mypy/typeshed/stdlib/_struct.pyi +24 -0
  561. package/bundle/_internal/mypy/typeshed/stdlib/_thread.pyi +125 -0
  562. package/bundle/_internal/mypy/typeshed/stdlib/_threading_local.pyi +24 -0
  563. package/bundle/_internal/mypy/typeshed/stdlib/_tkinter.pyi +156 -0
  564. package/bundle/_internal/mypy/typeshed/stdlib/_tracemalloc.pyi +13 -0
  565. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/README.md +34 -0
  566. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/__init__.pyi +415 -0
  567. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/_type_checker_internals.pyi +102 -0
  568. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/dbapi.pyi +36 -0
  569. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/importlib.pyi +18 -0
  570. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/wsgi.pyi +43 -0
  571. package/bundle/_internal/mypy/typeshed/stdlib/_typeshed/xml.pyi +9 -0
  572. package/bundle/_internal/mypy/typeshed/stdlib/_warnings.pyi +54 -0
  573. package/bundle/_internal/mypy/typeshed/stdlib/_weakref.pyi +15 -0
  574. package/bundle/_internal/mypy/typeshed/stdlib/_weakrefset.pyi +49 -0
  575. package/bundle/_internal/mypy/typeshed/stdlib/_winapi.pyi +319 -0
  576. package/bundle/_internal/mypy/typeshed/stdlib/_zstd.pyi +102 -0
  577. package/bundle/_internal/mypy/typeshed/stdlib/abc.pyi +50 -0
  578. package/bundle/_internal/mypy/typeshed/stdlib/aifc.pyi +79 -0
  579. package/bundle/_internal/mypy/typeshed/stdlib/annotationlib.pyi +156 -0
  580. package/bundle/_internal/mypy/typeshed/stdlib/antigravity.pyi +3 -0
  581. package/bundle/_internal/mypy/typeshed/stdlib/argparse.pyi +866 -0
  582. package/bundle/_internal/mypy/typeshed/stdlib/array.pyi +113 -0
  583. package/bundle/_internal/mypy/typeshed/stdlib/ast.pyi +2199 -0
  584. package/bundle/_internal/mypy/typeshed/stdlib/asynchat.pyi +21 -0
  585. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/__init__.pyi +1022 -0
  586. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/base_events.pyi +607 -0
  587. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/base_futures.pyi +17 -0
  588. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +62 -0
  589. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/base_tasks.pyi +17 -0
  590. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/constants.pyi +20 -0
  591. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/coroutines.pyi +45 -0
  592. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/events.pyi +803 -0
  593. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/exceptions.pyi +44 -0
  594. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/format_helpers.pyi +31 -0
  595. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/futures.pyi +19 -0
  596. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/graph.pyi +29 -0
  597. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/locks.pyi +83 -0
  598. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/log.pyi +3 -0
  599. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/mixins.pyi +9 -0
  600. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/proactor_events.pyi +53 -0
  601. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/protocols.pyi +39 -0
  602. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/queues.pyi +45 -0
  603. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/runners.pyi +41 -0
  604. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/selector_events.pyi +10 -0
  605. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/sslproto.pyi +164 -0
  606. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/staggered.pyi +10 -0
  607. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/streams.pyi +124 -0
  608. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/subprocess.pyi +166 -0
  609. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/taskgroups.pyi +41 -0
  610. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/tasks.pyi +315 -0
  611. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/threads.pyi +9 -0
  612. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/timeouts.pyi +20 -0
  613. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/tools.pyi +51 -0
  614. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/transports.pyi +57 -0
  615. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/trsock.pyi +137 -0
  616. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/unix_events.pyi +277 -0
  617. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/windows_events.pyi +122 -0
  618. package/bundle/_internal/mypy/typeshed/stdlib/asyncio/windows_utils.pyi +49 -0
  619. package/bundle/_internal/mypy/typeshed/stdlib/asyncore.pyi +91 -0
  620. package/bundle/_internal/mypy/typeshed/stdlib/atexit.pyi +11 -0
  621. package/bundle/_internal/mypy/typeshed/stdlib/audioop.pyi +44 -0
  622. package/bundle/_internal/mypy/typeshed/stdlib/base64.pyi +124 -0
  623. package/bundle/_internal/mypy/typeshed/stdlib/bdb.pyi +139 -0
  624. package/bundle/_internal/mypy/typeshed/stdlib/binascii.pyi +102 -0
  625. package/bundle/_internal/mypy/typeshed/stdlib/binhex.pyi +44 -0
  626. package/bundle/_internal/mypy/typeshed/stdlib/bisect.pyi +4 -0
  627. package/bundle/_internal/mypy/typeshed/stdlib/builtins.pyi +2470 -0
  628. package/bundle/_internal/mypy/typeshed/stdlib/bz2.pyi +121 -0
  629. package/bundle/_internal/mypy/typeshed/stdlib/cProfile.pyi +33 -0
  630. package/bundle/_internal/mypy/typeshed/stdlib/calendar.pyi +249 -0
  631. package/bundle/_internal/mypy/typeshed/stdlib/cgi.pyi +120 -0
  632. package/bundle/_internal/mypy/typeshed/stdlib/cgitb.pyi +32 -0
  633. package/bundle/_internal/mypy/typeshed/stdlib/chunk.pyi +20 -0
  634. package/bundle/_internal/mypy/typeshed/stdlib/cmath.pyi +36 -0
  635. package/bundle/_internal/mypy/typeshed/stdlib/cmd.pyi +46 -0
  636. package/bundle/_internal/mypy/typeshed/stdlib/code.pyi +55 -0
  637. package/bundle/_internal/mypy/typeshed/stdlib/codecs.pyi +357 -0
  638. package/bundle/_internal/mypy/typeshed/stdlib/codeop.pyi +21 -0
  639. package/bundle/_internal/mypy/typeshed/stdlib/collections/__init__.pyi +565 -0
  640. package/bundle/_internal/mypy/typeshed/stdlib/collections/abc.pyi +2 -0
  641. package/bundle/_internal/mypy/typeshed/stdlib/colorsys.pyi +15 -0
  642. package/bundle/_internal/mypy/typeshed/stdlib/compileall.pyi +51 -0
  643. package/bundle/_internal/mypy/typeshed/stdlib/compression/__init__.pyi +0 -0
  644. package/bundle/_internal/mypy/typeshed/stdlib/compression/_common/__init__.pyi +0 -0
  645. package/bundle/_internal/mypy/typeshed/stdlib/compression/_common/_streams.pyi +37 -0
  646. package/bundle/_internal/mypy/typeshed/stdlib/compression/bz2.pyi +1 -0
  647. package/bundle/_internal/mypy/typeshed/stdlib/compression/gzip.pyi +1 -0
  648. package/bundle/_internal/mypy/typeshed/stdlib/compression/lzma.pyi +1 -0
  649. package/bundle/_internal/mypy/typeshed/stdlib/compression/zlib.pyi +1 -0
  650. package/bundle/_internal/mypy/typeshed/stdlib/compression/zstd/__init__.pyi +94 -0
  651. package/bundle/_internal/mypy/typeshed/stdlib/compression/zstd/_zstdfile.pyi +117 -0
  652. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/__init__.pyi +0 -0
  653. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +71 -0
  654. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/futures/_base.pyi +119 -0
  655. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/futures/interpreter.pyi +82 -0
  656. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/futures/process.pyi +248 -0
  657. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/futures/thread.pyi +143 -0
  658. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/interpreters/__init__.pyi +68 -0
  659. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/interpreters/_crossinterp.pyi +30 -0
  660. package/bundle/_internal/mypy/typeshed/stdlib/concurrent/interpreters/_queues.pyi +74 -0
  661. package/bundle/_internal/mypy/typeshed/stdlib/configparser.pyi +509 -0
  662. package/bundle/_internal/mypy/typeshed/stdlib/contextlib.pyi +211 -0
  663. package/bundle/_internal/mypy/typeshed/stdlib/contextvars.pyi +3 -0
  664. package/bundle/_internal/mypy/typeshed/stdlib/copy.pyi +37 -0
  665. package/bundle/_internal/mypy/typeshed/stdlib/copyreg.pyi +20 -0
  666. package/bundle/_internal/mypy/typeshed/stdlib/crypt.pyi +26 -0
  667. package/bundle/_internal/mypy/typeshed/stdlib/csv.pyi +153 -0
  668. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/__init__.pyi +394 -0
  669. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/_endian.pyi +16 -0
  670. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/macholib/__init__.pyi +3 -0
  671. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/macholib/dyld.pyi +8 -0
  672. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/macholib/dylib.pyi +14 -0
  673. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/macholib/framework.pyi +14 -0
  674. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/util.pyi +11 -0
  675. package/bundle/_internal/mypy/typeshed/stdlib/ctypes/wintypes.pyi +321 -0
  676. package/bundle/_internal/mypy/typeshed/stdlib/curses/__init__.pyi +38 -0
  677. package/bundle/_internal/mypy/typeshed/stdlib/curses/ascii.pyi +62 -0
  678. package/bundle/_internal/mypy/typeshed/stdlib/curses/has_key.pyi +1 -0
  679. package/bundle/_internal/mypy/typeshed/stdlib/curses/panel.pyi +1 -0
  680. package/bundle/_internal/mypy/typeshed/stdlib/curses/textpad.pyi +11 -0
  681. package/bundle/_internal/mypy/typeshed/stdlib/dataclasses.pyi +401 -0
  682. package/bundle/_internal/mypy/typeshed/stdlib/datetime.pyi +381 -0
  683. package/bundle/_internal/mypy/typeshed/stdlib/dbm/__init__.pyi +105 -0
  684. package/bundle/_internal/mypy/typeshed/stdlib/dbm/dumb.pyi +41 -0
  685. package/bundle/_internal/mypy/typeshed/stdlib/dbm/gnu.pyi +1 -0
  686. package/bundle/_internal/mypy/typeshed/stdlib/dbm/ndbm.pyi +1 -0
  687. package/bundle/_internal/mypy/typeshed/stdlib/dbm/sqlite3.pyi +34 -0
  688. package/bundle/_internal/mypy/typeshed/stdlib/decimal.pyi +278 -0
  689. package/bundle/_internal/mypy/typeshed/stdlib/difflib.pyi +157 -0
  690. package/bundle/_internal/mypy/typeshed/stdlib/dis.pyi +302 -0
  691. package/bundle/_internal/mypy/typeshed/stdlib/distutils/__init__.pyi +5 -0
  692. package/bundle/_internal/mypy/typeshed/stdlib/distutils/_msvccompiler.pyi +13 -0
  693. package/bundle/_internal/mypy/typeshed/stdlib/distutils/archive_util.pyi +36 -0
  694. package/bundle/_internal/mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +3 -0
  695. package/bundle/_internal/mypy/typeshed/stdlib/distutils/ccompiler.pyi +182 -0
  696. package/bundle/_internal/mypy/typeshed/stdlib/distutils/cmd.pyi +238 -0
  697. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/__init__.pyi +41 -0
  698. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/bdist.pyi +27 -0
  699. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +22 -0
  700. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +45 -0
  701. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi +0 -0
  702. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +53 -0
  703. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/build.pyi +34 -0
  704. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/build_clib.pyi +29 -0
  705. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/build_ext.pyi +52 -0
  706. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/build_py.pyi +45 -0
  707. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +25 -0
  708. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/check.pyi +39 -0
  709. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/clean.pyi +18 -0
  710. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/config.pyi +84 -0
  711. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install.pyi +67 -0
  712. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install_data.pyi +20 -0
  713. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +19 -0
  714. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install_headers.pyi +17 -0
  715. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install_lib.pyi +26 -0
  716. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +19 -0
  717. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/register.pyi +20 -0
  718. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/sdist.pyi +45 -0
  719. package/bundle/_internal/mypy/typeshed/stdlib/distutils/command/upload.pyi +18 -0
  720. package/bundle/_internal/mypy/typeshed/stdlib/distutils/config.pyi +17 -0
  721. package/bundle/_internal/mypy/typeshed/stdlib/distutils/core.pyi +58 -0
  722. package/bundle/_internal/mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +20 -0
  723. package/bundle/_internal/mypy/typeshed/stdlib/distutils/debug.pyi +3 -0
  724. package/bundle/_internal/mypy/typeshed/stdlib/distutils/dep_util.pyi +14 -0
  725. package/bundle/_internal/mypy/typeshed/stdlib/distutils/dir_util.pyi +23 -0
  726. package/bundle/_internal/mypy/typeshed/stdlib/distutils/dist.pyi +318 -0
  727. package/bundle/_internal/mypy/typeshed/stdlib/distutils/errors.pyi +19 -0
  728. package/bundle/_internal/mypy/typeshed/stdlib/distutils/extension.pyi +36 -0
  729. package/bundle/_internal/mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +45 -0
  730. package/bundle/_internal/mypy/typeshed/stdlib/distutils/file_util.pyi +40 -0
  731. package/bundle/_internal/mypy/typeshed/stdlib/distutils/filelist.pyi +61 -0
  732. package/bundle/_internal/mypy/typeshed/stdlib/distutils/log.pyi +26 -0
  733. package/bundle/_internal/mypy/typeshed/stdlib/distutils/msvccompiler.pyi +3 -0
  734. package/bundle/_internal/mypy/typeshed/stdlib/distutils/spawn.pyi +10 -0
  735. package/bundle/_internal/mypy/typeshed/stdlib/distutils/sysconfig.pyi +32 -0
  736. package/bundle/_internal/mypy/typeshed/stdlib/distutils/text_file.pyi +21 -0
  737. package/bundle/_internal/mypy/typeshed/stdlib/distutils/unixccompiler.pyi +3 -0
  738. package/bundle/_internal/mypy/typeshed/stdlib/distutils/util.pyi +53 -0
  739. package/bundle/_internal/mypy/typeshed/stdlib/distutils/version.pyi +36 -0
  740. package/bundle/_internal/mypy/typeshed/stdlib/doctest.pyi +265 -0
  741. package/bundle/_internal/mypy/typeshed/stdlib/email/__init__.pyi +68 -0
  742. package/bundle/_internal/mypy/typeshed/stdlib/email/_header_value_parser.pyi +415 -0
  743. package/bundle/_internal/mypy/typeshed/stdlib/email/_policybase.pyi +80 -0
  744. package/bundle/_internal/mypy/typeshed/stdlib/email/base64mime.pyi +13 -0
  745. package/bundle/_internal/mypy/typeshed/stdlib/email/charset.pyi +44 -0
  746. package/bundle/_internal/mypy/typeshed/stdlib/email/contentmanager.pyi +11 -0
  747. package/bundle/_internal/mypy/typeshed/stdlib/email/encoders.pyi +8 -0
  748. package/bundle/_internal/mypy/typeshed/stdlib/email/errors.pyi +38 -0
  749. package/bundle/_internal/mypy/typeshed/stdlib/email/feedparser.pyi +24 -0
  750. package/bundle/_internal/mypy/typeshed/stdlib/email/generator.pyi +79 -0
  751. package/bundle/_internal/mypy/typeshed/stdlib/email/header.pyi +32 -0
  752. package/bundle/_internal/mypy/typeshed/stdlib/email/headerregistry.pyi +196 -0
  753. package/bundle/_internal/mypy/typeshed/stdlib/email/iterators.pyi +15 -0
  754. package/bundle/_internal/mypy/typeshed/stdlib/email/message.pyi +191 -0
  755. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/__init__.pyi +0 -0
  756. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/application.pyi +17 -0
  757. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/audio.pyi +17 -0
  758. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/base.pyi +8 -0
  759. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/image.pyi +17 -0
  760. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/message.pyi +8 -0
  761. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/multipart.pyi +18 -0
  762. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +5 -0
  763. package/bundle/_internal/mypy/typeshed/stdlib/email/mime/text.pyi +9 -0
  764. package/bundle/_internal/mypy/typeshed/stdlib/email/parser.pyi +42 -0
  765. package/bundle/_internal/mypy/typeshed/stdlib/email/policy.pyi +78 -0
  766. package/bundle/_internal/mypy/typeshed/stdlib/email/quoprimime.pyi +28 -0
  767. package/bundle/_internal/mypy/typeshed/stdlib/email/utils.pyi +72 -0
  768. package/bundle/_internal/mypy/typeshed/stdlib/encodings/__init__.pyi +15 -0
  769. package/bundle/_internal/mypy/typeshed/stdlib/encodings/aliases.pyi +1 -0
  770. package/bundle/_internal/mypy/typeshed/stdlib/encodings/ascii.pyi +30 -0
  771. package/bundle/_internal/mypy/typeshed/stdlib/encodings/base64_codec.pyi +26 -0
  772. package/bundle/_internal/mypy/typeshed/stdlib/encodings/big5.pyi +23 -0
  773. package/bundle/_internal/mypy/typeshed/stdlib/encodings/big5hkscs.pyi +23 -0
  774. package/bundle/_internal/mypy/typeshed/stdlib/encodings/bz2_codec.pyi +26 -0
  775. package/bundle/_internal/mypy/typeshed/stdlib/encodings/charmap.pyi +33 -0
  776. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp037.pyi +21 -0
  777. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1006.pyi +21 -0
  778. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1026.pyi +21 -0
  779. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1125.pyi +21 -0
  780. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1140.pyi +21 -0
  781. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1250.pyi +21 -0
  782. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1251.pyi +21 -0
  783. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1252.pyi +21 -0
  784. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1253.pyi +21 -0
  785. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1254.pyi +21 -0
  786. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1255.pyi +21 -0
  787. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1256.pyi +21 -0
  788. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1257.pyi +21 -0
  789. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp1258.pyi +21 -0
  790. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp273.pyi +21 -0
  791. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp424.pyi +21 -0
  792. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp437.pyi +21 -0
  793. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp500.pyi +21 -0
  794. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp720.pyi +21 -0
  795. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp737.pyi +21 -0
  796. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp775.pyi +21 -0
  797. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp850.pyi +21 -0
  798. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp852.pyi +21 -0
  799. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp855.pyi +21 -0
  800. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp856.pyi +21 -0
  801. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp857.pyi +21 -0
  802. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp858.pyi +21 -0
  803. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp860.pyi +21 -0
  804. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp861.pyi +21 -0
  805. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp862.pyi +21 -0
  806. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp863.pyi +21 -0
  807. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp864.pyi +21 -0
  808. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp865.pyi +21 -0
  809. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp866.pyi +21 -0
  810. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp869.pyi +21 -0
  811. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp874.pyi +21 -0
  812. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp875.pyi +21 -0
  813. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp932.pyi +23 -0
  814. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp949.pyi +23 -0
  815. package/bundle/_internal/mypy/typeshed/stdlib/encodings/cp950.pyi +23 -0
  816. package/bundle/_internal/mypy/typeshed/stdlib/encodings/euc_jis_2004.pyi +23 -0
  817. package/bundle/_internal/mypy/typeshed/stdlib/encodings/euc_jisx0213.pyi +23 -0
  818. package/bundle/_internal/mypy/typeshed/stdlib/encodings/euc_jp.pyi +23 -0
  819. package/bundle/_internal/mypy/typeshed/stdlib/encodings/euc_kr.pyi +23 -0
  820. package/bundle/_internal/mypy/typeshed/stdlib/encodings/gb18030.pyi +23 -0
  821. package/bundle/_internal/mypy/typeshed/stdlib/encodings/gb2312.pyi +23 -0
  822. package/bundle/_internal/mypy/typeshed/stdlib/encodings/gbk.pyi +23 -0
  823. package/bundle/_internal/mypy/typeshed/stdlib/encodings/hex_codec.pyi +26 -0
  824. package/bundle/_internal/mypy/typeshed/stdlib/encodings/hp_roman8.pyi +21 -0
  825. package/bundle/_internal/mypy/typeshed/stdlib/encodings/hz.pyi +23 -0
  826. package/bundle/_internal/mypy/typeshed/stdlib/encodings/idna.pyi +26 -0
  827. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp.pyi +23 -0
  828. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp_1.pyi +23 -0
  829. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp_2.pyi +23 -0
  830. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
  831. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp_3.pyi +23 -0
  832. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
  833. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso2022_kr.pyi +23 -0
  834. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_1.pyi +21 -0
  835. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_10.pyi +21 -0
  836. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_11.pyi +21 -0
  837. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_13.pyi +21 -0
  838. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_14.pyi +21 -0
  839. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_15.pyi +21 -0
  840. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_16.pyi +21 -0
  841. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_2.pyi +21 -0
  842. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_3.pyi +21 -0
  843. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_4.pyi +21 -0
  844. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_5.pyi +21 -0
  845. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_6.pyi +21 -0
  846. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_7.pyi +21 -0
  847. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_8.pyi +21 -0
  848. package/bundle/_internal/mypy/typeshed/stdlib/encodings/iso8859_9.pyi +21 -0
  849. package/bundle/_internal/mypy/typeshed/stdlib/encodings/johab.pyi +23 -0
  850. package/bundle/_internal/mypy/typeshed/stdlib/encodings/koi8_r.pyi +21 -0
  851. package/bundle/_internal/mypy/typeshed/stdlib/encodings/koi8_t.pyi +21 -0
  852. package/bundle/_internal/mypy/typeshed/stdlib/encodings/koi8_u.pyi +21 -0
  853. package/bundle/_internal/mypy/typeshed/stdlib/encodings/kz1048.pyi +21 -0
  854. package/bundle/_internal/mypy/typeshed/stdlib/encodings/latin_1.pyi +30 -0
  855. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_arabic.pyi +21 -0
  856. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_croatian.pyi +21 -0
  857. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_cyrillic.pyi +21 -0
  858. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_farsi.pyi +21 -0
  859. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_greek.pyi +21 -0
  860. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_iceland.pyi +21 -0
  861. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_latin2.pyi +21 -0
  862. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_roman.pyi +21 -0
  863. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_romanian.pyi +21 -0
  864. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mac_turkish.pyi +21 -0
  865. package/bundle/_internal/mypy/typeshed/stdlib/encodings/mbcs.pyi +28 -0
  866. package/bundle/_internal/mypy/typeshed/stdlib/encodings/oem.pyi +28 -0
  867. package/bundle/_internal/mypy/typeshed/stdlib/encodings/palmos.pyi +21 -0
  868. package/bundle/_internal/mypy/typeshed/stdlib/encodings/ptcp154.pyi +21 -0
  869. package/bundle/_internal/mypy/typeshed/stdlib/encodings/punycode.pyi +33 -0
  870. package/bundle/_internal/mypy/typeshed/stdlib/encodings/quopri_codec.pyi +26 -0
  871. package/bundle/_internal/mypy/typeshed/stdlib/encodings/raw_unicode_escape.pyi +23 -0
  872. package/bundle/_internal/mypy/typeshed/stdlib/encodings/rot_13.pyi +23 -0
  873. package/bundle/_internal/mypy/typeshed/stdlib/encodings/shift_jis.pyi +23 -0
  874. package/bundle/_internal/mypy/typeshed/stdlib/encodings/shift_jis_2004.pyi +23 -0
  875. package/bundle/_internal/mypy/typeshed/stdlib/encodings/shift_jisx0213.pyi +23 -0
  876. package/bundle/_internal/mypy/typeshed/stdlib/encodings/tis_620.pyi +21 -0
  877. package/bundle/_internal/mypy/typeshed/stdlib/encodings/undefined.pyi +20 -0
  878. package/bundle/_internal/mypy/typeshed/stdlib/encodings/unicode_escape.pyi +23 -0
  879. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_16.pyi +20 -0
  880. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_16_be.pyi +26 -0
  881. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_16_le.pyi +26 -0
  882. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_32.pyi +20 -0
  883. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_32_be.pyi +26 -0
  884. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_32_le.pyi +26 -0
  885. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_7.pyi +26 -0
  886. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_8.pyi +26 -0
  887. package/bundle/_internal/mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +22 -0
  888. package/bundle/_internal/mypy/typeshed/stdlib/encodings/uu_codec.pyi +28 -0
  889. package/bundle/_internal/mypy/typeshed/stdlib/encodings/zlib_codec.pyi +26 -0
  890. package/bundle/_internal/mypy/typeshed/stdlib/ensurepip/__init__.pyi +12 -0
  891. package/bundle/_internal/mypy/typeshed/stdlib/enum.pyi +374 -0
  892. package/bundle/_internal/mypy/typeshed/stdlib/errno.pyi +227 -0
  893. package/bundle/_internal/mypy/typeshed/stdlib/faulthandler.pyi +61 -0
  894. package/bundle/_internal/mypy/typeshed/stdlib/fcntl.pyi +157 -0
  895. package/bundle/_internal/mypy/typeshed/stdlib/filecmp.pyi +65 -0
  896. package/bundle/_internal/mypy/typeshed/stdlib/fileinput.pyi +141 -0
  897. package/bundle/_internal/mypy/typeshed/stdlib/fnmatch.pyi +16 -0
  898. package/bundle/_internal/mypy/typeshed/stdlib/fractions.pyi +185 -0
  899. package/bundle/_internal/mypy/typeshed/stdlib/ftplib.pyi +174 -0
  900. package/bundle/_internal/mypy/typeshed/stdlib/functools.pyi +287 -0
  901. package/bundle/_internal/mypy/typeshed/stdlib/gc.pyi +32 -0
  902. package/bundle/_internal/mypy/typeshed/stdlib/genericpath.pyi +98 -0
  903. package/bundle/_internal/mypy/typeshed/stdlib/getopt.pyi +27 -0
  904. package/bundle/_internal/mypy/typeshed/stdlib/getpass.pyi +14 -0
  905. package/bundle/_internal/mypy/typeshed/stdlib/gettext.pyi +190 -0
  906. package/bundle/_internal/mypy/typeshed/stdlib/glob.pyi +50 -0
  907. package/bundle/_internal/mypy/typeshed/stdlib/graphlib.pyi +29 -0
  908. package/bundle/_internal/mypy/typeshed/stdlib/grp.pyi +21 -0
  909. package/bundle/_internal/mypy/typeshed/stdlib/gzip.pyi +181 -0
  910. package/bundle/_internal/mypy/typeshed/stdlib/hashlib.pyi +112 -0
  911. package/bundle/_internal/mypy/typeshed/stdlib/heapq.pyi +32 -0
  912. package/bundle/_internal/mypy/typeshed/stdlib/hmac.pyi +33 -0
  913. package/bundle/_internal/mypy/typeshed/stdlib/html/__init__.pyi +7 -0
  914. package/bundle/_internal/mypy/typeshed/stdlib/html/entities.pyi +8 -0
  915. package/bundle/_internal/mypy/typeshed/stdlib/html/parser.pyi +40 -0
  916. package/bundle/_internal/mypy/typeshed/stdlib/http/__init__.pyi +118 -0
  917. package/bundle/_internal/mypy/typeshed/stdlib/http/client.pyi +318 -0
  918. package/bundle/_internal/mypy/typeshed/stdlib/http/cookiejar.pyi +158 -0
  919. package/bundle/_internal/mypy/typeshed/stdlib/http/cookies.pyi +57 -0
  920. package/bundle/_internal/mypy/typeshed/stdlib/http/server.pyi +139 -0
  921. package/bundle/_internal/mypy/typeshed/stdlib/imaplib.pyi +212 -0
  922. package/bundle/_internal/mypy/typeshed/stdlib/imghdr.pyi +18 -0
  923. package/bundle/_internal/mypy/typeshed/stdlib/imp.pyi +63 -0
  924. package/bundle/_internal/mypy/typeshed/stdlib/importlib/__init__.pyi +17 -0
  925. package/bundle/_internal/mypy/typeshed/stdlib/importlib/_abc.pyi +21 -0
  926. package/bundle/_internal/mypy/typeshed/stdlib/importlib/_bootstrap.pyi +2 -0
  927. package/bundle/_internal/mypy/typeshed/stdlib/importlib/_bootstrap_external.pyi +2 -0
  928. package/bundle/_internal/mypy/typeshed/stdlib/importlib/abc.pyi +165 -0
  929. package/bundle/_internal/mypy/typeshed/stdlib/importlib/machinery.pyi +43 -0
  930. package/bundle/_internal/mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +310 -0
  931. package/bundle/_internal/mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +65 -0
  932. package/bundle/_internal/mypy/typeshed/stdlib/importlib/metadata/diagnose.pyi +2 -0
  933. package/bundle/_internal/mypy/typeshed/stdlib/importlib/readers.pyi +69 -0
  934. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/__init__.pyi +81 -0
  935. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/_common.pyi +48 -0
  936. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/_functional.pyi +35 -0
  937. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/abc.pyi +64 -0
  938. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/readers.pyi +14 -0
  939. package/bundle/_internal/mypy/typeshed/stdlib/importlib/resources/simple.pyi +59 -0
  940. package/bundle/_internal/mypy/typeshed/stdlib/importlib/simple.pyi +11 -0
  941. package/bundle/_internal/mypy/typeshed/stdlib/importlib/util.pyi +75 -0
  942. package/bundle/_internal/mypy/typeshed/stdlib/inspect.pyi +749 -0
  943. package/bundle/_internal/mypy/typeshed/stdlib/io.pyi +75 -0
  944. package/bundle/_internal/mypy/typeshed/stdlib/ipaddress.pyi +249 -0
  945. package/bundle/_internal/mypy/typeshed/stdlib/itertools.pyi +376 -0
  946. package/bundle/_internal/mypy/typeshed/stdlib/json/__init__.pyi +93 -0
  947. package/bundle/_internal/mypy/typeshed/stdlib/json/decoder.pyi +50 -0
  948. package/bundle/_internal/mypy/typeshed/stdlib/json/encoder.pyi +40 -0
  949. package/bundle/_internal/mypy/typeshed/stdlib/json/scanner.pyi +7 -0
  950. package/bundle/_internal/mypy/typeshed/stdlib/json/tool.pyi +1 -0
  951. package/bundle/_internal/mypy/typeshed/stdlib/keyword.pyi +16 -0
  952. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/__init__.pyi +0 -0
  953. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +28 -0
  954. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +42 -0
  955. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi +0 -0
  956. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +8 -0
  957. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -0
  958. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -0
  959. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -0
  960. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +16 -0
  961. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +14 -0
  962. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +8 -0
  963. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -0
  964. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -0
  965. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +9 -0
  966. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -0
  967. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +8 -0
  968. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -0
  969. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -0
  970. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -0
  971. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +16 -0
  972. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +21 -0
  973. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -0
  974. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +11 -0
  975. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +9 -0
  976. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -0
  977. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -0
  978. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -0
  979. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +7 -0
  980. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +9 -0
  981. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -0
  982. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -0
  983. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +8 -0
  984. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +19 -0
  985. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -0
  986. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -0
  987. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +12 -0
  988. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +8 -0
  989. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +12 -0
  990. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +8 -0
  991. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -0
  992. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -0
  993. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +9 -0
  994. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +17 -0
  995. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +8 -0
  996. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -0
  997. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -0
  998. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -0
  999. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +8 -0
  1000. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +16 -0
  1001. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +8 -0
  1002. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -0
  1003. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -0
  1004. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -0
  1005. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -0
  1006. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -0
  1007. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +9 -0
  1008. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/main.pyi +42 -0
  1009. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +8 -0
  1010. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +27 -0
  1011. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +25 -0
  1012. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +7 -0
  1013. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +30 -0
  1014. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +53 -0
  1015. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +69 -0
  1016. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +96 -0
  1017. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pygram.pyi +114 -0
  1018. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/pytree.pyi +118 -0
  1019. package/bundle/_internal/mypy/typeshed/stdlib/lib2to3/refactor.pyi +86 -0
  1020. package/bundle/_internal/mypy/typeshed/stdlib/linecache.pyi +18 -0
  1021. package/bundle/_internal/mypy/typeshed/stdlib/locale.pyi +160 -0
  1022. package/bundle/_internal/mypy/typeshed/stdlib/logging/__init__.pyi +674 -0
  1023. package/bundle/_internal/mypy/typeshed/stdlib/logging/config.pyi +141 -0
  1024. package/bundle/_internal/mypy/typeshed/stdlib/logging/handlers.pyi +258 -0
  1025. package/bundle/_internal/mypy/typeshed/stdlib/lzma.pyi +181 -0
  1026. package/bundle/_internal/mypy/typeshed/stdlib/mailbox.pyi +307 -0
  1027. package/bundle/_internal/mypy/typeshed/stdlib/mailcap.pyi +11 -0
  1028. package/bundle/_internal/mypy/typeshed/stdlib/marshal.pyi +51 -0
  1029. package/bundle/_internal/mypy/typeshed/stdlib/math/__init__.pyi +157 -0
  1030. package/bundle/_internal/mypy/typeshed/stdlib/math/integer.pyi +8 -0
  1031. package/bundle/_internal/mypy/typeshed/stdlib/mimetypes.pyi +56 -0
  1032. package/bundle/_internal/mypy/typeshed/stdlib/mmap.pyi +191 -0
  1033. package/bundle/_internal/mypy/typeshed/stdlib/modulefinder.pyi +68 -0
  1034. package/bundle/_internal/mypy/typeshed/stdlib/msilib/__init__.pyi +177 -0
  1035. package/bundle/_internal/mypy/typeshed/stdlib/msilib/schema.pyi +95 -0
  1036. package/bundle/_internal/mypy/typeshed/stdlib/msilib/sequence.pyi +13 -0
  1037. package/bundle/_internal/mypy/typeshed/stdlib/msilib/text.pyi +8 -0
  1038. package/bundle/_internal/mypy/typeshed/stdlib/msvcrt.pyi +31 -0
  1039. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/__init__.pyi +90 -0
  1040. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/connection.pyi +97 -0
  1041. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/context.pyi +220 -0
  1042. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +89 -0
  1043. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +39 -0
  1044. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +78 -0
  1045. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/heap.pyi +41 -0
  1046. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/managers.pyi +390 -0
  1047. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/pool.pyi +101 -0
  1048. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +26 -0
  1049. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +16 -0
  1050. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +20 -0
  1051. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -0
  1052. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/process.pyi +57 -0
  1053. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/queues.pyi +46 -0
  1054. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/reduction.pyi +95 -0
  1055. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +20 -0
  1056. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +21 -0
  1057. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +43 -0
  1058. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +140 -0
  1059. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/spawn.pyi +32 -0
  1060. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +63 -0
  1061. package/bundle/_internal/mypy/typeshed/stdlib/multiprocessing/util.pyi +109 -0
  1062. package/bundle/_internal/mypy/typeshed/stdlib/netrc.pyi +23 -0
  1063. package/bundle/_internal/mypy/typeshed/stdlib/nis.pyi +9 -0
  1064. package/bundle/_internal/mypy/typeshed/stdlib/nntplib.pyi +120 -0
  1065. package/bundle/_internal/mypy/typeshed/stdlib/nt.pyi +116 -0
  1066. package/bundle/_internal/mypy/typeshed/stdlib/ntpath.pyi +134 -0
  1067. package/bundle/_internal/mypy/typeshed/stdlib/nturl2path.pyi +6 -0
  1068. package/bundle/_internal/mypy/typeshed/stdlib/numbers.pyi +220 -0
  1069. package/bundle/_internal/mypy/typeshed/stdlib/opcode.pyi +53 -0
  1070. package/bundle/_internal/mypy/typeshed/stdlib/operator.pyi +219 -0
  1071. package/bundle/_internal/mypy/typeshed/stdlib/optparse.pyi +312 -0
  1072. package/bundle/_internal/mypy/typeshed/stdlib/os/__init__.pyi +1878 -0
  1073. package/bundle/_internal/mypy/typeshed/stdlib/os/path.pyi +8 -0
  1074. package/bundle/_internal/mypy/typeshed/stdlib/ossaudiodev.pyi +132 -0
  1075. package/bundle/_internal/mypy/typeshed/stdlib/pathlib/__init__.pyi +358 -0
  1076. package/bundle/_internal/mypy/typeshed/stdlib/pathlib/types.pyi +8 -0
  1077. package/bundle/_internal/mypy/typeshed/stdlib/pdb.pyi +275 -0
  1078. package/bundle/_internal/mypy/typeshed/stdlib/pickle.pyi +240 -0
  1079. package/bundle/_internal/mypy/typeshed/stdlib/pickletools.pyi +176 -0
  1080. package/bundle/_internal/mypy/typeshed/stdlib/pipes.pyi +16 -0
  1081. package/bundle/_internal/mypy/typeshed/stdlib/pkgutil.pyi +60 -0
  1082. package/bundle/_internal/mypy/typeshed/stdlib/platform.pyi +100 -0
  1083. package/bundle/_internal/mypy/typeshed/stdlib/plistlib.pyi +84 -0
  1084. package/bundle/_internal/mypy/typeshed/stdlib/poplib.pyi +93 -0
  1085. package/bundle/_internal/mypy/typeshed/stdlib/posix.pyi +427 -0
  1086. package/bundle/_internal/mypy/typeshed/stdlib/posixpath.pyi +230 -0
  1087. package/bundle/_internal/mypy/typeshed/stdlib/pprint.pyi +170 -0
  1088. package/bundle/_internal/mypy/typeshed/stdlib/profile.pyi +31 -0
  1089. package/bundle/_internal/mypy/typeshed/stdlib/profiling/__init__.pyi +3 -0
  1090. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/__init__.pyi +17 -0
  1091. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/collector.pyi +25 -0
  1092. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/gecko_collector.pyi +111 -0
  1093. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/heatmap_collector.pyi +24 -0
  1094. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/jsonl_collector.pyi +15 -0
  1095. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/pstats_collector.pyi +17 -0
  1096. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/stack_collector.pyi +40 -0
  1097. package/bundle/_internal/mypy/typeshed/stdlib/profiling/sampling/string_table.pyi +5 -0
  1098. package/bundle/_internal/mypy/typeshed/stdlib/profiling/tracing.pyi +9 -0
  1099. package/bundle/_internal/mypy/typeshed/stdlib/pstats.pyi +96 -0
  1100. package/bundle/_internal/mypy/typeshed/stdlib/pty.pyi +24 -0
  1101. package/bundle/_internal/mypy/typeshed/stdlib/pwd.pyi +27 -0
  1102. package/bundle/_internal/mypy/typeshed/stdlib/py_compile.pyi +28 -0
  1103. package/bundle/_internal/mypy/typeshed/stdlib/pyclbr.pyi +57 -0
  1104. package/bundle/_internal/mypy/typeshed/stdlib/pydoc.pyi +348 -0
  1105. package/bundle/_internal/mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  1106. package/bundle/_internal/mypy/typeshed/stdlib/pydoc_data/module_docs.pyi +3 -0
  1107. package/bundle/_internal/mypy/typeshed/stdlib/pydoc_data/topics.pyi +3 -0
  1108. package/bundle/_internal/mypy/typeshed/stdlib/pyexpat/__init__.pyi +88 -0
  1109. package/bundle/_internal/mypy/typeshed/stdlib/pyexpat/errors.pyi +53 -0
  1110. package/bundle/_internal/mypy/typeshed/stdlib/pyexpat/model.pyi +13 -0
  1111. package/bundle/_internal/mypy/typeshed/stdlib/queue.pyi +55 -0
  1112. package/bundle/_internal/mypy/typeshed/stdlib/quopri.pyi +12 -0
  1113. package/bundle/_internal/mypy/typeshed/stdlib/random.pyi +135 -0
  1114. package/bundle/_internal/mypy/typeshed/stdlib/re.pyi +347 -0
  1115. package/bundle/_internal/mypy/typeshed/stdlib/readline.pyi +39 -0
  1116. package/bundle/_internal/mypy/typeshed/stdlib/reprlib.pyi +64 -0
  1117. package/bundle/_internal/mypy/typeshed/stdlib/resource.pyi +102 -0
  1118. package/bundle/_internal/mypy/typeshed/stdlib/rlcompleter.pyi +9 -0
  1119. package/bundle/_internal/mypy/typeshed/stdlib/runpy.pyi +24 -0
  1120. package/bundle/_internal/mypy/typeshed/stdlib/sched.pyi +34 -0
  1121. package/bundle/_internal/mypy/typeshed/stdlib/secrets.pyi +17 -0
  1122. package/bundle/_internal/mypy/typeshed/stdlib/select.pyi +171 -0
  1123. package/bundle/_internal/mypy/typeshed/stdlib/selectors.pyi +67 -0
  1124. package/bundle/_internal/mypy/typeshed/stdlib/shelve.pyi +110 -0
  1125. package/bundle/_internal/mypy/typeshed/stdlib/shlex.pyi +63 -0
  1126. package/bundle/_internal/mypy/typeshed/stdlib/shutil.pyi +243 -0
  1127. package/bundle/_internal/mypy/typeshed/stdlib/signal.pyi +174 -0
  1128. package/bundle/_internal/mypy/typeshed/stdlib/site.pyi +46 -0
  1129. package/bundle/_internal/mypy/typeshed/stdlib/smtpd.pyi +92 -0
  1130. package/bundle/_internal/mypy/typeshed/stdlib/smtplib.pyi +223 -0
  1131. package/bundle/_internal/mypy/typeshed/stdlib/sndhdr.pyi +14 -0
  1132. package/bundle/_internal/mypy/typeshed/stdlib/socket.pyi +1587 -0
  1133. package/bundle/_internal/mypy/typeshed/stdlib/socketserver.pyi +170 -0
  1134. package/bundle/_internal/mypy/typeshed/stdlib/spwd.pyi +45 -0
  1135. package/bundle/_internal/mypy/typeshed/stdlib/sqlite3/__init__.pyi +510 -0
  1136. package/bundle/_internal/mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +244 -0
  1137. package/bundle/_internal/mypy/typeshed/stdlib/sqlite3/dump.pyi +2 -0
  1138. package/bundle/_internal/mypy/typeshed/stdlib/sre_compile.pyi +12 -0
  1139. package/bundle/_internal/mypy/typeshed/stdlib/sre_constants.pyi +135 -0
  1140. package/bundle/_internal/mypy/typeshed/stdlib/sre_parse.pyi +102 -0
  1141. package/bundle/_internal/mypy/typeshed/stdlib/ssl.pyi +540 -0
  1142. package/bundle/_internal/mypy/typeshed/stdlib/stat.pyi +126 -0
  1143. package/bundle/_internal/mypy/typeshed/stdlib/statistics.pyi +161 -0
  1144. package/bundle/_internal/mypy/typeshed/stdlib/string/__init__.pyi +81 -0
  1145. package/bundle/_internal/mypy/typeshed/stdlib/string/templatelib.pyi +36 -0
  1146. package/bundle/_internal/mypy/typeshed/stdlib/stringprep.pyi +29 -0
  1147. package/bundle/_internal/mypy/typeshed/stdlib/struct.pyi +5 -0
  1148. package/bundle/_internal/mypy/typeshed/stdlib/subprocess.pyi +1484 -0
  1149. package/bundle/_internal/mypy/typeshed/stdlib/sunau.pyi +82 -0
  1150. package/bundle/_internal/mypy/typeshed/stdlib/symtable.pyi +95 -0
  1151. package/bundle/_internal/mypy/typeshed/stdlib/sys/__init__.pyi +538 -0
  1152. package/bundle/_internal/mypy/typeshed/stdlib/sys/__jit.pyi +11 -0
  1153. package/bundle/_internal/mypy/typeshed/stdlib/sys/_monitoring.pyi +69 -0
  1154. package/bundle/_internal/mypy/typeshed/stdlib/sysconfig.pyi +59 -0
  1155. package/bundle/_internal/mypy/typeshed/stdlib/syslog.pyi +58 -0
  1156. package/bundle/_internal/mypy/typeshed/stdlib/tabnanny.pyi +16 -0
  1157. package/bundle/_internal/mypy/typeshed/stdlib/tarfile.pyi +868 -0
  1158. package/bundle/_internal/mypy/typeshed/stdlib/telnetlib.pyi +123 -0
  1159. package/bundle/_internal/mypy/typeshed/stdlib/tempfile.pyi +474 -0
  1160. package/bundle/_internal/mypy/typeshed/stdlib/termios.pyi +303 -0
  1161. package/bundle/_internal/mypy/typeshed/stdlib/textwrap.pyi +103 -0
  1162. package/bundle/_internal/mypy/typeshed/stdlib/this.pyi +2 -0
  1163. package/bundle/_internal/mypy/typeshed/stdlib/threading.pyi +221 -0
  1164. package/bundle/_internal/mypy/typeshed/stdlib/time.pyi +117 -0
  1165. package/bundle/_internal/mypy/typeshed/stdlib/timeit.pyi +46 -0
  1166. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/__init__.pyi +4376 -0
  1167. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/colorchooser.pyi +12 -0
  1168. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/commondialog.pyi +14 -0
  1169. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/constants.pyi +80 -0
  1170. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/dialog.pyi +13 -0
  1171. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/dnd.pyi +19 -0
  1172. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/filedialog.pyi +149 -0
  1173. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/font.pyi +123 -0
  1174. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/messagebox.pyi +98 -0
  1175. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +9 -0
  1176. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/simpledialog.pyi +58 -0
  1177. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/tix.pyi +299 -0
  1178. package/bundle/_internal/mypy/typeshed/stdlib/tkinter/ttk.pyi +1434 -0
  1179. package/bundle/_internal/mypy/typeshed/stdlib/token.pyi +166 -0
  1180. package/bundle/_internal/mypy/typeshed/stdlib/tokenize.pyi +201 -0
  1181. package/bundle/_internal/mypy/typeshed/stdlib/tomllib.pyi +27 -0
  1182. package/bundle/_internal/mypy/typeshed/stdlib/trace.pyi +85 -0
  1183. package/bundle/_internal/mypy/typeshed/stdlib/traceback.pyi +293 -0
  1184. package/bundle/_internal/mypy/typeshed/stdlib/tracemalloc.pyi +123 -0
  1185. package/bundle/_internal/mypy/typeshed/stdlib/tty.pyi +29 -0
  1186. package/bundle/_internal/mypy/typeshed/stdlib/turtle.pyi +856 -0
  1187. package/bundle/_internal/mypy/typeshed/stdlib/types.pyi +744 -0
  1188. package/bundle/_internal/mypy/typeshed/stdlib/typing.pyi +1250 -0
  1189. package/bundle/_internal/mypy/typeshed/stdlib/typing_extensions.pyi +749 -0
  1190. package/bundle/_internal/mypy/typeshed/stdlib/unicodedata.pyi +94 -0
  1191. package/bundle/_internal/mypy/typeshed/stdlib/unittest/__init__.pyi +63 -0
  1192. package/bundle/_internal/mypy/typeshed/stdlib/unittest/_log.pyi +29 -0
  1193. package/bundle/_internal/mypy/typeshed/stdlib/unittest/async_case.pyi +24 -0
  1194. package/bundle/_internal/mypy/typeshed/stdlib/unittest/case.pyi +352 -0
  1195. package/bundle/_internal/mypy/typeshed/stdlib/unittest/loader.pyi +55 -0
  1196. package/bundle/_internal/mypy/typeshed/stdlib/unittest/main.pyi +74 -0
  1197. package/bundle/_internal/mypy/typeshed/stdlib/unittest/mock.pyi +555 -0
  1198. package/bundle/_internal/mypy/typeshed/stdlib/unittest/result.pyi +46 -0
  1199. package/bundle/_internal/mypy/typeshed/stdlib/unittest/runner.pyi +93 -0
  1200. package/bundle/_internal/mypy/typeshed/stdlib/unittest/signals.pyi +15 -0
  1201. package/bundle/_internal/mypy/typeshed/stdlib/unittest/suite.pyi +23 -0
  1202. package/bundle/_internal/mypy/typeshed/stdlib/unittest/util.pyi +39 -0
  1203. package/bundle/_internal/mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  1204. package/bundle/_internal/mypy/typeshed/stdlib/urllib/error.pyi +29 -0
  1205. package/bundle/_internal/mypy/typeshed/stdlib/urllib/parse.pyi +354 -0
  1206. package/bundle/_internal/mypy/typeshed/stdlib/urllib/request.pyi +447 -0
  1207. package/bundle/_internal/mypy/typeshed/stdlib/urllib/response.pyi +45 -0
  1208. package/bundle/_internal/mypy/typeshed/stdlib/urllib/robotparser.pyi +20 -0
  1209. package/bundle/_internal/mypy/typeshed/stdlib/uu.pyi +12 -0
  1210. package/bundle/_internal/mypy/typeshed/stdlib/uuid.pyi +106 -0
  1211. package/bundle/_internal/mypy/typeshed/stdlib/venv/__init__.pyi +86 -0
  1212. package/bundle/_internal/mypy/typeshed/stdlib/warnings.pyi +146 -0
  1213. package/bundle/_internal/mypy/typeshed/stdlib/wave.pyi +105 -0
  1214. package/bundle/_internal/mypy/typeshed/stdlib/weakref.pyi +217 -0
  1215. package/bundle/_internal/mypy/typeshed/stdlib/webbrowser.pyi +93 -0
  1216. package/bundle/_internal/mypy/typeshed/stdlib/winreg.pyi +137 -0
  1217. package/bundle/_internal/mypy/typeshed/stdlib/winsound.pyi +40 -0
  1218. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  1219. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/handlers.pyi +91 -0
  1220. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/headers.pyi +27 -0
  1221. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/simple_server.pyi +37 -0
  1222. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/types.pyi +31 -0
  1223. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/util.pyi +26 -0
  1224. package/bundle/_internal/mypy/typeshed/stdlib/wsgiref/validate.pyi +50 -0
  1225. package/bundle/_internal/mypy/typeshed/stdlib/xdrlib.pyi +57 -0
  1226. package/bundle/_internal/mypy/typeshed/stdlib/xml/__init__.pyi +9 -0
  1227. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +22 -0
  1228. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/__init__.pyi +101 -0
  1229. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/domreg.pyi +8 -0
  1230. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +126 -0
  1231. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/minicompat.pyi +24 -0
  1232. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/minidom.pyi +693 -0
  1233. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/pulldom.pyi +109 -0
  1234. package/bundle/_internal/mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +82 -0
  1235. package/bundle/_internal/mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +28 -0
  1236. package/bundle/_internal/mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +42 -0
  1237. package/bundle/_internal/mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +402 -0
  1238. package/bundle/_internal/mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  1239. package/bundle/_internal/mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +1 -0
  1240. package/bundle/_internal/mypy/typeshed/stdlib/xml/parsers/__init__.pyi +1 -0
  1241. package/bundle/_internal/mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +7 -0
  1242. package/bundle/_internal/mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +1 -0
  1243. package/bundle/_internal/mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +1 -0
  1244. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/__init__.pyi +42 -0
  1245. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +19 -0
  1246. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/expatreader.pyi +72 -0
  1247. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/handler.pyi +85 -0
  1248. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/saxutils.pyi +69 -0
  1249. package/bundle/_internal/mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +94 -0
  1250. package/bundle/_internal/mypy/typeshed/stdlib/xml/utils.pyi +2 -0
  1251. package/bundle/_internal/mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  1252. package/bundle/_internal/mypy/typeshed/stdlib/xmlrpc/client.pyi +300 -0
  1253. package/bundle/_internal/mypy/typeshed/stdlib/xmlrpc/server.pyi +149 -0
  1254. package/bundle/_internal/mypy/typeshed/stdlib/xxlimited.pyi +15 -0
  1255. package/bundle/_internal/mypy/typeshed/stdlib/zipapp.pyi +19 -0
  1256. package/bundle/_internal/mypy/typeshed/stdlib/zipfile/__init__.pyi +411 -0
  1257. package/bundle/_internal/mypy/typeshed/stdlib/zipfile/_path/__init__.pyi +87 -0
  1258. package/bundle/_internal/mypy/typeshed/stdlib/zipfile/_path/glob.pyi +26 -0
  1259. package/bundle/_internal/mypy/typeshed/stdlib/zipimport.pyi +44 -0
  1260. package/bundle/_internal/mypy/typeshed/stdlib/zlib.pyi +81 -0
  1261. package/bundle/_internal/mypy/typeshed/stdlib/zoneinfo/__init__.pyi +36 -0
  1262. package/bundle/_internal/mypy/typeshed/stdlib/zoneinfo/_common.pyi +14 -0
  1263. package/bundle/_internal/mypy/typeshed/stdlib/zoneinfo/_tzpath.pyi +13 -0
  1264. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/__init__.pyi +0 -0
  1265. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/base64.pyi +4 -0
  1266. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/internal.pyi +22 -0
  1267. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/random.pyi +22 -0
  1268. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/strings.pyi +61 -0
  1269. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/threading.pyi +16 -0
  1270. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/time.pyi +1 -0
  1271. package/bundle/_internal/mypy/typeshed/stubs/librt/librt/vecs.pyi +24 -0
  1272. package/bundle/_internal/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +226 -0
  1273. package/bundle/_internal/mypy/typestate.cpython-312-darwin.so +0 -0
  1274. package/bundle/_internal/mypy/typestate.py +334 -0
  1275. package/bundle/_internal/mypy/typetraverser.cpython-312-darwin.so +0 -0
  1276. package/bundle/_internal/mypy/typetraverser.py +166 -0
  1277. package/bundle/_internal/mypy/typevars.cpython-312-darwin.so +0 -0
  1278. package/bundle/_internal/mypy/typevars.py +84 -0
  1279. package/bundle/_internal/mypy/typevartuples.cpython-312-darwin.so +0 -0
  1280. package/bundle/_internal/mypy/typevartuples.py +36 -0
  1281. package/bundle/_internal/mypy/util.cpython-312-darwin.so +0 -0
  1282. package/bundle/_internal/mypy/util.py +1055 -0
  1283. package/bundle/_internal/mypy/version.py +1 -0
  1284. package/bundle/_internal/mypy/visitor.cpython-312-darwin.so +0 -0
  1285. package/bundle/_internal/mypy/visitor.py +639 -0
  1286. package/bundle/_internal/mypy/xml/mypy-html.css +104 -0
  1287. package/bundle/_internal/mypy/xml/mypy-html.xslt +81 -0
  1288. package/bundle/_internal/mypy/xml/mypy-txt.xslt +100 -0
  1289. package/bundle/_internal/mypy/xml/mypy.xsd +50 -0
  1290. package/bundle/_internal/mypy-2.4.1.dist-info/INSTALLER +1 -0
  1291. package/bundle/_internal/mypy-2.4.1.dist-info/METADATA +56 -0
  1292. package/bundle/_internal/mypy-2.4.1.dist-info/RECORD +1814 -0
  1293. package/bundle/_internal/mypy-2.4.1.dist-info/WHEEL +6 -0
  1294. package/bundle/_internal/mypy-2.4.1.dist-info/entry_points.txt +6 -0
  1295. package/bundle/_internal/mypy-2.4.1.dist-info/licenses/LICENSE +264 -0
  1296. package/bundle/_internal/mypy-2.4.1.dist-info/licenses/mypy/typeshed/LICENSE +237 -0
  1297. package/bundle/_internal/mypy-2.4.1.dist-info/top_level.txt +3 -0
  1298. package/bundle/_internal/mypyc/__init__.cpython-312-darwin.so +0 -0
  1299. package/bundle/_internal/python3.12/lib-dynload/_asyncio.cpython-312-darwin.so +0 -0
  1300. package/bundle/_internal/python3.12/lib-dynload/_bisect.cpython-312-darwin.so +0 -0
  1301. package/bundle/_internal/python3.12/lib-dynload/_blake2.cpython-312-darwin.so +0 -0
  1302. package/bundle/_internal/python3.12/lib-dynload/_bz2.cpython-312-darwin.so +0 -0
  1303. package/bundle/_internal/python3.12/lib-dynload/_codecs_cn.cpython-312-darwin.so +0 -0
  1304. package/bundle/_internal/python3.12/lib-dynload/_codecs_hk.cpython-312-darwin.so +0 -0
  1305. package/bundle/_internal/python3.12/lib-dynload/_codecs_iso2022.cpython-312-darwin.so +0 -0
  1306. package/bundle/_internal/python3.12/lib-dynload/_codecs_jp.cpython-312-darwin.so +0 -0
  1307. package/bundle/_internal/python3.12/lib-dynload/_codecs_kr.cpython-312-darwin.so +0 -0
  1308. package/bundle/_internal/python3.12/lib-dynload/_codecs_tw.cpython-312-darwin.so +0 -0
  1309. package/bundle/_internal/python3.12/lib-dynload/_contextvars.cpython-312-darwin.so +0 -0
  1310. package/bundle/_internal/python3.12/lib-dynload/_csv.cpython-312-darwin.so +0 -0
  1311. package/bundle/_internal/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so +0 -0
  1312. package/bundle/_internal/python3.12/lib-dynload/_curses.cpython-312-darwin.so +0 -0
  1313. package/bundle/_internal/python3.12/lib-dynload/_datetime.cpython-312-darwin.so +0 -0
  1314. package/bundle/_internal/python3.12/lib-dynload/_decimal.cpython-312-darwin.so +0 -0
  1315. package/bundle/_internal/python3.12/lib-dynload/_elementtree.cpython-312-darwin.so +0 -0
  1316. package/bundle/_internal/python3.12/lib-dynload/_hashlib.cpython-312-darwin.so +0 -0
  1317. package/bundle/_internal/python3.12/lib-dynload/_heapq.cpython-312-darwin.so +0 -0
  1318. package/bundle/_internal/python3.12/lib-dynload/_json.cpython-312-darwin.so +0 -0
  1319. package/bundle/_internal/python3.12/lib-dynload/_lzma.cpython-312-darwin.so +0 -0
  1320. package/bundle/_internal/python3.12/lib-dynload/_md5.cpython-312-darwin.so +0 -0
  1321. package/bundle/_internal/python3.12/lib-dynload/_multibytecodec.cpython-312-darwin.so +0 -0
  1322. package/bundle/_internal/python3.12/lib-dynload/_multiprocessing.cpython-312-darwin.so +0 -0
  1323. package/bundle/_internal/python3.12/lib-dynload/_opcode.cpython-312-darwin.so +0 -0
  1324. package/bundle/_internal/python3.12/lib-dynload/_pickle.cpython-312-darwin.so +0 -0
  1325. package/bundle/_internal/python3.12/lib-dynload/_posixshmem.cpython-312-darwin.so +0 -0
  1326. package/bundle/_internal/python3.12/lib-dynload/_posixsubprocess.cpython-312-darwin.so +0 -0
  1327. package/bundle/_internal/python3.12/lib-dynload/_queue.cpython-312-darwin.so +0 -0
  1328. package/bundle/_internal/python3.12/lib-dynload/_random.cpython-312-darwin.so +0 -0
  1329. package/bundle/_internal/python3.12/lib-dynload/_scproxy.cpython-312-darwin.so +0 -0
  1330. package/bundle/_internal/python3.12/lib-dynload/_sha1.cpython-312-darwin.so +0 -0
  1331. package/bundle/_internal/python3.12/lib-dynload/_sha2.cpython-312-darwin.so +0 -0
  1332. package/bundle/_internal/python3.12/lib-dynload/_sha3.cpython-312-darwin.so +0 -0
  1333. package/bundle/_internal/python3.12/lib-dynload/_socket.cpython-312-darwin.so +0 -0
  1334. package/bundle/_internal/python3.12/lib-dynload/_sqlite3.cpython-312-darwin.so +0 -0
  1335. package/bundle/_internal/python3.12/lib-dynload/_ssl.cpython-312-darwin.so +0 -0
  1336. package/bundle/_internal/python3.12/lib-dynload/_statistics.cpython-312-darwin.so +0 -0
  1337. package/bundle/_internal/python3.12/lib-dynload/_struct.cpython-312-darwin.so +0 -0
  1338. package/bundle/_internal/python3.12/lib-dynload/_uuid.cpython-312-darwin.so +0 -0
  1339. package/bundle/_internal/python3.12/lib-dynload/array.cpython-312-darwin.so +0 -0
  1340. package/bundle/_internal/python3.12/lib-dynload/binascii.cpython-312-darwin.so +0 -0
  1341. package/bundle/_internal/python3.12/lib-dynload/fcntl.cpython-312-darwin.so +0 -0
  1342. package/bundle/_internal/python3.12/lib-dynload/grp.cpython-312-darwin.so +0 -0
  1343. package/bundle/_internal/python3.12/lib-dynload/math.cpython-312-darwin.so +0 -0
  1344. package/bundle/_internal/python3.12/lib-dynload/mmap.cpython-312-darwin.so +0 -0
  1345. package/bundle/_internal/python3.12/lib-dynload/pyexpat.cpython-312-darwin.so +0 -0
  1346. package/bundle/_internal/python3.12/lib-dynload/readline.cpython-312-darwin.so +0 -0
  1347. package/bundle/_internal/python3.12/lib-dynload/resource.cpython-312-darwin.so +0 -0
  1348. package/bundle/_internal/python3.12/lib-dynload/select.cpython-312-darwin.so +0 -0
  1349. package/bundle/_internal/python3.12/lib-dynload/syslog.cpython-312-darwin.so +0 -0
  1350. package/bundle/_internal/python3.12/lib-dynload/termios.cpython-312-darwin.so +0 -0
  1351. package/bundle/_internal/python3.12/lib-dynload/unicodedata.cpython-312-darwin.so +0 -0
  1352. package/bundle/_internal/python3.12/lib-dynload/zlib.cpython-312-darwin.so +0 -0
  1353. package/bundle/_internal/radon/__init__.py +21 -0
  1354. package/bundle/_internal/radon/__main__.py +4 -0
  1355. package/bundle/_internal/radon/cli/__init__.py +433 -0
  1356. package/bundle/_internal/radon/cli/colors.py +49 -0
  1357. package/bundle/_internal/radon/cli/harvest.py +449 -0
  1358. package/bundle/_internal/radon/cli/tools.py +597 -0
  1359. package/bundle/_internal/radon/complexity.py +108 -0
  1360. package/bundle/_internal/radon/contrib/__init__.py +0 -0
  1361. package/bundle/_internal/radon/contrib/flake8.py +72 -0
  1362. package/bundle/_internal/radon/metrics.py +157 -0
  1363. package/bundle/_internal/radon/raw.py +245 -0
  1364. package/bundle/_internal/radon/tests/__init__.py +0 -0
  1365. package/bundle/_internal/radon/tests/conftest.py +31 -0
  1366. package/bundle/_internal/radon/tests/data/__init__.py +5 -0
  1367. package/bundle/_internal/radon/tests/data/no_encoding.py +2 -0
  1368. package/bundle/_internal/radon/tests/data/py3unicode.py +5 -0
  1369. package/bundle/_internal/radon/tests/run.py +14 -0
  1370. package/bundle/_internal/radon/tests/test_cli.py +282 -0
  1371. package/bundle/_internal/radon/tests/test_cli_colors.py +22 -0
  1372. package/bundle/_internal/radon/tests/test_cli_harvest.py +392 -0
  1373. package/bundle/_internal/radon/tests/test_cli_tools.py +616 -0
  1374. package/bundle/_internal/radon/tests/test_complexity_utils.py +118 -0
  1375. package/bundle/_internal/radon/tests/test_complexity_visitor.py +754 -0
  1376. package/bundle/_internal/radon/tests/test_halstead.py +113 -0
  1377. package/bundle/_internal/radon/tests/test_ipynb.py +141 -0
  1378. package/bundle/_internal/radon/tests/test_other_metrics.py +169 -0
  1379. package/bundle/_internal/radon/tests/test_raw.py +467 -0
  1380. package/bundle/_internal/radon/visitors.py +460 -0
  1381. package/bundle/_internal/radon-6.0.1.dist-info/INSTALLER +1 -0
  1382. package/bundle/_internal/radon-6.0.1.dist-info/LICENSE +22 -0
  1383. package/bundle/_internal/radon-6.0.1.dist-info/METADATA +263 -0
  1384. package/bundle/_internal/radon-6.0.1.dist-info/RECORD +64 -0
  1385. package/bundle/_internal/radon-6.0.1.dist-info/WHEEL +6 -0
  1386. package/bundle/_internal/radon-6.0.1.dist-info/entry_points.txt +8 -0
  1387. package/bundle/_internal/radon-6.0.1.dist-info/top_level.txt +1 -0
  1388. package/bundle/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +2 -0
  1389. package/bundle/_internal/stevedore-5.10.0.dist-info/INSTALLER +1 -0
  1390. package/bundle/_internal/stevedore-5.10.0.dist-info/METADATA +56 -0
  1391. package/bundle/_internal/stevedore-5.10.0.dist-info/RECORD +84 -0
  1392. package/bundle/_internal/stevedore-5.10.0.dist-info/WHEEL +5 -0
  1393. package/bundle/_internal/stevedore-5.10.0.dist-info/entry_points.txt +10 -0
  1394. package/bundle/_internal/stevedore-5.10.0.dist-info/licenses/AUTHORS +76 -0
  1395. package/bundle/_internal/stevedore-5.10.0.dist-info/licenses/LICENSE +202 -0
  1396. package/bundle/_internal/stevedore-5.10.0.dist-info/pbr.json +1 -0
  1397. package/bundle/_internal/stevedore-5.10.0.dist-info/top_level.txt +1 -0
  1398. package/bundle/_internal/tqdm-4.70.1.dist-info/INSTALLER +1 -0
  1399. package/bundle/_internal/tqdm-4.70.1.dist-info/METADATA +1600 -0
  1400. package/bundle/_internal/tqdm-4.70.1.dist-info/RECORD +72 -0
  1401. package/bundle/_internal/tqdm-4.70.1.dist-info/WHEEL +5 -0
  1402. package/bundle/_internal/tqdm-4.70.1.dist-info/entry_points.txt +2 -0
  1403. package/bundle/_internal/tqdm-4.70.1.dist-info/licenses/LICENCE +49 -0
  1404. package/bundle/_internal/tqdm-4.70.1.dist-info/top_level.txt +1 -0
  1405. package/bundle/_internal/yaml/_yaml.cpython-312-darwin.so +0 -0
  1406. package/bundle/gnost +0 -0
  1407. package/package.json +10 -7
@@ -0,0 +1,1793 @@
1
+ """Mypy type checker command line tool."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import os
7
+ import platform
8
+ import subprocess
9
+ import sys
10
+ import time
11
+ from collections import defaultdict
12
+ from collections.abc import Sequence
13
+ from gettext import gettext
14
+ from io import TextIOWrapper
15
+ from typing import IO, TYPE_CHECKING, Any, Final, NoReturn, TextIO
16
+
17
+ if platform.python_implementation() == "PyPy":
18
+ sys.stderr.write(
19
+ "ERROR: Running mypy on PyPy is not supported yet.\n"
20
+ "To type-check a PyPy library please use an equivalent CPython version,\n"
21
+ "see https://github.com/mypyc/librt/issues/16 for possible workarounds.\n"
22
+ )
23
+ sys.exit(2)
24
+
25
+ from mypy import build, defaults, state, util
26
+ from mypy.config_parser import (
27
+ parse_config_file,
28
+ parse_num_workers,
29
+ parse_version,
30
+ validate_package_allow_list,
31
+ )
32
+ from mypy.defaults import RECURSION_LIMIT
33
+ from mypy.error_formatter import OUTPUT_CHOICES
34
+ from mypy.errors import CompileError
35
+ from mypy.find_sources import InvalidSourceList, create_source_list
36
+ from mypy.fscache import FileSystemCache
37
+ from mypy.modulefinder import (
38
+ BuildSource,
39
+ FindModuleCache,
40
+ ModuleNotFoundReason,
41
+ SearchPaths,
42
+ get_search_dirs,
43
+ mypy_path,
44
+ )
45
+ from mypy.options import INCOMPLETE_FEATURES, BuildType, Options
46
+ from mypy.split_namespace import SplitNamespace
47
+ from mypy.version import __version__
48
+
49
+ if TYPE_CHECKING:
50
+ from _typeshed import SupportsWrite
51
+
52
+ orig_stat: Final = os.stat
53
+ MEM_PROFILE: Final = False # If True, dump memory profile
54
+
55
+
56
+ def stat_proxy(path: str) -> os.stat_result:
57
+ try:
58
+ st = orig_stat(path)
59
+ except OSError as err:
60
+ print(f"stat({path!r}) -> {err}")
61
+ raise
62
+ else:
63
+ print(
64
+ "stat(%r) -> (st_mode=%o, st_mtime=%d, st_size=%d)"
65
+ % (path, st.st_mode, st.st_mtime, st.st_size)
66
+ )
67
+ return st
68
+
69
+
70
+ def main(
71
+ *,
72
+ args: list[str] | None = None,
73
+ stdout: TextIO = sys.stdout,
74
+ stderr: TextIO = sys.stderr,
75
+ clean_exit: bool = False,
76
+ ) -> None:
77
+ """Main entry point to the type checker.
78
+
79
+ Args:
80
+ args: Custom command-line arguments. If not given, sys.argv[1:] will
81
+ be used.
82
+ clean_exit: Don't hard kill the process on exit. This allows catching
83
+ SystemExit.
84
+ """
85
+ util.check_python_version("mypy")
86
+ t0 = time.time()
87
+ # To log stat() calls: os.stat = stat_proxy
88
+ sys.setrecursionlimit(RECURSION_LIMIT)
89
+ if args is None:
90
+ args = sys.argv[1:]
91
+
92
+ # Write an escape sequence instead of raising an exception on encoding errors.
93
+ if isinstance(stdout, TextIOWrapper) and stdout.errors == "strict":
94
+ stdout.reconfigure(errors="backslashreplace")
95
+
96
+ fscache = FileSystemCache()
97
+ sources, options = process_options(args, stdout=stdout, stderr=stderr, fscache=fscache)
98
+ if clean_exit:
99
+ options.fast_exit = False
100
+
101
+ formatter = util.FancyFormatter(
102
+ stdout, stderr, options.hide_error_codes, hide_success=bool(options.output)
103
+ )
104
+
105
+ if options.num_workers:
106
+ # Supporting both parsers would be really tricky, so just support the new one.
107
+ options.native_parser = True
108
+ if not options.incremental and os.path.isdir(options.cache_dir):
109
+ print(
110
+ "Warning: disabling incremental mode may severely reduce performance", file=stdout
111
+ )
112
+ print(
113
+ f"If this is intentional, delete '{options.cache_dir}' to suppress this warning",
114
+ file=stdout,
115
+ )
116
+ if options.num_workers < 0:
117
+ fail("error: Number of workers cannot be negative", stderr, options)
118
+ if options.cache_dir == os.devnull:
119
+ fail("error: Cache must be enabled in parallel mode", stderr, options)
120
+ if not options.local_partial_types:
121
+ fail("error: --local-partial-types must be enabled in parallel mode", stderr, options)
122
+ if options.report_dirs:
123
+ fail(
124
+ "error: Reports are not supported in parallel mode yet\n"
125
+ "note: Use -n0 to disable parallel checking",
126
+ stderr,
127
+ options,
128
+ )
129
+
130
+ if options.allow_redefinition and not options.local_partial_types:
131
+ fail(
132
+ "error: --local-partial-types must be enabled if using --allow-redefinition",
133
+ stderr,
134
+ options,
135
+ )
136
+
137
+ if options.allow_redefinition and options.allow_redefinition_old:
138
+ fail(
139
+ "--allow-redefinition-old and --allow-redefinition should not be used together",
140
+ stderr,
141
+ options,
142
+ )
143
+
144
+ if options.install_types and (stdout is not sys.stdout or stderr is not sys.stderr):
145
+ # Since --install-types performs user input, we want regular stdout and stderr.
146
+ fail("error: --install-types not supported in this mode of running mypy", stderr, options)
147
+
148
+ if options.non_interactive and not options.install_types:
149
+ fail("error: --non-interactive is only supported with --install-types", stderr, options)
150
+
151
+ if options.install_types and not options.incremental:
152
+ fail(
153
+ "error: --install-types not supported with incremental mode disabled", stderr, options
154
+ )
155
+
156
+ if options.install_types and options.python_executable is None:
157
+ fail(
158
+ "error: --install-types not supported without python executable or site packages",
159
+ stderr,
160
+ options,
161
+ )
162
+
163
+ if options.install_types and not sources:
164
+ install_types(formatter, options, non_interactive=options.non_interactive)
165
+ return
166
+
167
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
168
+
169
+ if options.non_interactive:
170
+ missing_pkgs = read_types_packages_to_install(options.cache_dir, after_run=True)
171
+ if missing_pkgs:
172
+ # Install missing type packages and rerun build.
173
+ install_types(formatter, options, after_run=True, non_interactive=True)
174
+ fscache.flush()
175
+ print()
176
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
177
+ show_messages(messages, stderr, formatter, options)
178
+
179
+ if MEM_PROFILE:
180
+ from mypy.memprofile import print_memory_profile
181
+
182
+ print_memory_profile()
183
+
184
+ code = 0
185
+ n_errors, n_notes, n_files = util.count_stats(messages)
186
+ if messages and n_notes < len(messages):
187
+ code = 2 if blockers else 1
188
+ if options.error_summary:
189
+ if n_errors:
190
+ summary = formatter.format_error(
191
+ n_errors, n_files, len(sources), blockers=blockers, use_color=options.color_output
192
+ )
193
+ stdout.write(summary + "\n")
194
+ # Only notes should also output success
195
+ elif not messages or n_notes == len(messages):
196
+ stdout.write(formatter.format_success(len(sources), options.color_output) + "\n")
197
+ stdout.flush()
198
+
199
+ if options.install_types and not options.non_interactive:
200
+ result = install_types(formatter, options, after_run=True, non_interactive=False)
201
+ if result:
202
+ print()
203
+ print("note: Run mypy again for up-to-date results with installed types")
204
+ code = 2
205
+
206
+ if options.fast_exit:
207
+ # Exit without freeing objects -- it's faster.
208
+ #
209
+ # NOTE: We don't flush all open files on exit (or run other destructors)!
210
+ util.hard_exit(code)
211
+ elif code:
212
+ sys.exit(code)
213
+
214
+ # HACK: keep res alive so that mypyc won't free it before the hard_exit
215
+ list([res]) # noqa: C410
216
+
217
+
218
+ class BuildResultThunk:
219
+ # We pass this around so that we avoid freeing memory, which is slow
220
+ def __init__(self, build_result: build.BuildResult | None) -> None:
221
+ self._result = build_result
222
+
223
+
224
+ def run_build(
225
+ sources: list[BuildSource],
226
+ options: Options,
227
+ fscache: FileSystemCache,
228
+ t0: float,
229
+ stdout: TextIO,
230
+ stderr: TextIO,
231
+ ) -> tuple[BuildResultThunk | None, list[str], bool]:
232
+ formatter = util.FancyFormatter(
233
+ stdout, stderr, options.hide_error_codes, hide_success=bool(options.output)
234
+ )
235
+
236
+ messages = []
237
+ messages_by_file = defaultdict(list)
238
+
239
+ def flush_errors(filename: str | None, new_messages: list[str], serious: bool) -> None:
240
+ if options.pretty:
241
+ new_messages = formatter.fit_in_terminal(new_messages)
242
+ messages.extend(new_messages)
243
+ if new_messages:
244
+ messages_by_file[filename].extend(new_messages)
245
+ if options.non_interactive:
246
+ # Collect messages and possibly show them later.
247
+ return
248
+ f = stderr if serious else stdout
249
+ show_messages(new_messages, f, formatter, options)
250
+
251
+ serious = False
252
+ blockers = False
253
+ res = None
254
+ try:
255
+ # Keep a dummy reference (res) for memory profiling afterwards, as otherwise
256
+ # the result could be freed.
257
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
258
+ except CompileError as e:
259
+ blockers = True
260
+ if not e.use_stdout:
261
+ serious = True
262
+
263
+ if res:
264
+ res.manager.metastore.close()
265
+
266
+ maybe_write_junit_xml(time.time() - t0, serious, messages, messages_by_file, options)
267
+ return BuildResultThunk(res), messages, blockers
268
+
269
+
270
+ def show_messages(
271
+ messages: list[str], f: TextIO, formatter: util.FancyFormatter, options: Options
272
+ ) -> None:
273
+ for msg in messages:
274
+ if options.color_output:
275
+ msg = formatter.colorize(msg)
276
+ f.write(msg + "\n")
277
+ f.flush()
278
+
279
+
280
+ # Make the help output a little less jarring.
281
+ class AugmentedHelpFormatter(argparse.RawDescriptionHelpFormatter):
282
+ def __init__(self, prog: str, **kwargs: Any) -> None:
283
+ super().__init__(prog=prog, max_help_position=28, **kwargs)
284
+
285
+ def _fill_text(self, text: str, width: int, indent: str) -> str:
286
+ if "\n" in text:
287
+ # Assume we want to manually format the text
288
+ return super()._fill_text(text, width, indent)
289
+ # Format the text like argparse, but overflow rather than
290
+ # breaking long words (like URLs)
291
+ text = self._whitespace_matcher.sub(" ", text).strip()
292
+ import textwrap
293
+
294
+ return textwrap.fill(
295
+ text,
296
+ width,
297
+ initial_indent=indent,
298
+ subsequent_indent=indent,
299
+ break_on_hyphens=False,
300
+ break_long_words=False,
301
+ )
302
+
303
+
304
+ # Define pairs of flag prefixes with inverse meaning.
305
+ flag_prefix_pairs: Final = [("allow", "disallow"), ("show", "hide")]
306
+ flag_prefix_map: Final[dict[str, str]] = {}
307
+ for a, b in flag_prefix_pairs:
308
+ flag_prefix_map[a] = b
309
+ flag_prefix_map[b] = a
310
+
311
+
312
+ def invert_flag_name(flag: str) -> str:
313
+ split = flag[2:].split("-", 1)
314
+ if len(split) == 2:
315
+ prefix, rest = split
316
+ if prefix in flag_prefix_map:
317
+ return f"--{flag_prefix_map[prefix]}-{rest}"
318
+ elif prefix == "no":
319
+ return f"--{rest}"
320
+
321
+ return f"--no-{flag[2:]}"
322
+
323
+
324
+ class PythonExecutableInferenceError(Exception):
325
+ """Represents a failure to infer the version or executable while searching."""
326
+
327
+
328
+ def python_executable_prefix(v: str) -> list[str]:
329
+ if sys.platform == "win32":
330
+ # on Windows, all Python executables are named `python`. To handle this, there
331
+ # is the `py` launcher, which can be passed a version e.g. `py -3.8`, and it will
332
+ # execute an installed Python 3.8 interpreter. See also:
333
+ # https://docs.python.org/3/using/windows.html#python-launcher-for-windows
334
+ return ["py", f"-{v}"]
335
+ else:
336
+ return [f"python{v}"]
337
+
338
+
339
+ def _python_executable_from_version(python_version: tuple[int, int]) -> str:
340
+ if sys.version_info[:2] == python_version:
341
+ return sys.executable
342
+ str_ver = ".".join(map(str, python_version))
343
+ try:
344
+ sys_exe = (
345
+ subprocess.check_output(
346
+ python_executable_prefix(str_ver) + ["-c", "import sys; print(sys.executable)"],
347
+ stderr=subprocess.STDOUT,
348
+ )
349
+ .decode()
350
+ .strip()
351
+ )
352
+ return sys_exe
353
+ except (subprocess.CalledProcessError, FileNotFoundError) as e:
354
+ raise PythonExecutableInferenceError(
355
+ "failed to find a Python executable matching version {},"
356
+ " perhaps try --python-executable, or --no-site-packages?".format(python_version)
357
+ ) from e
358
+
359
+
360
+ def infer_python_executable(options: Options, special_opts: argparse.Namespace) -> None:
361
+ """Infer the Python executable from the given version.
362
+
363
+ This function mutates options based on special_opts to infer the correct Python executable
364
+ to use.
365
+ """
366
+ # TODO: (ethanhs) Look at folding these checks and the site packages subprocess calls into
367
+ # one subprocess call for speed.
368
+
369
+ # Use the command line specified executable, or fall back to one set in the
370
+ # config file. If an executable is not specified, infer it from the version
371
+ # (unless no_executable is set)
372
+ python_executable = special_opts.python_executable or options.python_executable
373
+
374
+ if python_executable is None:
375
+ if not special_opts.no_executable and not options.no_site_packages:
376
+ python_executable = _python_executable_from_version(options.python_version)
377
+ options.python_executable = python_executable
378
+
379
+
380
+ HEADER: Final = """%(prog)s [-h] [-v] [-V] [more options; see below]
381
+ [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]"""
382
+
383
+
384
+ DESCRIPTION: Final = """
385
+ Mypy is a program that will type check your Python code.
386
+
387
+ Pass in any files or folders you want to type check. Mypy will
388
+ recursively traverse any provided folders to find .py files:
389
+
390
+ $ mypy my_program.py my_src_folder
391
+
392
+ For more information on getting started, see:
393
+
394
+ - https://mypy.readthedocs.io/en/stable/getting_started.html
395
+
396
+ For more details on both running mypy and using the flags below, see:
397
+
398
+ - https://mypy.readthedocs.io/en/stable/running_mypy.html
399
+ - https://mypy.readthedocs.io/en/stable/command_line.html
400
+
401
+ You can also use a config file to configure mypy instead of using
402
+ command line flags. For more details, see:
403
+
404
+ - https://mypy.readthedocs.io/en/stable/config_file.html
405
+ """
406
+
407
+ FOOTER: Final = """Environment variables:
408
+ Define MYPYPATH for additional module search path entries.
409
+ Define MYPY_CACHE_DIR to override configuration cache_dir path.
410
+ Define MYPY_NUM_WORKERS to override configuration num_workers value."""
411
+
412
+
413
+ class CapturableArgumentParser(argparse.ArgumentParser):
414
+ """Override ArgumentParser methods that use sys.stdout/sys.stderr directly.
415
+
416
+ This is needed because hijacking sys.std* is not thread-safe,
417
+ yet output must be captured to properly support mypy.api.run.
418
+ """
419
+
420
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
421
+ self.stdout = kwargs.pop("stdout", sys.stdout)
422
+ self.stderr = kwargs.pop("stderr", sys.stderr)
423
+ super().__init__(*args, **kwargs)
424
+
425
+ # =====================
426
+ # Help-printing methods
427
+ # =====================
428
+ def print_usage(self, file: SupportsWrite[str] | None = None) -> None:
429
+ if file is None:
430
+ file = self.stdout
431
+ self._print_message(self.format_usage(), file)
432
+
433
+ def print_help(self, file: SupportsWrite[str] | None = None) -> None:
434
+ if file is None:
435
+ file = self.stdout
436
+ self._print_message(self.format_help(), file)
437
+
438
+ def _print_message(self, message: str, file: SupportsWrite[str] | None = None) -> None:
439
+ if message:
440
+ if file is None:
441
+ file = self.stderr
442
+ file.write(message)
443
+
444
+ # ===============
445
+ # Exiting methods
446
+ # ===============
447
+ def exit(self, status: int = 0, message: str | None = None) -> NoReturn:
448
+ if message:
449
+ self._print_message(message, self.stderr)
450
+ sys.exit(status)
451
+
452
+ def error(self, message: str) -> NoReturn:
453
+ """error(message: string)
454
+
455
+ Prints a usage message incorporating the message to stderr and
456
+ exits.
457
+
458
+ If you override this in a subclass, it should not return -- it
459
+ should either exit or raise an exception.
460
+ """
461
+ self.print_usage(self.stderr)
462
+ args = {"prog": self.prog, "message": message}
463
+ self.exit(2, gettext("%(prog)s: error: %(message)s\n") % args)
464
+
465
+
466
+ class CapturableVersionAction(argparse.Action):
467
+ """Supplement CapturableArgumentParser to handle --version.
468
+
469
+ This is nearly identical to argparse._VersionAction except,
470
+ like CapturableArgumentParser, it allows output to be captured.
471
+
472
+ Another notable difference is that version is mandatory.
473
+ This allows removing a line in __call__ that falls back to parser.version
474
+ (which does not appear to exist).
475
+ """
476
+
477
+ def __init__(
478
+ self,
479
+ option_strings: Sequence[str],
480
+ version: str,
481
+ dest: str = argparse.SUPPRESS,
482
+ default: str = argparse.SUPPRESS,
483
+ help: str = "show program's version number and exit",
484
+ stdout: IO[str] | None = None,
485
+ ) -> None:
486
+ super().__init__(
487
+ option_strings=option_strings, dest=dest, default=default, nargs=0, help=help
488
+ )
489
+ self.version = version
490
+ self.stdout = stdout or sys.stdout
491
+
492
+ def __call__(
493
+ self,
494
+ parser: argparse.ArgumentParser,
495
+ namespace: argparse.Namespace,
496
+ values: str | Sequence[Any] | None,
497
+ option_string: str | None = None,
498
+ ) -> NoReturn:
499
+ formatter = parser._get_formatter()
500
+ formatter.add_text(self.version)
501
+ parser._print_message(formatter.format_help(), self.stdout)
502
+ parser.exit()
503
+
504
+
505
+ def define_options(
506
+ program: str = "mypy",
507
+ header: str = HEADER,
508
+ stdout: TextIO = sys.stdout,
509
+ stderr: TextIO = sys.stderr,
510
+ server_options: bool = False,
511
+ ) -> tuple[CapturableArgumentParser, list[str], list[tuple[str, bool]]]:
512
+ """Define the options in the parser (by calling a bunch of methods that express/build our desired command-line flags).
513
+ Returns a tuple of:
514
+ a parser object, that can parse command line arguments to mypy (expected consumer: main's process_options),
515
+ a list of what flags are strict (expected consumer: docs' html_builder's _add_strict_list),
516
+ strict_flag_assignments (expected consumer: main's process_options)."""
517
+ parser = CapturableArgumentParser(
518
+ prog=program,
519
+ usage=header,
520
+ description=DESCRIPTION,
521
+ epilog=FOOTER,
522
+ fromfile_prefix_chars="@",
523
+ formatter_class=AugmentedHelpFormatter,
524
+ add_help=False,
525
+ stdout=stdout,
526
+ stderr=stderr,
527
+ )
528
+
529
+ strict_flag_names: list[str] = []
530
+ strict_flag_assignments: list[tuple[str, bool]] = []
531
+
532
+ def add_invertible_flag(
533
+ flag: str,
534
+ *,
535
+ inverse: str | None = None,
536
+ default: bool,
537
+ dest: str | None = None,
538
+ help: str,
539
+ strict_flag: bool = False,
540
+ group: argparse._ActionsContainer | None = None,
541
+ ) -> None:
542
+ if inverse is None:
543
+ inverse = invert_flag_name(flag)
544
+ if group is None:
545
+ group = parser
546
+
547
+ if help is not argparse.SUPPRESS:
548
+ help += f" (inverse: {inverse})"
549
+
550
+ arg = group.add_argument(
551
+ flag, action="store_false" if default else "store_true", dest=dest, help=help
552
+ )
553
+ dest = arg.dest
554
+ group.add_argument(
555
+ inverse,
556
+ action="store_true" if default else "store_false",
557
+ dest=dest,
558
+ help=argparse.SUPPRESS,
559
+ )
560
+ if strict_flag:
561
+ assert dest is not None
562
+ strict_flag_names.append(flag)
563
+ strict_flag_assignments.append((dest, not default))
564
+
565
+ # Unless otherwise specified, arguments will be parsed directly onto an
566
+ # Options object. Options that require further processing should have
567
+ # their `dest` prefixed with `special-opts:`, which will cause them to be
568
+ # parsed into the separate special_opts namespace object.
569
+
570
+ # Our style guide for formatting the output of running `mypy --help`:
571
+ # Flags:
572
+ # 1. The flag help text should start with a capital letter but never end with a period.
573
+ # 2. Keep the flag help text brief -- ideally just a single sentence.
574
+ # 3. All flags must be a part of a group, unless the flag is deprecated or suppressed.
575
+ # 4. Avoid adding new flags to the "miscellaneous" groups -- instead add them to an
576
+ # existing group or, if applicable, create a new group. Feel free to move existing
577
+ # flags to a new group: just be sure to also update the documentation to match.
578
+ #
579
+ # Groups:
580
+ # 1. The group title and description should start with a capital letter.
581
+ # 2. The first sentence of a group description should be written in the bare infinitive.
582
+ # Tip: try substituting the group title and description into the following sentence:
583
+ # > {group_title}: these flags will {group_description}
584
+ # Feel free to add subsequent sentences that add additional details.
585
+ # 3. If you cannot think of a meaningful description for a new group, omit it entirely.
586
+ # (E.g. see the "miscellaneous" sections).
587
+ # 4. The text of the group description should end with a period, optionally followed
588
+ # by a documentation reference (URL).
589
+ # 5. If you want to include a documentation reference, place it at the end of the
590
+ # description. Feel free to open with a brief reference ("See also:", "For more
591
+ # information:", etc.), followed by a space, then the entire URL including
592
+ # "https://" scheme identifier and fragment ("#some-target-heading"), if any.
593
+ # Do not end with a period (or any other characters not part of the URL).
594
+ # URLs longer than the available terminal width will overflow without being
595
+ # broken apart. This facilitates both URL detection, and manual copy-pasting.
596
+
597
+ general_group = parser.add_argument_group(title="Optional arguments")
598
+ general_group.add_argument(
599
+ "-h", "--help", action="help", help="Show this help message and exit"
600
+ )
601
+ general_group.add_argument(
602
+ "-v", "--verbose", action="count", dest="verbosity", help="More verbose messages"
603
+ )
604
+
605
+ compilation_status = "no" if __file__.endswith(".py") else "yes"
606
+ general_group.add_argument(
607
+ "-V",
608
+ "--version",
609
+ action=CapturableVersionAction,
610
+ version="%(prog)s " + __version__ + f" (compiled: {compilation_status})",
611
+ help="Show program's version number and exit",
612
+ stdout=stdout,
613
+ )
614
+
615
+ general_group.add_argument(
616
+ "-O",
617
+ "--output",
618
+ metavar="FORMAT",
619
+ help="Set a custom output format",
620
+ choices=OUTPUT_CHOICES,
621
+ )
622
+
623
+ config_group = parser.add_argument_group(
624
+ title="Config file",
625
+ description="Use a config file instead of command line arguments. "
626
+ "This is useful if you are using many flags or want "
627
+ "to set different options per each module.",
628
+ )
629
+ config_group.add_argument(
630
+ "--config-file",
631
+ help=(
632
+ f"Configuration file, must have a [mypy] section "
633
+ f"(defaults to {', '.join(defaults.CONFIG_NAMES + defaults.SHARED_CONFIG_NAMES)})"
634
+ ),
635
+ )
636
+ add_invertible_flag(
637
+ "--warn-unused-configs",
638
+ default=False,
639
+ help="Warn about unused '[mypy-<pattern>]' or '[[tool.mypy.overrides]]' config sections",
640
+ group=config_group,
641
+ )
642
+
643
+ imports_group = parser.add_argument_group(
644
+ title="Import discovery", description="Configure how imports are discovered and followed."
645
+ )
646
+ add_invertible_flag(
647
+ "--no-namespace-packages",
648
+ dest="namespace_packages",
649
+ default=True,
650
+ help="Disable support for namespace packages (PEP 420, __init__.py-less)",
651
+ group=imports_group,
652
+ )
653
+ imports_group.add_argument(
654
+ "--ignore-missing-imports",
655
+ action="store_true",
656
+ help="Silently ignore imports of missing modules",
657
+ )
658
+ imports_group.add_argument(
659
+ "--follow-untyped-imports",
660
+ action="store_true",
661
+ help="Typecheck modules without stubs or py.typed marker",
662
+ )
663
+ imports_group.add_argument(
664
+ "--follow-imports",
665
+ choices=["normal", "silent", "skip", "error"],
666
+ default="normal",
667
+ help="How to treat imports (default normal)",
668
+ )
669
+ imports_group.add_argument(
670
+ "--python-executable",
671
+ action="store",
672
+ metavar="EXECUTABLE",
673
+ help="Python executable used for finding PEP 561 compliant installed packages and stubs",
674
+ dest="special-opts:python_executable",
675
+ )
676
+ imports_group.add_argument(
677
+ "--no-site-packages",
678
+ action="store_true",
679
+ dest="special-opts:no_executable",
680
+ help="Do not search for installed PEP 561 compliant packages",
681
+ )
682
+ imports_group.add_argument(
683
+ "--no-silence-site-packages",
684
+ action="store_true",
685
+ help="Do not silence errors in PEP 561 compliant installed packages",
686
+ )
687
+
688
+ platform_group = parser.add_argument_group(
689
+ title="Platform configuration",
690
+ description="Type check code assuming it will be run under certain "
691
+ "runtime conditions. By default, mypy assumes your code "
692
+ "will be run using the same operating system and Python "
693
+ "version you are using to run mypy itself.",
694
+ )
695
+ platform_group.add_argument(
696
+ "--python-version",
697
+ type=parse_version,
698
+ metavar="x.y",
699
+ help="Type check code assuming it will be running on Python x.y",
700
+ dest="special-opts:python_version",
701
+ )
702
+ platform_group.add_argument(
703
+ "--platform",
704
+ action="store",
705
+ metavar="PLATFORM",
706
+ help="Type check special-cased code for the given OS platform (defaults to sys.platform)",
707
+ )
708
+ platform_group.add_argument(
709
+ "--always-true",
710
+ metavar="NAME",
711
+ action="append",
712
+ default=[],
713
+ help="Additional variable to be considered True (may be repeated)",
714
+ )
715
+ platform_group.add_argument(
716
+ "--always-false",
717
+ metavar="NAME",
718
+ action="append",
719
+ default=[],
720
+ help="Additional variable to be considered False (may be repeated)",
721
+ )
722
+
723
+ disallow_any_group = parser.add_argument_group(
724
+ title="Disallow dynamic typing",
725
+ description="Disallow the use of the dynamic 'Any' type under certain conditions.",
726
+ )
727
+ disallow_any_group.add_argument(
728
+ "--disallow-any-expr",
729
+ default=False,
730
+ action="store_true",
731
+ help="Disallow all expressions that have type Any",
732
+ )
733
+ disallow_any_group.add_argument(
734
+ "--disallow-any-decorated",
735
+ default=False,
736
+ action="store_true",
737
+ help="Disallow functions that have Any in their signature after decorator transformation",
738
+ )
739
+ disallow_any_group.add_argument(
740
+ "--disallow-any-explicit",
741
+ default=False,
742
+ action="store_true",
743
+ help="Disallow explicit Any in type positions",
744
+ )
745
+ add_invertible_flag(
746
+ "--disallow-any-generics",
747
+ default=False,
748
+ strict_flag=True,
749
+ help="Disallow usage of generic types that do not specify explicit type parameters",
750
+ group=disallow_any_group,
751
+ )
752
+ add_invertible_flag(
753
+ "--disallow-any-unimported",
754
+ default=False,
755
+ help="Disallow Any types resulting from unfollowed imports",
756
+ group=disallow_any_group,
757
+ )
758
+ add_invertible_flag(
759
+ "--disallow-subclassing-any",
760
+ default=False,
761
+ strict_flag=True,
762
+ help="Disallow subclassing values of type 'Any' when defining classes",
763
+ group=disallow_any_group,
764
+ )
765
+
766
+ untyped_group = parser.add_argument_group(
767
+ title="Untyped definitions and calls",
768
+ description="Configure how untyped definitions and calls are handled. "
769
+ "Note: by default, mypy ignores any untyped function definitions "
770
+ "and assumes any calls to such functions have a return "
771
+ "type of 'Any'.",
772
+ )
773
+ add_invertible_flag(
774
+ "--disallow-untyped-calls",
775
+ default=False,
776
+ strict_flag=True,
777
+ help="Disallow calling functions without type annotations"
778
+ " from functions with type annotations",
779
+ group=untyped_group,
780
+ )
781
+ untyped_group.add_argument(
782
+ "--untyped-calls-exclude",
783
+ metavar="MODULE",
784
+ action="append",
785
+ default=[],
786
+ help="Disable --disallow-untyped-calls for functions/methods coming"
787
+ " from specific package, module, or class",
788
+ )
789
+ add_invertible_flag(
790
+ "--disallow-untyped-defs",
791
+ default=False,
792
+ strict_flag=True,
793
+ help="Disallow defining functions without type annotations"
794
+ " or with incomplete type annotations",
795
+ group=untyped_group,
796
+ )
797
+ add_invertible_flag(
798
+ "--disallow-incomplete-defs",
799
+ default=False,
800
+ strict_flag=True,
801
+ help="Disallow defining functions with incomplete type annotations "
802
+ "(while still allowing entirely unannotated definitions)",
803
+ group=untyped_group,
804
+ )
805
+ add_invertible_flag(
806
+ "--check-untyped-defs",
807
+ default=False,
808
+ strict_flag=True,
809
+ help="Type check the interior of functions without type annotations",
810
+ group=untyped_group,
811
+ )
812
+ add_invertible_flag(
813
+ "--disallow-untyped-decorators",
814
+ default=False,
815
+ strict_flag=True,
816
+ help="Disallow decorating typed functions with untyped decorators",
817
+ group=untyped_group,
818
+ )
819
+
820
+ none_group = parser.add_argument_group(
821
+ title="None and Optional handling",
822
+ description="Adjust how values of type 'None' are handled. For more context on "
823
+ "how mypy handles values of type 'None', see: "
824
+ "https://mypy.readthedocs.io/en/stable/kinds_of_types.html#optional-types-and-the-none-type",
825
+ )
826
+ add_invertible_flag(
827
+ "--implicit-optional",
828
+ default=False,
829
+ help="Assume arguments with default values of None are Optional",
830
+ group=none_group,
831
+ )
832
+ none_group.add_argument("--strict-optional", action="store_true", help=argparse.SUPPRESS)
833
+ none_group.add_argument(
834
+ "--no-strict-optional",
835
+ action="store_false",
836
+ dest="strict_optional",
837
+ help="Disable strict Optional checks (inverse: --strict-optional)",
838
+ )
839
+
840
+ lint_group = parser.add_argument_group(
841
+ title="Configuring warnings",
842
+ description="Detect code that is sound but redundant or problematic.",
843
+ )
844
+ add_invertible_flag(
845
+ "--warn-redundant-casts",
846
+ default=False,
847
+ strict_flag=True,
848
+ help="Warn about casting an expression to its inferred type",
849
+ group=lint_group,
850
+ )
851
+ add_invertible_flag(
852
+ "--warn-unused-ignores",
853
+ default=False,
854
+ strict_flag=True,
855
+ help="Warn about unneeded '# type: ignore' comments",
856
+ group=lint_group,
857
+ )
858
+ add_invertible_flag(
859
+ "--no-warn-no-return",
860
+ dest="warn_no_return",
861
+ default=True,
862
+ help="Do not warn about functions that end without returning",
863
+ group=lint_group,
864
+ )
865
+ add_invertible_flag(
866
+ "--warn-return-any",
867
+ default=False,
868
+ strict_flag=True,
869
+ help="Warn about returning values of type Any from non-Any typed functions",
870
+ group=lint_group,
871
+ )
872
+ add_invertible_flag(
873
+ "--warn-unreachable",
874
+ default=False,
875
+ strict_flag=False,
876
+ help="Warn about statements or expressions inferred to be unreachable",
877
+ group=lint_group,
878
+ )
879
+ add_invertible_flag(
880
+ "--report-deprecated-as-note",
881
+ default=False,
882
+ strict_flag=False,
883
+ help="Report importing or using deprecated features as notes instead of errors",
884
+ group=lint_group,
885
+ )
886
+ lint_group.add_argument(
887
+ "--deprecated-calls-exclude",
888
+ metavar="MODULE",
889
+ action="append",
890
+ default=[],
891
+ help="Disable deprecated warnings for functions/methods coming"
892
+ " from specific package, module, or class",
893
+ )
894
+
895
+ # Note: this group is intentionally added here even though we don't add
896
+ # --strict to this group near the end.
897
+ #
898
+ # That way, this group will appear after the various strictness groups
899
+ # but before the remaining flags.
900
+ # We add `--strict` near the end so we don't accidentally miss any strictness
901
+ # flags that are added after this group.
902
+ strictness_group = parser.add_argument_group(title="Miscellaneous strictness flags")
903
+
904
+ add_invertible_flag(
905
+ "--allow-untyped-globals",
906
+ default=False,
907
+ strict_flag=False,
908
+ help="Suppress toplevel errors caused by missing annotations",
909
+ group=strictness_group,
910
+ )
911
+
912
+ add_invertible_flag(
913
+ "--allow-redefinition",
914
+ default=False,
915
+ strict_flag=False,
916
+ help="Allow flexible variable redefinition with a new type",
917
+ group=strictness_group,
918
+ )
919
+
920
+ add_invertible_flag(
921
+ "--allow-redefinition-old",
922
+ default=False,
923
+ strict_flag=False,
924
+ help="Allow restricted, unconditional variable redefinition with a new type",
925
+ group=strictness_group,
926
+ )
927
+
928
+ add_invertible_flag(
929
+ "--allow-redefinition-new",
930
+ default=False,
931
+ strict_flag=False,
932
+ help="Deprecated alias for --allow-redefinition",
933
+ group=strictness_group,
934
+ dest="allow_redefinition",
935
+ )
936
+
937
+ add_invertible_flag(
938
+ "--no-implicit-reexport",
939
+ default=True,
940
+ strict_flag=True,
941
+ dest="implicit_reexport",
942
+ help="Treat imports as private unless aliased",
943
+ group=strictness_group,
944
+ )
945
+
946
+ add_invertible_flag(
947
+ "--strict-equality",
948
+ default=False,
949
+ strict_flag=True,
950
+ help="Prohibit equality, identity, and container checks for non-overlapping types "
951
+ "(except `None`)",
952
+ group=strictness_group,
953
+ )
954
+
955
+ add_invertible_flag(
956
+ "--strict-equality-for-none",
957
+ default=False,
958
+ strict_flag=False,
959
+ help="Extend `--strict-equality` for `None` checks",
960
+ group=strictness_group,
961
+ )
962
+
963
+ add_invertible_flag(
964
+ "--no-strict-bytes",
965
+ default=True,
966
+ dest="strict_bytes",
967
+ help="Treat bytearray and memoryview as subtypes of bytes",
968
+ group=strictness_group,
969
+ )
970
+
971
+ add_invertible_flag(
972
+ "--extra-checks",
973
+ default=False,
974
+ strict_flag=True,
975
+ help="Enable additional checks that are technically correct but may be impractical "
976
+ "in real code. For example, this prohibits partial overlap in TypedDict updates, "
977
+ "and makes arguments prepended via Concatenate positional-only",
978
+ group=strictness_group,
979
+ )
980
+
981
+ add_invertible_flag(
982
+ "--check-unreachable",
983
+ default=False,
984
+ help=argparse.SUPPRESS, # "Type check unreachable code",
985
+ group=strictness_group,
986
+ )
987
+
988
+ strict_help = "Strict mode; enables the following flags: {}".format(
989
+ ", ".join(strict_flag_names)
990
+ )
991
+ strictness_group.add_argument(
992
+ "--strict", action="store_true", dest="special-opts:strict", help=strict_help
993
+ )
994
+
995
+ strictness_group.add_argument(
996
+ "--disable-error-code",
997
+ metavar="NAME",
998
+ action="append",
999
+ default=[],
1000
+ help="Disable a specific error code",
1001
+ )
1002
+ strictness_group.add_argument(
1003
+ "--enable-error-code",
1004
+ metavar="NAME",
1005
+ action="append",
1006
+ default=[],
1007
+ help="Enable a specific error code",
1008
+ )
1009
+
1010
+ error_group = parser.add_argument_group(
1011
+ title="Configuring error messages",
1012
+ description="Adjust the amount of detail shown in error messages.",
1013
+ )
1014
+ add_invertible_flag(
1015
+ "--show-error-context",
1016
+ default=False,
1017
+ dest="show_error_context",
1018
+ help='Precede errors with "note:" messages explaining context',
1019
+ group=error_group,
1020
+ )
1021
+ add_invertible_flag(
1022
+ "--show-column-numbers",
1023
+ default=False,
1024
+ help="Show column numbers in error messages",
1025
+ group=error_group,
1026
+ )
1027
+ add_invertible_flag(
1028
+ "--show-error-end",
1029
+ default=False,
1030
+ help="Show end line/end column numbers in error messages."
1031
+ " This implies --show-column-numbers",
1032
+ group=error_group,
1033
+ )
1034
+ add_invertible_flag(
1035
+ "--hide-error-codes",
1036
+ default=False,
1037
+ help="Hide error codes in error messages",
1038
+ group=error_group,
1039
+ )
1040
+ add_invertible_flag(
1041
+ "--show-error-code-links",
1042
+ default=False,
1043
+ help="Show links to error code documentation",
1044
+ group=error_group,
1045
+ )
1046
+ add_invertible_flag(
1047
+ "--pretty",
1048
+ default=False,
1049
+ help="Use visually nicer output in error messages:"
1050
+ " Use soft word wrap, show source code snippets,"
1051
+ " and show error location markers",
1052
+ group=error_group,
1053
+ )
1054
+ add_invertible_flag(
1055
+ "--no-color-output",
1056
+ dest="color_output",
1057
+ default=True,
1058
+ help="Do not colorize error messages",
1059
+ group=error_group,
1060
+ )
1061
+ add_invertible_flag(
1062
+ "--no-error-summary",
1063
+ dest="error_summary",
1064
+ default=True,
1065
+ help="Do not show error stats summary",
1066
+ group=error_group,
1067
+ )
1068
+ add_invertible_flag(
1069
+ "--show-absolute-path",
1070
+ default=False,
1071
+ help="Show absolute paths to files",
1072
+ group=error_group,
1073
+ )
1074
+ error_group.add_argument(
1075
+ "--soft-error-limit",
1076
+ default=defaults.MANY_ERRORS_THRESHOLD,
1077
+ type=int,
1078
+ dest="many_errors_threshold",
1079
+ help=argparse.SUPPRESS,
1080
+ )
1081
+
1082
+ incremental_group = parser.add_argument_group(
1083
+ title="Incremental mode",
1084
+ description="Adjust how mypy incrementally type checks and caches modules. "
1085
+ "Mypy caches type information about modules into a cache to "
1086
+ "let you speed up future invocations of mypy. Also see "
1087
+ "mypy's daemon mode: "
1088
+ "https://mypy.readthedocs.io/en/stable/mypy_daemon.html#mypy-daemon",
1089
+ )
1090
+ incremental_group.add_argument(
1091
+ "-i", "--incremental", action="store_true", help=argparse.SUPPRESS
1092
+ )
1093
+ incremental_group.add_argument(
1094
+ "--no-incremental",
1095
+ action="store_false",
1096
+ dest="incremental",
1097
+ help="Disable module cache (inverse: --incremental)",
1098
+ )
1099
+ incremental_group.add_argument(
1100
+ "--cache-dir",
1101
+ action="store",
1102
+ metavar="DIR",
1103
+ help="Store module cache info in the given folder in incremental mode "
1104
+ "(defaults to '{}')".format(defaults.CACHE_DIR),
1105
+ )
1106
+ add_invertible_flag(
1107
+ "--sqlite-cache",
1108
+ default=False,
1109
+ help="Use a sqlite database to store the cache",
1110
+ group=incremental_group,
1111
+ )
1112
+ incremental_group.add_argument(
1113
+ "--sqlite-num-shards",
1114
+ type=int,
1115
+ default=defaults.SQLITE_NUM_SHARDS,
1116
+ dest="sqlite_num_shards",
1117
+ help=argparse.SUPPRESS,
1118
+ )
1119
+ incremental_group.add_argument(
1120
+ "--cache-fine-grained",
1121
+ action="store_true",
1122
+ help="Include fine-grained dependency information in the cache for the mypy daemon",
1123
+ )
1124
+ add_invertible_flag(
1125
+ "--no-fixed-format-cache",
1126
+ dest="fixed_format_cache",
1127
+ default=True,
1128
+ help="Do not use new fixed format cache",
1129
+ group=incremental_group,
1130
+ )
1131
+ incremental_group.add_argument(
1132
+ "--skip-version-check",
1133
+ action="store_true",
1134
+ help="Allow using cache written by older mypy version",
1135
+ )
1136
+ incremental_group.add_argument(
1137
+ "--skip-cache-mtime-checks",
1138
+ action="store_true",
1139
+ help="Skip cache internal consistency checks based on mtime",
1140
+ )
1141
+
1142
+ internals_group = parser.add_argument_group(
1143
+ title="Advanced options", description="Debug and customize mypy internals."
1144
+ )
1145
+ internals_group.add_argument("--pdb", action="store_true", help="Invoke pdb on fatal error")
1146
+ internals_group.add_argument(
1147
+ "--show-traceback", "--tb", action="store_true", help="Show traceback on fatal error"
1148
+ )
1149
+ internals_group.add_argument(
1150
+ "--raise-exceptions", action="store_true", help="Raise exception on fatal error"
1151
+ )
1152
+ internals_group.add_argument(
1153
+ "--custom-typing-module",
1154
+ metavar="MODULE",
1155
+ dest="custom_typing_module",
1156
+ help="Use a custom typing module",
1157
+ )
1158
+ internals_group.add_argument(
1159
+ "--old-type-inference", action="store_true", help=argparse.SUPPRESS
1160
+ )
1161
+ internals_group.add_argument(
1162
+ "--disable-expression-cache", action="store_true", help=argparse.SUPPRESS
1163
+ )
1164
+ parser.add_argument(
1165
+ "--enable-incomplete-feature",
1166
+ action="append",
1167
+ metavar="{" + ",".join(sorted(INCOMPLETE_FEATURES)) + "}",
1168
+ help="Enable support of incomplete/experimental features for early preview",
1169
+ )
1170
+ internals_group.add_argument(
1171
+ "--custom-typeshed-dir", metavar="DIR", help="Use the custom typeshed in DIR"
1172
+ )
1173
+ add_invertible_flag(
1174
+ "--warn-incomplete-stub",
1175
+ default=False,
1176
+ help="Warn if missing type annotation in typeshed, only relevant with"
1177
+ " --disallow-untyped-defs or --disallow-incomplete-defs enabled",
1178
+ group=internals_group,
1179
+ )
1180
+ internals_group.add_argument(
1181
+ "--shadow-file",
1182
+ nargs=2,
1183
+ metavar=("SOURCE_FILE", "SHADOW_FILE"),
1184
+ dest="shadow_file",
1185
+ action="append",
1186
+ help="When encountering SOURCE_FILE, read and type check "
1187
+ "the contents of SHADOW_FILE instead.",
1188
+ )
1189
+ internals_group.add_argument("--fast-exit", action="store_true", help=argparse.SUPPRESS)
1190
+ internals_group.add_argument(
1191
+ "--no-fast-exit", action="store_false", dest="fast_exit", help=argparse.SUPPRESS
1192
+ )
1193
+ # This flag is useful for mypy tests, where function bodies may be omitted. Plugin developers
1194
+ # may want to use this as well in their tests.
1195
+ add_invertible_flag(
1196
+ "--allow-empty-bodies", default=False, help=argparse.SUPPRESS, group=internals_group
1197
+ )
1198
+ # This undocumented feature exports limited line-level dependency information.
1199
+ internals_group.add_argument("--export-ref-info", action="store_true", help=argparse.SUPPRESS)
1200
+
1201
+ # Parallel type-checking support.
1202
+ internals_group.add_argument(
1203
+ "-n",
1204
+ "--num-workers",
1205
+ type=parse_num_workers,
1206
+ metavar="VALUE",
1207
+ default=0,
1208
+ help="Number of separate mypy worker processes, or 'auto'",
1209
+ )
1210
+
1211
+ report_group = parser.add_argument_group(
1212
+ title="Report generation", description="Generate a report in the specified format."
1213
+ )
1214
+ for report_type in sorted(defaults.REPORTER_NAMES):
1215
+ if report_type not in {"memory-xml"}:
1216
+ report_group.add_argument(
1217
+ f"--{report_type.replace('_', '-')}-report",
1218
+ metavar="DIR",
1219
+ dest=f"special-opts:{report_type}_report",
1220
+ )
1221
+
1222
+ # Undocumented mypyc feature: generate annotated HTML source file
1223
+ report_group.add_argument(
1224
+ "-a", dest="mypyc_annotation_file", type=str, default=None, help=argparse.SUPPRESS
1225
+ )
1226
+ # Hidden mypyc feature: do not write any C files (keep existing ones and assume they exist).
1227
+ # This can be useful when debugging mypyc bugs.
1228
+ report_group.add_argument(
1229
+ "--skip-c-gen", dest="mypyc_skip_c_generation", action="store_true", help=argparse.SUPPRESS
1230
+ )
1231
+
1232
+ misc_group = parser.add_argument_group(title="Miscellaneous")
1233
+ misc_group.add_argument("--quickstart-file", help=argparse.SUPPRESS)
1234
+ misc_group.add_argument(
1235
+ "--junit-xml",
1236
+ metavar="JUNIT_XML_OUTPUT_FILE",
1237
+ help="Write a JUnit XML test result document with type checking results to the given file",
1238
+ )
1239
+ misc_group.add_argument(
1240
+ "--junit-format",
1241
+ choices=["global", "per_file"],
1242
+ default="global",
1243
+ help="If --junit-xml is set, specifies format. global (default): single test with all errors; per_file: one test entry per file with failures",
1244
+ )
1245
+ misc_group.add_argument(
1246
+ "--find-occurrences",
1247
+ metavar="CLASS.MEMBER",
1248
+ dest="special-opts:find_occurrences",
1249
+ help="Print out all usages of a class member (experimental)",
1250
+ )
1251
+ misc_group.add_argument(
1252
+ "--scripts-are-modules",
1253
+ action="store_true",
1254
+ help="Script x becomes module x instead of __main__",
1255
+ )
1256
+
1257
+ add_invertible_flag(
1258
+ "--install-types",
1259
+ default=False,
1260
+ strict_flag=False,
1261
+ help="Install detected missing library stub packages using pip",
1262
+ group=misc_group,
1263
+ )
1264
+ add_invertible_flag(
1265
+ "--non-interactive",
1266
+ default=False,
1267
+ strict_flag=False,
1268
+ help=(
1269
+ "Install stubs without asking for confirmation and hide "
1270
+ + "errors, with --install-types"
1271
+ ),
1272
+ group=misc_group,
1273
+ inverse="--interactive",
1274
+ )
1275
+
1276
+ if server_options:
1277
+ misc_group.add_argument(
1278
+ "--use-fine-grained-cache",
1279
+ action="store_true",
1280
+ help="Use the cache in fine-grained incremental mode",
1281
+ )
1282
+
1283
+ # hidden options
1284
+ parser.add_argument(
1285
+ "--stats", action="store_true", dest="dump_type_stats", help=argparse.SUPPRESS
1286
+ )
1287
+ parser.add_argument(
1288
+ "--inferstats", action="store_true", dest="dump_inference_stats", help=argparse.SUPPRESS
1289
+ )
1290
+ parser.add_argument("--dump-build-stats", action="store_true", help=argparse.SUPPRESS)
1291
+ # Dump timing stats for each processed file into the given output file
1292
+ parser.add_argument("--timing-stats", dest="timing_stats", help=argparse.SUPPRESS)
1293
+ # Dump per line type checking timing stats for each processed file into the given
1294
+ # output file. Only total time spent in each top level expression will be shown.
1295
+ # Times are show in microseconds.
1296
+ parser.add_argument(
1297
+ "--line-checking-stats", dest="line_checking_stats", help=argparse.SUPPRESS
1298
+ )
1299
+ # --debug-cache will disable any cache-related compressions/optimizations,
1300
+ # which will make the cache writing process output pretty-printed JSON (which
1301
+ # is easier to debug).
1302
+ parser.add_argument("--debug-cache", action="store_true", help=argparse.SUPPRESS)
1303
+ # --dump-deps will dump all fine-grained dependencies to stdout
1304
+ parser.add_argument("--dump-deps", action="store_true", help=argparse.SUPPRESS)
1305
+ # --dump-graph will dump the contents of the graph of SCCs and exit.
1306
+ parser.add_argument("--dump-graph", action="store_true", help=argparse.SUPPRESS)
1307
+ # --semantic-analysis-only does exactly that.
1308
+ parser.add_argument("--semantic-analysis-only", action="store_true", help=argparse.SUPPRESS)
1309
+ # Some tests use this to tell mypy that we are running a test.
1310
+ parser.add_argument("--test-env", action="store_true", help=argparse.SUPPRESS)
1311
+ # --local-partial-types disallows partial types spanning module top level and a function
1312
+ # (implicitly defined in fine-grained incremental mode)
1313
+ add_invertible_flag(
1314
+ "--no-local-partial-types",
1315
+ inverse="--local-partial-types",
1316
+ default=True,
1317
+ dest="local_partial_types",
1318
+ help=argparse.SUPPRESS,
1319
+ )
1320
+ add_invertible_flag(
1321
+ "--no-native-parser",
1322
+ default=True,
1323
+ dest="native_parser",
1324
+ help="Do not use faster parser that parses directly to mypy AST",
1325
+ )
1326
+ # --logical-deps adds some more dependencies that are not semantically needed, but
1327
+ # may be helpful to determine relative importance of classes and functions for overall
1328
+ # type precision in a code base. It also _removes_ some deps, so this flag should be never
1329
+ # used except for generating code stats. This also automatically enables --cache-fine-grained.
1330
+ # NOTE: This is an experimental option that may be modified or removed at any time.
1331
+ parser.add_argument("--logical-deps", action="store_true", help=argparse.SUPPRESS)
1332
+ # --bazel changes some behaviors for use with Bazel (https://bazel.build).
1333
+ parser.add_argument("--bazel", action="store_true", help=argparse.SUPPRESS)
1334
+ # --package-root adds a directory below which directories are considered
1335
+ # packages even without __init__.py. May be repeated.
1336
+ parser.add_argument(
1337
+ "--package-root", metavar="ROOT", action="append", default=[], help=argparse.SUPPRESS
1338
+ )
1339
+ # --cache-map FILE ... gives a mapping from source files to cache files.
1340
+ # Each triple of arguments is a source file, a cache meta file, and a cache data file.
1341
+ # Modules not mentioned in the file will go through cache_dir.
1342
+ # Must be followed by another flag or by '--' (and then only file args may follow).
1343
+ parser.add_argument(
1344
+ "--cache-map", nargs="+", dest="special-opts:cache_map", help=argparse.SUPPRESS
1345
+ )
1346
+ # --debug-serialize will run tree.serialize() even if cache generation is disabled.
1347
+ # Useful for mypy_primer to detect serialize errors earlier.
1348
+ parser.add_argument("--debug-serialize", action="store_true", help=argparse.SUPPRESS)
1349
+
1350
+ parser.add_argument(
1351
+ "--disable-bytearray-promotion", action="store_true", help=argparse.SUPPRESS
1352
+ )
1353
+ parser.add_argument(
1354
+ "--disable-memoryview-promotion", action="store_true", help=argparse.SUPPRESS
1355
+ )
1356
+ # This flag is deprecated, it has been moved to --extra-checks
1357
+ parser.add_argument("--strict-concatenate", action="store_true", help=argparse.SUPPRESS)
1358
+
1359
+ # options specifying code to check
1360
+ code_group = parser.add_argument_group(
1361
+ title="Running code",
1362
+ description="Specify the code you want to type check. For more details, see "
1363
+ "https://mypy.readthedocs.io/en/stable/running_mypy.html#running-mypy",
1364
+ )
1365
+ add_invertible_flag(
1366
+ "--explicit-package-bases",
1367
+ default=False,
1368
+ help="Use current directory and MYPYPATH to determine module names of files passed",
1369
+ group=code_group,
1370
+ )
1371
+ add_invertible_flag(
1372
+ "--fast-module-lookup", default=False, help=argparse.SUPPRESS, group=code_group
1373
+ )
1374
+ code_group.add_argument(
1375
+ "--exclude",
1376
+ action="append",
1377
+ metavar="PATTERN",
1378
+ default=[],
1379
+ help=(
1380
+ "Regular expression to match file names, directory names or paths which mypy should "
1381
+ "ignore while recursively discovering files to check, e.g. --exclude '/setup\\.py$'. "
1382
+ "May be specified more than once, eg. --exclude a --exclude b"
1383
+ ),
1384
+ )
1385
+ add_invertible_flag(
1386
+ "--exclude-gitignore",
1387
+ default=False,
1388
+ help=(
1389
+ "Use .gitignore file(s) to exclude files from checking "
1390
+ "(in addition to any explicit --exclude if present)"
1391
+ ),
1392
+ group=code_group,
1393
+ )
1394
+ code_group.add_argument(
1395
+ "-m",
1396
+ "--module",
1397
+ action="append",
1398
+ metavar="MODULE",
1399
+ default=[],
1400
+ dest="special-opts:modules",
1401
+ help="Type-check module; can repeat for more modules",
1402
+ )
1403
+ code_group.add_argument(
1404
+ "-p",
1405
+ "--package",
1406
+ action="append",
1407
+ metavar="PACKAGE",
1408
+ default=[],
1409
+ dest="special-opts:packages",
1410
+ help="Type-check package recursively; can be repeated",
1411
+ )
1412
+ code_group.add_argument(
1413
+ "-c",
1414
+ "--command",
1415
+ action="append",
1416
+ metavar="PROGRAM_TEXT",
1417
+ dest="special-opts:command",
1418
+ help="Type-check program passed in as string",
1419
+ )
1420
+ code_group.add_argument(
1421
+ metavar="files",
1422
+ nargs="*",
1423
+ dest="special-opts:files",
1424
+ help="Type-check given files or directories",
1425
+ )
1426
+ return parser, strict_flag_names, strict_flag_assignments
1427
+
1428
+
1429
+ def process_options(
1430
+ args: list[str],
1431
+ stdout: TextIO | None = None,
1432
+ stderr: TextIO | None = None,
1433
+ require_targets: bool = True,
1434
+ server_options: bool = False,
1435
+ fscache: FileSystemCache | None = None,
1436
+ program: str = "mypy",
1437
+ header: str = HEADER,
1438
+ mypyc: bool = False,
1439
+ ) -> tuple[list[BuildSource], Options]:
1440
+ """Parse command line arguments.
1441
+
1442
+ If a FileSystemCache is passed in, and package_root options are given,
1443
+ call fscache.set_package_root() to set the cache's package root.
1444
+
1445
+ Returns a tuple of: a list of source files, an Options collected from flags.
1446
+ """
1447
+ stdout = stdout if stdout is not None else sys.stdout
1448
+ stderr = stderr if stderr is not None else sys.stderr
1449
+
1450
+ parser, _, strict_flag_assignments = define_options(
1451
+ program, header, stdout, stderr, server_options
1452
+ )
1453
+
1454
+ # Parse arguments once into a dummy namespace so we can get the
1455
+ # filename for the config file and know if the user requested all strict options.
1456
+ dummy = argparse.Namespace()
1457
+ parser.parse_args(args, dummy)
1458
+ config_file = dummy.config_file
1459
+ # Don't explicitly test if "config_file is not None" for this check.
1460
+ # This lets `--config-file=` (an empty string) be used to disable all config files.
1461
+ if config_file and not os.path.exists(config_file):
1462
+ parser.error(f"Cannot find config file '{config_file}'")
1463
+
1464
+ options = Options()
1465
+ strict_option_set = False
1466
+ if mypyc:
1467
+ # Mypyc has strict_bytes enabled by default
1468
+ options.strict_bytes = True
1469
+
1470
+ def set_strict_flags() -> None:
1471
+ nonlocal strict_option_set
1472
+ strict_option_set = True
1473
+ for dest, value in strict_flag_assignments:
1474
+ setattr(options, dest, value)
1475
+
1476
+ # Parse config file first, so command line can override.
1477
+ parse_config_file(options, set_strict_flags, config_file, stdout, stderr)
1478
+
1479
+ # Set strict flags before parsing (if strict mode enabled), so other command
1480
+ # line options can override.
1481
+ if getattr(dummy, "special-opts:strict"):
1482
+ set_strict_flags()
1483
+
1484
+ # Override cache_dir if provided in the environment
1485
+ environ_cache_dir = os.getenv("MYPY_CACHE_DIR", "")
1486
+ if environ_cache_dir.strip():
1487
+ options.cache_dir = environ_cache_dir
1488
+ options.cache_dir = os.path.expanduser(options.cache_dir)
1489
+
1490
+ # Override num_workers if provided in the environment
1491
+ environ_num_workers = os.getenv("MYPY_NUM_WORKERS", "")
1492
+ if environ_num_workers.strip():
1493
+ try:
1494
+ options.num_workers = parse_num_workers(environ_num_workers)
1495
+ except argparse.ArgumentTypeError as error:
1496
+ parser.error(f"MYPY_NUM_WORKERS: {error}")
1497
+
1498
+ # Parse command line for real, using a split namespace.
1499
+ special_opts = argparse.Namespace()
1500
+ parser.parse_args(args, SplitNamespace(options, special_opts, "special-opts:"))
1501
+
1502
+ # The python_version is either the default, which can be overridden via a config file,
1503
+ # or stored in special_opts and is passed via the command line.
1504
+ options.python_version = special_opts.python_version or options.python_version
1505
+ if options.python_version < (3,):
1506
+ parser.error(
1507
+ "Mypy no longer supports checking Python 2 code. "
1508
+ "Consider pinning to mypy<0.980 if you need to check Python 2 code."
1509
+ )
1510
+ try:
1511
+ infer_python_executable(options, special_opts)
1512
+ except PythonExecutableInferenceError as e:
1513
+ parser.error(str(e))
1514
+
1515
+ if special_opts.no_executable or options.no_site_packages:
1516
+ options.python_executable = None
1517
+
1518
+ # Paths listed in the config file will be ignored if any paths, modules or packages
1519
+ # are passed on the command line.
1520
+ if not (special_opts.files or special_opts.packages or special_opts.modules):
1521
+ if options.files:
1522
+ special_opts.files = options.files
1523
+ if options.packages:
1524
+ special_opts.packages = options.packages
1525
+ if options.modules:
1526
+ special_opts.modules = options.modules
1527
+
1528
+ # Check for invalid argument combinations.
1529
+ if require_targets:
1530
+ code_methods = sum(
1531
+ bool(c)
1532
+ for c in [
1533
+ special_opts.modules + special_opts.packages,
1534
+ special_opts.command,
1535
+ special_opts.files,
1536
+ ]
1537
+ )
1538
+ if code_methods == 0 and not options.install_types:
1539
+ parser.error("Missing target module, package, files, or command.")
1540
+ elif code_methods > 1:
1541
+ parser.error("May only specify one of: module/package, files, or command.")
1542
+ if options.explicit_package_bases and not options.namespace_packages:
1543
+ parser.error(
1544
+ "Can only use --explicit-package-bases with --namespace-packages, since otherwise "
1545
+ "examining __init__.py's is sufficient to determine module names for files"
1546
+ )
1547
+
1548
+ # Check for overlapping `--always-true` and `--always-false` flags.
1549
+ overlap = set(options.always_true) & set(options.always_false)
1550
+ if overlap:
1551
+ parser.error(
1552
+ "You can't make a variable always true and always false (%s)"
1553
+ % ", ".join(sorted(overlap))
1554
+ )
1555
+
1556
+ validate_package_allow_list(options.untyped_calls_exclude)
1557
+ validate_package_allow_list(options.deprecated_calls_exclude)
1558
+
1559
+ options.process_incomplete_features(error_callback=parser.error, warning_callback=print)
1560
+
1561
+ # Compute absolute path for custom typeshed (if present).
1562
+ if options.custom_typeshed_dir is not None:
1563
+ options.abs_custom_typeshed_dir = os.path.abspath(options.custom_typeshed_dir)
1564
+
1565
+ # Set build flags.
1566
+ if special_opts.find_occurrences:
1567
+ _find_occurrences = tuple(special_opts.find_occurrences.split("."))
1568
+ if len(_find_occurrences) < 2:
1569
+ parser.error("Can only find occurrences of class members.")
1570
+ if len(_find_occurrences) != 2:
1571
+ parser.error("Can only find occurrences of non-nested class members.")
1572
+ state.find_occurrences = _find_occurrences
1573
+
1574
+ # Set reports.
1575
+ for flag, val in vars(special_opts).items():
1576
+ if flag.endswith("_report") and val is not None:
1577
+ report_type = flag[:-7].replace("_", "-")
1578
+ report_dir = val
1579
+ options.report_dirs[report_type] = report_dir
1580
+
1581
+ # Process --package-root.
1582
+ if options.package_root:
1583
+ process_package_roots(fscache, parser, options)
1584
+
1585
+ # Process --cache-map.
1586
+ if special_opts.cache_map:
1587
+ if options.sqlite_cache:
1588
+ parser.error("--cache-map is incompatible with --sqlite-cache")
1589
+
1590
+ process_cache_map(parser, special_opts, options)
1591
+
1592
+ # Process --strict-bytes
1593
+ options.process_strict_bytes()
1594
+
1595
+ # An explicitly specified cache_fine_grained implies local_partial_types
1596
+ # (because otherwise the cache is not compatible with dmypy)
1597
+ if options.cache_fine_grained:
1598
+ options.local_partial_types = True
1599
+
1600
+ # Implicitly show column numbers if error location end is shown
1601
+ if options.show_error_end:
1602
+ options.show_column_numbers = True
1603
+
1604
+ # Let logical_deps imply cache_fine_grained (otherwise the former is useless).
1605
+ if options.logical_deps:
1606
+ options.cache_fine_grained = True
1607
+
1608
+ if options.strict_concatenate and not strict_option_set:
1609
+ print("Warning: --strict-concatenate is deprecated; use --extra-checks instead")
1610
+
1611
+ # Set target.
1612
+ if special_opts.modules + special_opts.packages:
1613
+ options.build_type = BuildType.MODULE
1614
+ sys_path, _ = get_search_dirs(options.python_executable)
1615
+ search_paths = SearchPaths(
1616
+ (os.getcwd(),), tuple(mypy_path() + options.mypy_path), tuple(sys_path), ()
1617
+ )
1618
+ targets = []
1619
+ # TODO: use the same cache that the BuildManager will
1620
+ cache = FindModuleCache(search_paths, fscache, options)
1621
+ for p in special_opts.packages:
1622
+ if os.sep in p or os.altsep and os.altsep in p:
1623
+ fail(f"Package name '{p}' cannot have a slash in it.", stderr, options)
1624
+ p_targets = cache.find_modules_recursive(p)
1625
+ if not p_targets:
1626
+ reason = cache.find_module(p)
1627
+ if reason is ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS:
1628
+ fail(
1629
+ f"Package '{p}' cannot be type checked due to missing py.typed marker.\n"
1630
+ "See https://mypy.readthedocs.io/en/stable/installed_packages.html for more details",
1631
+ stderr,
1632
+ options,
1633
+ )
1634
+ else:
1635
+ fail(f"Can't find package '{p}'", stderr, options)
1636
+ targets.extend(p_targets)
1637
+ for m in special_opts.modules:
1638
+ targets.append(BuildSource(None, m, None))
1639
+ elif special_opts.command:
1640
+ options.build_type = BuildType.PROGRAM_TEXT
1641
+ targets = [BuildSource(None, None, "\n".join(special_opts.command))]
1642
+ else:
1643
+ try:
1644
+ targets = create_source_list(special_opts.files, options, fscache)
1645
+ # Variable named e2 instead of e to work around mypyc bug #620
1646
+ # which causes issues when using the same variable to catch
1647
+ # exceptions of different types.
1648
+ except InvalidSourceList as e2:
1649
+ fail(str(e2), stderr, options)
1650
+ return targets, options
1651
+
1652
+
1653
+ def process_package_roots(
1654
+ fscache: FileSystemCache | None, parser: argparse.ArgumentParser, options: Options
1655
+ ) -> None:
1656
+ """Validate and normalize package_root."""
1657
+ if fscache is None:
1658
+ parser.error("--package-root does not work here (no fscache)")
1659
+ assert fscache is not None # Since mypy doesn't know parser.error() raises.
1660
+ # Do some stuff with drive letters to make Windows happy (esp. tests).
1661
+ current_drive, _ = os.path.splitdrive(os.getcwd())
1662
+ dot = os.curdir
1663
+ dotslash = os.curdir + os.sep
1664
+ dotdotslash = os.pardir + os.sep
1665
+ trivial_paths = {dot, dotslash}
1666
+ package_root = []
1667
+ for root in options.package_root:
1668
+ if os.path.isabs(root):
1669
+ parser.error(f"Package root cannot be absolute: {root!r}")
1670
+ drive, root = os.path.splitdrive(root)
1671
+ if drive and drive != current_drive:
1672
+ parser.error(f"Package root must be on current drive: {drive + root!r}")
1673
+ # Empty package root is always okay.
1674
+ if root:
1675
+ root = os.path.relpath(root) # Normalize the heck out of it.
1676
+ if not root.endswith(os.sep):
1677
+ root = root + os.sep
1678
+ if root.startswith(dotdotslash):
1679
+ parser.error(f"Package root cannot be above current directory: {root!r}")
1680
+ if root in trivial_paths:
1681
+ root = ""
1682
+ package_root.append(root)
1683
+ options.package_root = package_root
1684
+ # Pass the package root on the filesystem cache.
1685
+ fscache.set_package_root(package_root)
1686
+
1687
+
1688
+ def process_cache_map(
1689
+ parser: argparse.ArgumentParser, special_opts: argparse.Namespace, options: Options
1690
+ ) -> None:
1691
+ """Validate cache_map and copy into options.cache_map."""
1692
+ n = len(special_opts.cache_map)
1693
+ if n % 3 != 0:
1694
+ parser.error("--cache-map requires one or more triples (see source)")
1695
+ for i in range(0, n, 3):
1696
+ source, meta_file, data_file = special_opts.cache_map[i : i + 3]
1697
+ if source in options.cache_map:
1698
+ parser.error(f"Duplicate --cache-map source {source})")
1699
+ if not source.endswith(".py") and not source.endswith(".pyi"):
1700
+ parser.error(f"Invalid --cache-map source {source} (triple[0] must be *.py[i])")
1701
+ if not meta_file.endswith((".meta.json", ".meta.ff")):
1702
+ parser.error(
1703
+ "Invalid --cache-map meta_file %s (triple[1] must be *.meta.json or *.meta.ff)"
1704
+ % meta_file
1705
+ )
1706
+ if not data_file.endswith((".data.json", ".data.ff")):
1707
+ parser.error(
1708
+ "Invalid --cache-map data_file %s (triple[2] must be *.data.json or *.data.ff)"
1709
+ % data_file
1710
+ )
1711
+ options.cache_map[source] = (meta_file, data_file)
1712
+
1713
+
1714
+ def maybe_write_junit_xml(
1715
+ td: float,
1716
+ serious: bool,
1717
+ all_messages: list[str],
1718
+ messages_by_file: dict[str | None, list[str]],
1719
+ options: Options,
1720
+ ) -> None:
1721
+ if options.junit_xml:
1722
+ py_version = f"{options.python_version[0]}_{options.python_version[1]}"
1723
+ if options.junit_format == "global":
1724
+ util.write_junit_xml(
1725
+ td,
1726
+ serious,
1727
+ {None: all_messages} if all_messages else {},
1728
+ options.junit_xml,
1729
+ py_version,
1730
+ options.platform,
1731
+ )
1732
+ else:
1733
+ # per_file
1734
+ util.write_junit_xml(
1735
+ td, serious, messages_by_file, options.junit_xml, py_version, options.platform
1736
+ )
1737
+
1738
+
1739
+ def fail(msg: str, stderr: TextIO, options: Options) -> NoReturn:
1740
+ """Fail with a serious error."""
1741
+ stderr.write(f"{msg}\n")
1742
+ maybe_write_junit_xml(
1743
+ 0.0, serious=True, all_messages=[msg], messages_by_file={None: [msg]}, options=options
1744
+ )
1745
+ sys.exit(2)
1746
+
1747
+
1748
+ def read_types_packages_to_install(cache_dir: str, after_run: bool) -> list[str]:
1749
+ if not os.path.isdir(cache_dir):
1750
+ if not after_run:
1751
+ sys.stderr.write(
1752
+ "error: Can't determine which types to install with no files to check "
1753
+ "(and no cache from previous mypy run)\n"
1754
+ )
1755
+ else:
1756
+ sys.stderr.write(
1757
+ "error: --install-types failed (an error blocked analysis of which types to install)\n"
1758
+ )
1759
+ fnam = build.missing_stubs_file(cache_dir)
1760
+ if not os.path.isfile(fnam):
1761
+ # No missing stubs.
1762
+ return []
1763
+ with open(fnam) as f:
1764
+ return [line.strip() for line in f]
1765
+
1766
+
1767
+ def install_types(
1768
+ formatter: util.FancyFormatter,
1769
+ options: Options,
1770
+ *,
1771
+ after_run: bool = False,
1772
+ non_interactive: bool = False,
1773
+ ) -> bool:
1774
+ """Install stub packages using pip if some missing stubs were detected."""
1775
+ packages = read_types_packages_to_install(options.cache_dir, after_run)
1776
+ if not packages:
1777
+ # If there are no missing stubs, generate no output.
1778
+ return False
1779
+ if after_run and not non_interactive:
1780
+ print()
1781
+ print("Installing missing stub packages:")
1782
+ assert options.python_executable, "Python executable required to install types"
1783
+ cmd = [options.python_executable, "-m", "pip", "install"] + packages
1784
+ print(formatter.style(" ".join(cmd), "none", bold=True))
1785
+ print()
1786
+ if not non_interactive:
1787
+ x = input("Install? [yN] ")
1788
+ if not x.strip() or not x.lower().startswith("y"):
1789
+ print(formatter.style("mypy: Skipping installation", "red", bold=True))
1790
+ sys.exit(2)
1791
+ print()
1792
+ subprocess.run(cmd)
1793
+ return True