@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,1593 @@
1
+ """Type checking of attribute access"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import Callable, Sequence
6
+ from typing import TypeVar, cast
7
+
8
+ from mypy import message_registry, state
9
+ from mypy.checker_shared import TypeCheckerSharedApi
10
+ from mypy.erasetype import erase_typevars
11
+ from mypy.expandtype import (
12
+ expand_self_type,
13
+ expand_type_by_instance,
14
+ freshen_all_functions_type_vars,
15
+ )
16
+ from mypy.lookup import lookup_stdlib_typeinfo
17
+ from mypy.maptype import map_instance_to_supertype
18
+ from mypy.meet import is_overlapping_types
19
+ from mypy.messages import MessageBuilder
20
+ from mypy.modules_state import modules_state
21
+ from mypy.nodes import (
22
+ ARG_POS,
23
+ ARG_STAR,
24
+ ARG_STAR2,
25
+ EXCLUDED_ENUM_ATTRIBUTES,
26
+ SYMBOL_FUNCBASE_TYPES,
27
+ Context,
28
+ Decorator,
29
+ Expression,
30
+ FuncBase,
31
+ FuncDef,
32
+ IndexExpr,
33
+ MypyFile,
34
+ NameExpr,
35
+ OverloadedFuncDef,
36
+ SymbolTable,
37
+ TempNode,
38
+ TypeAlias,
39
+ TypeInfo,
40
+ TypeVarLikeExpr,
41
+ Var,
42
+ is_final_node,
43
+ )
44
+ from mypy.plugin import AttributeContext
45
+ from mypy.subtypes import is_subtype
46
+ from mypy.typeops import (
47
+ bind_self,
48
+ erase_to_bound,
49
+ freeze_all_type_vars,
50
+ get_all_type_vars,
51
+ make_simplified_union,
52
+ supported_self_type,
53
+ tuple_fallback,
54
+ )
55
+ from mypy.types import (
56
+ AnyType,
57
+ CallableType,
58
+ DeletedType,
59
+ FunctionLike,
60
+ Instance,
61
+ LiteralType,
62
+ NoneType,
63
+ Overloaded,
64
+ ParamSpecType,
65
+ PartialType,
66
+ ProperType,
67
+ TupleType,
68
+ Type,
69
+ TypedDictType,
70
+ TypeOfAny,
71
+ TypeType,
72
+ TypeVarLikeType,
73
+ TypeVarTupleType,
74
+ TypeVarType,
75
+ UninhabitedType,
76
+ UnionType,
77
+ get_proper_type,
78
+ instance_cache,
79
+ )
80
+
81
+
82
+ class MemberContext:
83
+ """Information and objects needed to type check attribute access.
84
+
85
+ Look at the docstring of analyze_member_access for more information.
86
+ """
87
+
88
+ def __init__(
89
+ self,
90
+ *,
91
+ is_lvalue: bool,
92
+ is_super: bool,
93
+ is_operator: bool,
94
+ original_type: Type,
95
+ context: Context,
96
+ chk: TypeCheckerSharedApi,
97
+ self_type: Type | None = None,
98
+ module_symbol_table: SymbolTable | None = None,
99
+ no_deferral: bool = False,
100
+ is_self: bool = False,
101
+ rvalue: Expression | None = None,
102
+ suppress_errors: bool = False,
103
+ preserve_type_var_ids: bool = False,
104
+ ) -> None:
105
+ self.is_lvalue = is_lvalue
106
+ self.is_super = is_super
107
+ self.is_operator = is_operator
108
+ self.original_type = original_type
109
+ self.self_type = self_type or original_type
110
+ self.context = context # Error context
111
+ self.chk = chk
112
+ self.msg = chk.msg
113
+ self.module_symbol_table = module_symbol_table
114
+ self.no_deferral = no_deferral
115
+ self.is_self = is_self
116
+ if rvalue is not None:
117
+ assert is_lvalue
118
+ self.rvalue = rvalue
119
+ self.suppress_errors = suppress_errors
120
+ # This attribute is only used to preserve old protocol member access logic.
121
+ # It is needed to avoid infinite recursion in cases involving self-referential
122
+ # generic methods, see find_member() for details. Do not use for other purposes!
123
+ self.preserve_type_var_ids = preserve_type_var_ids
124
+
125
+ def named_type(self, name: str) -> Instance:
126
+ return self.chk.named_type(name)
127
+
128
+ def not_ready_callback(self, name: str, context: Context) -> None:
129
+ self.chk.handle_cannot_determine_type(name, context)
130
+
131
+ def fail(self, msg: str) -> None:
132
+ if not self.suppress_errors:
133
+ self.msg.fail(msg, self.context)
134
+
135
+ def copy_modified(
136
+ self,
137
+ *,
138
+ self_type: Type | None = None,
139
+ is_lvalue: bool | None = None,
140
+ original_type: Type | None = None,
141
+ ) -> MemberContext:
142
+ mx = MemberContext(
143
+ is_lvalue=self.is_lvalue,
144
+ is_super=self.is_super,
145
+ is_operator=self.is_operator,
146
+ original_type=self.original_type,
147
+ context=self.context,
148
+ chk=self.chk,
149
+ self_type=self.self_type,
150
+ module_symbol_table=self.module_symbol_table,
151
+ no_deferral=self.no_deferral,
152
+ rvalue=self.rvalue,
153
+ suppress_errors=self.suppress_errors,
154
+ preserve_type_var_ids=self.preserve_type_var_ids,
155
+ )
156
+ if self_type is not None:
157
+ mx.self_type = self_type
158
+ if is_lvalue is not None:
159
+ mx.is_lvalue = is_lvalue
160
+ if original_type is not None:
161
+ mx.original_type = original_type
162
+ return mx
163
+
164
+
165
+ def analyze_member_access(
166
+ name: str,
167
+ typ: Type,
168
+ context: Context,
169
+ *,
170
+ is_lvalue: bool,
171
+ is_super: bool,
172
+ is_operator: bool,
173
+ original_type: Type,
174
+ chk: TypeCheckerSharedApi,
175
+ override_info: TypeInfo | None = None,
176
+ in_literal_context: bool = False,
177
+ self_type: Type | None = None,
178
+ module_symbol_table: SymbolTable | None = None,
179
+ no_deferral: bool = False,
180
+ is_self: bool = False,
181
+ rvalue: Expression | None = None,
182
+ suppress_errors: bool = False,
183
+ ) -> Type:
184
+ """Return the type of attribute 'name' of 'typ'.
185
+
186
+ The actual implementation is in '_analyze_member_access' and this docstring
187
+ also applies to it.
188
+
189
+ This is a general operation that supports various different variations:
190
+
191
+ 1. lvalue or non-lvalue access (setter or getter access)
192
+ 2. supertype access when using super() (is_super == True and
193
+ 'override_info' should refer to the supertype)
194
+
195
+ 'original_type' is the most precise inferred or declared type of the base object
196
+ that we have available. When looking for an attribute of 'typ', we may perform
197
+ recursive calls targeting the fallback type, and 'typ' may become some supertype
198
+ of 'original_type'. 'original_type' is always preserved as the 'typ' type used in
199
+ the initial, non-recursive call. The 'self_type' is a component of 'original_type'
200
+ to which generic self should be bound (a narrower type that has a fallback to instance).
201
+ Currently, this is used only for union types.
202
+
203
+ 'module_symbol_table' is passed to this function if 'typ' is actually a module,
204
+ and we want to keep track of the available attributes of the module (since they
205
+ are not available via the type object directly)
206
+
207
+ 'rvalue' can be provided optionally to infer better setter type when is_lvalue is True,
208
+ most notably this helps for descriptors with overloaded __set__() method.
209
+
210
+ 'suppress_errors' will skip any logic that is only needed to generate error messages.
211
+ Note that this more of a performance optimization, one should not rely on this to not
212
+ show any messages, as some may be show e.g. by callbacks called here,
213
+ use msg.filter_errors(), if needed.
214
+ """
215
+ mx = MemberContext(
216
+ is_lvalue=is_lvalue,
217
+ is_super=is_super,
218
+ is_operator=is_operator,
219
+ original_type=original_type,
220
+ context=context,
221
+ chk=chk,
222
+ self_type=self_type,
223
+ module_symbol_table=module_symbol_table,
224
+ no_deferral=no_deferral,
225
+ is_self=is_self,
226
+ rvalue=rvalue,
227
+ suppress_errors=suppress_errors,
228
+ )
229
+ result = _analyze_member_access(name, typ, mx, override_info)
230
+ possible_literal = get_proper_type(result)
231
+ if (
232
+ in_literal_context
233
+ and isinstance(possible_literal, Instance)
234
+ and possible_literal.last_known_value is not None
235
+ ):
236
+ return possible_literal.last_known_value
237
+ else:
238
+ return result
239
+
240
+
241
+ def _analyze_member_access(
242
+ name: str, typ: Type, mx: MemberContext, override_info: TypeInfo | None = None
243
+ ) -> Type:
244
+ typ = get_proper_type(typ)
245
+ if isinstance(typ, Instance):
246
+ return analyze_instance_member_access(name, typ, mx, override_info)
247
+ elif isinstance(typ, AnyType):
248
+ # The base object has dynamic type.
249
+ return AnyType(TypeOfAny.from_another_any, source_any=typ)
250
+ elif isinstance(typ, UnionType):
251
+ return analyze_union_member_access(name, typ, mx)
252
+ elif isinstance(typ, FunctionLike) and typ.is_type_obj():
253
+ return analyze_type_callable_member_access(name, typ, mx)
254
+ elif isinstance(typ, TypeType):
255
+ return analyze_type_type_member_access(name, typ, mx, override_info)
256
+ elif isinstance(typ, TupleType):
257
+ # Actually look up from the fallback instance type.
258
+ return _analyze_member_access(name, tuple_fallback(typ), mx, override_info)
259
+ elif isinstance(typ, (LiteralType, FunctionLike)):
260
+ # Actually look up from the fallback instance type.
261
+ return _analyze_member_access(name, typ.fallback, mx, override_info)
262
+ elif isinstance(typ, TypedDictType):
263
+ return analyze_typeddict_access(name, typ, mx, override_info)
264
+ elif isinstance(typ, NoneType):
265
+ return analyze_none_member_access(name, typ, mx)
266
+ elif isinstance(typ, TypeVarLikeType):
267
+ if isinstance(typ, TypeVarType) and typ.values:
268
+ return _analyze_member_access(
269
+ name, make_simplified_union(typ.values), mx, override_info
270
+ )
271
+ return _analyze_member_access(name, typ.upper_bound, mx, override_info)
272
+ elif isinstance(typ, DeletedType):
273
+ if not mx.suppress_errors:
274
+ mx.msg.deleted_as_rvalue(typ, mx.context)
275
+ return AnyType(TypeOfAny.from_error)
276
+ elif isinstance(typ, UninhabitedType):
277
+ attr_type = UninhabitedType()
278
+ attr_type.ambiguous = typ.ambiguous
279
+ return attr_type
280
+ return report_missing_attribute(mx.original_type, typ, name, mx)
281
+
282
+
283
+ def may_be_awaitable_attribute(
284
+ name: str, typ: Type, mx: MemberContext, override_info: TypeInfo | None = None
285
+ ) -> bool:
286
+ """Check if the given type has the attribute when awaited."""
287
+ if mx.chk.checking_missing_await:
288
+ # Avoid infinite recursion.
289
+ return False
290
+ with mx.chk.checking_await_set(), mx.msg.filter_errors() as local_errors:
291
+ aw_type = mx.chk.get_precise_awaitable_type(typ, local_errors)
292
+ if aw_type is None:
293
+ return False
294
+ _ = _analyze_member_access(
295
+ name, aw_type, mx.copy_modified(self_type=aw_type), override_info
296
+ )
297
+ return not local_errors.has_new_errors()
298
+
299
+
300
+ def report_missing_attribute(
301
+ original_type: Type,
302
+ typ: Type,
303
+ name: str,
304
+ mx: MemberContext,
305
+ override_info: TypeInfo | None = None,
306
+ ) -> Type:
307
+ if mx.suppress_errors:
308
+ return AnyType(TypeOfAny.from_error)
309
+ error_code = mx.msg.has_no_attr(original_type, typ, name, mx.context, mx.module_symbol_table)
310
+ if not mx.msg.prefer_simple_messages():
311
+ if may_be_awaitable_attribute(name, typ, mx, override_info):
312
+ mx.msg.possible_missing_await(mx.context, error_code)
313
+ return AnyType(TypeOfAny.from_error)
314
+
315
+
316
+ # The several functions that follow implement analyze_member_access for various
317
+ # types and aren't documented individually.
318
+
319
+
320
+ def analyze_instance_member_access(
321
+ name: str, typ: Instance, mx: MemberContext, override_info: TypeInfo | None
322
+ ) -> Type:
323
+ info = typ.type
324
+ if override_info:
325
+ info = override_info
326
+
327
+ method = info.get_method(name)
328
+
329
+ if name == "__init__" and not mx.is_super and not info.is_final:
330
+ if not method or not method.is_final:
331
+ # Accessing __init__ in statically typed code would compromise
332
+ # type safety unless used via super() or the method/class is final.
333
+ mx.fail(message_registry.CANNOT_ACCESS_INIT)
334
+ return AnyType(TypeOfAny.from_error)
335
+
336
+ # The base object has an instance type.
337
+
338
+ if (
339
+ state.find_occurrences
340
+ and info.name == state.find_occurrences[0]
341
+ and name == state.find_occurrences[1]
342
+ and not mx.suppress_errors
343
+ ):
344
+ mx.msg.note("Occurrence of '{}.{}'".format(*state.find_occurrences), mx.context)
345
+
346
+ # Look up the member. First look up the method dictionary.
347
+ if method and not isinstance(method, Decorator):
348
+ if mx.is_super and not mx.suppress_errors:
349
+ validate_super_call(method, mx)
350
+
351
+ if method.is_property:
352
+ assert isinstance(method, OverloadedFuncDef)
353
+ getter = method.items[0]
354
+ assert isinstance(getter, Decorator)
355
+ if mx.is_lvalue and getter.var.is_settable_property:
356
+ mx.chk.warn_deprecated(method.setter, mx.context)
357
+ return analyze_var(name, getter.var, typ, mx)
358
+
359
+ if mx.is_lvalue and not mx.suppress_errors:
360
+ mx.msg.cant_assign_to_method(mx.context)
361
+ if not isinstance(method, OverloadedFuncDef):
362
+ signature = mx.chk.function_type(method)
363
+ else:
364
+ if method.type is None:
365
+ # Overloads may be not ready if they are decorated. Handle this in same
366
+ # manner as we would handle a regular decorated function: defer if possible.
367
+ if not mx.no_deferral and method.items:
368
+ mx.not_ready_callback(method.name, mx.context)
369
+ return AnyType(TypeOfAny.special_form)
370
+ assert isinstance(method.type, Overloaded)
371
+ signature = method.type
372
+ if not mx.preserve_type_var_ids:
373
+ signature = freshen_all_functions_type_vars(signature)
374
+ if not method.is_static:
375
+ if isinstance(method, (FuncDef, OverloadedFuncDef)) and method.is_trivial_self:
376
+ signature = bind_self_fast(signature, mx.self_type)
377
+ else:
378
+ signature = check_self_arg(
379
+ signature, mx.self_type, method.is_class, mx.context, name, mx.msg
380
+ )
381
+ signature = bind_self(signature, mx.self_type, is_classmethod=method.is_class)
382
+ typ = map_instance_to_supertype(typ, method.info)
383
+ member_type = expand_type_by_instance(signature, typ)
384
+ freeze_all_type_vars(member_type)
385
+ return member_type
386
+ else:
387
+ # Not a method.
388
+ return analyze_member_var_access(name, typ, info, mx)
389
+
390
+
391
+ def validate_super_call(node: FuncBase, mx: MemberContext) -> None:
392
+ unsafe_super = False
393
+ if isinstance(node, FuncDef) and node.is_trivial_body:
394
+ unsafe_super = True
395
+ elif isinstance(node, OverloadedFuncDef):
396
+ if node.impl:
397
+ impl = node.impl if isinstance(node.impl, FuncDef) else node.impl.func
398
+ unsafe_super = impl.is_trivial_body
399
+ elif not node.is_property and node.items:
400
+ assert isinstance(node.items[0], Decorator)
401
+ unsafe_super = node.items[0].func.is_trivial_body
402
+ if unsafe_super:
403
+ mx.msg.unsafe_super(node.name, node.info.name, mx.context)
404
+
405
+
406
+ def analyze_type_callable_member_access(name: str, typ: FunctionLike, mx: MemberContext) -> Type:
407
+ # Class attribute.
408
+ # TODO super?
409
+ instance_type = typ.items[0].get_instance_type(force_fallback=True)
410
+ if isinstance(instance_type, Instance):
411
+ if not mx.is_operator:
412
+ # When Python sees an operator (eg `3 == 4`), it automatically translates that
413
+ # into something like `int.__eq__(3, 4)` instead of `(3).__eq__(4)` as an
414
+ # optimization.
415
+ #
416
+ # While it normally it doesn't matter which of the two versions are used, it
417
+ # does cause inconsistencies when working with classes. For example, translating
418
+ # `int == int` to `int.__eq__(int)` would not work since `int.__eq__` is meant to
419
+ # compare two int _instances_. What we really want is `type(int).__eq__`, which
420
+ # is meant to compare two types or classes.
421
+ #
422
+ # This check makes sure that when we encounter an operator, we skip looking up
423
+ # the corresponding method in the current instance to avoid this edge case.
424
+ # See https://github.com/python/mypy/pull/1787 for more info.
425
+ # TODO: do not rely on same type variables being present in all constructor overloads.
426
+ result = analyze_class_attribute_access(
427
+ instance_type,
428
+ name,
429
+ mx,
430
+ original_vars=typ.items[0].variables,
431
+ mcs_fallback=typ.fallback,
432
+ )
433
+ if result:
434
+ return result
435
+ # Look up from the 'type' type.
436
+ return _analyze_member_access(name, typ.fallback, mx)
437
+ else:
438
+ assert False, f"Unexpected type {instance_type!r}"
439
+
440
+
441
+ def analyze_type_type_member_access(
442
+ name: str, typ: TypeType, mx: MemberContext, override_info: TypeInfo | None
443
+ ) -> Type:
444
+ # Similar to analyze_type_callable_attribute_access.
445
+ item = None
446
+ fallback = mx.named_type("builtins.type")
447
+ if isinstance(typ.item, Instance):
448
+ item = typ.item
449
+ elif isinstance(typ.item, AnyType):
450
+ with mx.msg.filter_errors():
451
+ return _analyze_member_access(name, fallback, mx, override_info)
452
+ elif isinstance(typ.item, TypeVarType):
453
+ upper_bound = get_proper_type(typ.item.upper_bound)
454
+ if isinstance(upper_bound, Instance):
455
+ item = upper_bound
456
+ elif isinstance(upper_bound, UnionType):
457
+ return _analyze_member_access(
458
+ name,
459
+ TypeType.make_normalized(upper_bound, line=typ.line, column=typ.column),
460
+ mx,
461
+ override_info,
462
+ )
463
+ elif isinstance(upper_bound, TupleType):
464
+ item = tuple_fallback(upper_bound)
465
+ elif isinstance(upper_bound, AnyType):
466
+ with mx.msg.filter_errors():
467
+ return _analyze_member_access(name, fallback, mx, override_info)
468
+ elif isinstance(typ.item, TupleType):
469
+ item = tuple_fallback(typ.item)
470
+ elif isinstance(typ.item, FunctionLike) and typ.item.is_type_obj():
471
+ item = typ.item.fallback
472
+ elif isinstance(typ.item, TypeType):
473
+ # Access member on metaclass object via Type[Type[C]]
474
+ if isinstance(typ.item.item, Instance):
475
+ item = typ.item.item.type.metaclass_type
476
+ ignore_messages = False
477
+
478
+ if item is not None:
479
+ fallback = item.type.metaclass_type or fallback
480
+
481
+ if item and not mx.is_operator:
482
+ # See comment above for why operators are skipped
483
+ result = analyze_class_attribute_access(
484
+ item, name, mx, mcs_fallback=fallback, override_info=override_info
485
+ )
486
+ if result:
487
+ if not (isinstance(get_proper_type(result), AnyType) and item.type.fallback_to_any):
488
+ return result
489
+ else:
490
+ # We don't want errors on metaclass lookup for classes with Any fallback
491
+ ignore_messages = True
492
+
493
+ with mx.msg.filter_errors(filter_errors=ignore_messages):
494
+ return _analyze_member_access(name, fallback, mx, override_info)
495
+
496
+
497
+ def analyze_union_member_access(name: str, typ: UnionType, mx: MemberContext) -> Type:
498
+ with mx.msg.disable_type_names():
499
+ results = []
500
+ for subtype in typ.relevant_items():
501
+ # Self types should be bound to every individual item of a union.
502
+ item_mx = mx.copy_modified(self_type=subtype)
503
+ results.append(_analyze_member_access(name, subtype, item_mx))
504
+ return make_simplified_union(results)
505
+
506
+
507
+ def analyze_none_member_access(name: str, typ: NoneType, mx: MemberContext) -> Type:
508
+ if name == "__bool__":
509
+ literal_false = LiteralType(False, fallback=mx.named_type("builtins.bool"))
510
+ return CallableType(
511
+ arg_types=[],
512
+ arg_kinds=[],
513
+ arg_names=[],
514
+ ret_type=literal_false,
515
+ fallback=mx.named_type("builtins.function"),
516
+ )
517
+ else:
518
+ return _analyze_member_access(name, mx.named_type("builtins.object"), mx)
519
+
520
+
521
+ def analyze_member_var_access(
522
+ name: str, itype: Instance, info: TypeInfo, mx: MemberContext
523
+ ) -> Type:
524
+ """Analyse attribute access that does not target a method.
525
+
526
+ This is logically part of analyze_member_access and the arguments are similar.
527
+
528
+ original_type is the type of E in the expression E.var
529
+ """
530
+ # It was not a method. Try looking up a variable.
531
+ node = info.get(name)
532
+ v = node.node if node else None
533
+
534
+ mx.chk.warn_deprecated(v, mx.context)
535
+
536
+ vv = v
537
+ is_trivial_self = False
538
+ if isinstance(vv, Decorator):
539
+ # The associated Var node of a decorator contains the type.
540
+ v = vv.var
541
+ is_trivial_self = vv.func.is_trivial_self and not vv.decorators
542
+ if mx.is_super and not mx.suppress_errors:
543
+ validate_super_call(vv.func, mx)
544
+ if isinstance(v, FuncDef):
545
+ assert False, "Did not expect a function"
546
+ if isinstance(v, MypyFile):
547
+ # Special case: accessing module on instances is allowed, but will not
548
+ # be recorded by semantic analyzer.
549
+ mx.chk.module_refs.add(v.fullname)
550
+
551
+ if isinstance(vv, (TypeInfo, TypeAlias, MypyFile, TypeVarLikeExpr)):
552
+ # If the associated variable is a TypeInfo synthesize a Var node for
553
+ # the purposes of type checking. This enables us to type check things
554
+ # like accessing class attributes on an inner class. Similar we allow
555
+ # using qualified type aliases in runtime context. For example:
556
+ # class C:
557
+ # A = List[int]
558
+ # x = C.A() <- this is OK
559
+ typ = mx.chk.expr_checker.analyze_static_reference(vv, mx.context, mx.is_lvalue)
560
+ v = Var(name, type=typ)
561
+ v.info = info
562
+
563
+ if isinstance(v, Var):
564
+ implicit = info[name].implicit
565
+
566
+ # An assignment to final attribute is always an error,
567
+ # independently of types.
568
+ if mx.is_lvalue and not mx.chk.get_final_context():
569
+ check_final_member(name, info, mx.msg, mx.context)
570
+
571
+ return analyze_var(name, v, itype, mx, implicit=implicit, is_trivial_self=is_trivial_self)
572
+ elif (
573
+ not v
574
+ and name not in ["__getattr__", "__setattr__", "__getattribute__"]
575
+ and not mx.is_operator
576
+ and mx.module_symbol_table is None
577
+ ):
578
+ # Above we skip ModuleType.__getattr__ etc. if we have a
579
+ # module symbol table, since the symbol table allows precise
580
+ # checking.
581
+ if not mx.is_lvalue:
582
+ for method_name in ("__getattribute__", "__getattr__"):
583
+ method = info.get_method(method_name)
584
+
585
+ # __getattribute__ is defined on builtins.object and returns Any, so without
586
+ # the guard this search will always find object.__getattribute__ and conclude
587
+ # that the attribute exists
588
+ if method and method.info.fullname != "builtins.object":
589
+ bound_method = analyze_decorator_or_funcbase_access(
590
+ defn=method, itype=itype, name=method_name, mx=mx
591
+ )
592
+ typ = map_instance_to_supertype(itype, method.info)
593
+ getattr_type = get_proper_type(expand_type_by_instance(bound_method, typ))
594
+ if isinstance(getattr_type, CallableType):
595
+ result = getattr_type.ret_type
596
+ else:
597
+ result = getattr_type
598
+
599
+ # Call the attribute hook before returning.
600
+ fullname = f"{method.info.fullname}.{name}"
601
+ hook = mx.chk.plugin.get_attribute_hook(fullname)
602
+ if hook:
603
+ result = hook(
604
+ AttributeContext(
605
+ get_proper_type(mx.original_type),
606
+ result,
607
+ mx.is_lvalue,
608
+ mx.context,
609
+ mx.chk,
610
+ )
611
+ )
612
+ return result
613
+ else:
614
+ setattr_meth = info.get_method("__setattr__")
615
+ if setattr_meth and setattr_meth.info.fullname != "builtins.object":
616
+ bound_type = analyze_decorator_or_funcbase_access(
617
+ defn=setattr_meth,
618
+ itype=itype,
619
+ name="__setattr__",
620
+ mx=mx.copy_modified(is_lvalue=False),
621
+ )
622
+ typ = map_instance_to_supertype(itype, setattr_meth.info)
623
+ setattr_type = get_proper_type(expand_type_by_instance(bound_type, typ))
624
+ if isinstance(setattr_type, CallableType) and len(setattr_type.arg_types) > 0:
625
+ return setattr_type.arg_types[-1]
626
+
627
+ if itype.type.fallback_to_any:
628
+ return AnyType(TypeOfAny.special_form)
629
+
630
+ # Could not find the member.
631
+ if itype.extra_attrs and name in itype.extra_attrs.attrs:
632
+ # For modules use direct symbol table lookup.
633
+ if not itype.extra_attrs.mod_name:
634
+ return itype.extra_attrs.attrs[name]
635
+
636
+ if mx.is_super and not mx.suppress_errors:
637
+ mx.msg.undefined_in_superclass(name, mx.context)
638
+ return AnyType(TypeOfAny.from_error)
639
+ else:
640
+ ret = report_missing_attribute(mx.original_type, itype, name, mx)
641
+ # Avoid paying double jeopardy if we can't find the member due to --no-implicit-reexport
642
+ if (
643
+ mx.module_symbol_table is not None
644
+ and name in mx.module_symbol_table
645
+ and not mx.module_symbol_table[name].module_public
646
+ ):
647
+ v = mx.module_symbol_table[name].node
648
+ e = NameExpr(name)
649
+ e.set_line(mx.context)
650
+ e.node = v
651
+ return mx.chk.expr_checker.analyze_ref_expr(e, lvalue=mx.is_lvalue)
652
+ return ret
653
+
654
+
655
+ def check_final_member(name: str, info: TypeInfo, msg: MessageBuilder, ctx: Context) -> None:
656
+ """Give an error if the name being assigned was declared as final."""
657
+ for base in info.mro:
658
+ sym = base.names.get(name)
659
+ if sym and is_final_node(sym.node):
660
+ msg.cant_assign_to_final(name, attr_assign=True, ctx=ctx)
661
+
662
+
663
+ def analyze_descriptor_access(descriptor_type: Type, mx: MemberContext) -> Type:
664
+ """Type check descriptor access.
665
+
666
+ Arguments:
667
+ descriptor_type: The type of the descriptor attribute being accessed
668
+ (the type of ``f`` in ``a.f`` when ``f`` is a descriptor).
669
+ mx: The current member access context.
670
+ Return:
671
+ The return type of the appropriate ``__get__/__set__`` overload for the descriptor.
672
+ """
673
+ instance_type = get_proper_type(mx.self_type)
674
+ orig_descriptor_type = descriptor_type
675
+ descriptor_type = get_proper_type(descriptor_type)
676
+
677
+ if isinstance(descriptor_type, UnionType):
678
+ # Map the access over union types
679
+ return make_simplified_union(
680
+ [analyze_descriptor_access(typ, mx) for typ in descriptor_type.items]
681
+ )
682
+ elif not isinstance(descriptor_type, Instance):
683
+ return orig_descriptor_type
684
+
685
+ if not mx.is_lvalue and not descriptor_type.type.has_readable_member("__get__"):
686
+ return orig_descriptor_type
687
+
688
+ # We do this check first to accommodate for descriptors with only __set__ method.
689
+ # If there is no __set__, we type-check that the assigned value matches
690
+ # the return type of __get__. This doesn't match the python semantics,
691
+ # (which allow you to override the descriptor with any value), but preserves
692
+ # the type of accessing the attribute (even after the override).
693
+ if mx.is_lvalue and descriptor_type.type.has_readable_member("__set__"):
694
+ return analyze_descriptor_assign(descriptor_type, mx)
695
+
696
+ if mx.is_lvalue and not descriptor_type.type.has_readable_member("__get__"):
697
+ # This turned out to be not a descriptor after all.
698
+ return orig_descriptor_type
699
+
700
+ dunder_get = descriptor_type.type.get_method("__get__")
701
+ if dunder_get is None:
702
+ mx.fail(
703
+ message_registry.DESCRIPTOR_GET_NOT_CALLABLE.format(
704
+ descriptor_type.str_with_options(mx.msg.options)
705
+ )
706
+ )
707
+ return AnyType(TypeOfAny.from_error)
708
+
709
+ bound_method = analyze_decorator_or_funcbase_access(
710
+ defn=dunder_get,
711
+ itype=descriptor_type,
712
+ name="__get__",
713
+ mx=mx.copy_modified(self_type=descriptor_type),
714
+ )
715
+
716
+ typ = map_instance_to_supertype(descriptor_type, dunder_get.info)
717
+ dunder_get_type = expand_type_by_instance(bound_method, typ)
718
+
719
+ if isinstance(instance_type, FunctionLike) and instance_type.is_type_obj():
720
+ owner_type = instance_type.items[0].get_instance_type()
721
+ instance_type = NoneType()
722
+ elif isinstance(instance_type, TypeType):
723
+ owner_type = instance_type.item
724
+ instance_type = NoneType()
725
+ else:
726
+ owner_type = instance_type
727
+
728
+ callable_name = mx.chk.expr_checker.method_fullname(descriptor_type, "__get__")
729
+ dunder_get_type = mx.chk.expr_checker.transform_callee_type(
730
+ callable_name,
731
+ dunder_get_type,
732
+ [
733
+ TempNode(instance_type, context=mx.context),
734
+ TempNode(TypeType.make_normalized(owner_type), context=mx.context),
735
+ ],
736
+ [ARG_POS, ARG_POS],
737
+ mx.context,
738
+ object_type=descriptor_type,
739
+ )
740
+
741
+ _, inferred_dunder_get_type = mx.chk.expr_checker.check_call(
742
+ dunder_get_type,
743
+ [
744
+ TempNode(instance_type, context=mx.context),
745
+ TempNode(TypeType.make_normalized(owner_type), context=mx.context),
746
+ ],
747
+ [ARG_POS, ARG_POS],
748
+ mx.context,
749
+ object_type=descriptor_type,
750
+ callable_name=callable_name,
751
+ )
752
+
753
+ # Search for possible deprecations:
754
+ mx.chk.warn_deprecated(dunder_get, mx.context)
755
+
756
+ inferred_dunder_get_type = get_proper_type(inferred_dunder_get_type)
757
+ if isinstance(inferred_dunder_get_type, AnyType):
758
+ # check_call failed, and will have reported an error
759
+ return inferred_dunder_get_type
760
+
761
+ if not isinstance(inferred_dunder_get_type, CallableType):
762
+ mx.fail(
763
+ message_registry.DESCRIPTOR_GET_NOT_CALLABLE.format(
764
+ descriptor_type.str_with_options(mx.msg.options)
765
+ )
766
+ )
767
+ return AnyType(TypeOfAny.from_error)
768
+
769
+ return inferred_dunder_get_type.ret_type
770
+
771
+
772
+ def analyze_descriptor_assign(descriptor_type: Instance, mx: MemberContext) -> Type:
773
+ instance_type = get_proper_type(mx.self_type)
774
+ dunder_set = descriptor_type.type.get_method("__set__")
775
+ if dunder_set is None:
776
+ mx.fail(
777
+ message_registry.DESCRIPTOR_SET_NOT_CALLABLE.format(
778
+ descriptor_type.str_with_options(mx.msg.options)
779
+ ).value
780
+ )
781
+ return AnyType(TypeOfAny.from_error)
782
+
783
+ bound_method = analyze_decorator_or_funcbase_access(
784
+ defn=dunder_set,
785
+ itype=descriptor_type,
786
+ name="__set__",
787
+ mx=mx.copy_modified(is_lvalue=False, self_type=descriptor_type),
788
+ )
789
+ typ = map_instance_to_supertype(descriptor_type, dunder_set.info)
790
+ dunder_set_type = expand_type_by_instance(bound_method, typ)
791
+
792
+ callable_name = mx.chk.expr_checker.method_fullname(descriptor_type, "__set__")
793
+ rvalue = mx.rvalue or TempNode(AnyType(TypeOfAny.special_form), context=mx.context)
794
+ dunder_set_type = mx.chk.expr_checker.transform_callee_type(
795
+ callable_name,
796
+ dunder_set_type,
797
+ [TempNode(instance_type, context=mx.context), rvalue],
798
+ [ARG_POS, ARG_POS],
799
+ mx.context,
800
+ object_type=descriptor_type,
801
+ )
802
+
803
+ # For non-overloaded setters, the result should be type-checked like a regular assignment.
804
+ # Hence, we first only try to infer the type by using the rvalue as type context.
805
+ type_context = rvalue
806
+ with mx.msg.filter_errors():
807
+ _, inferred_dunder_set_type = mx.chk.expr_checker.check_call(
808
+ dunder_set_type,
809
+ [TempNode(instance_type, context=mx.context), type_context],
810
+ [ARG_POS, ARG_POS],
811
+ mx.context,
812
+ object_type=descriptor_type,
813
+ callable_name=callable_name,
814
+ )
815
+
816
+ # And now we in fact type check the call, to show errors related to wrong arguments
817
+ # count, etc., replacing the type context for non-overloaded setters only.
818
+ inferred_dunder_set_type = get_proper_type(inferred_dunder_set_type)
819
+ if isinstance(inferred_dunder_set_type, CallableType):
820
+ type_context = TempNode(AnyType(TypeOfAny.special_form), context=mx.context)
821
+ mx.chk.expr_checker.check_call(
822
+ dunder_set_type,
823
+ [TempNode(instance_type, context=mx.context), type_context],
824
+ [ARG_POS, ARG_POS],
825
+ mx.context,
826
+ object_type=descriptor_type,
827
+ callable_name=callable_name,
828
+ )
829
+
830
+ # Search for possible deprecations:
831
+ mx.chk.warn_deprecated(dunder_set, mx.context)
832
+
833
+ # In the following cases, a message already will have been recorded in check_call.
834
+ if (not isinstance(inferred_dunder_set_type, CallableType)) or (
835
+ len(inferred_dunder_set_type.arg_types) < 2
836
+ ):
837
+ return AnyType(TypeOfAny.from_error)
838
+ return inferred_dunder_set_type.arg_types[1]
839
+
840
+
841
+ def is_instance_var(var: Var) -> bool:
842
+ """Return if var is an instance variable according to PEP 526."""
843
+ return (
844
+ # check the type_info node is the var (not a decorated function, etc.)
845
+ var.name in var.info.names
846
+ and var.info.names[var.name].node is var
847
+ and not var.is_classvar
848
+ # variables without annotations are treated as classvar
849
+ and not var.is_inferred
850
+ )
851
+
852
+
853
+ def analyze_var(
854
+ name: str,
855
+ var: Var,
856
+ itype: Instance,
857
+ mx: MemberContext,
858
+ *,
859
+ implicit: bool = False,
860
+ is_trivial_self: bool = False,
861
+ ) -> Type:
862
+ """Analyze access to an attribute via a Var node.
863
+
864
+ This is conceptually part of analyze_member_access and the arguments are similar.
865
+ itype is the instance type in which attribute should be looked up
866
+ original_type is the type of E in the expression E.var
867
+ if implicit is True, the original Var was created as an assignment to self
868
+ if is_trivial_self is True, we can use fast path for bind_self().
869
+ """
870
+ # Found a member variable.
871
+ original_itype = itype
872
+ itype = map_instance_to_supertype(itype, var.info)
873
+ if var.is_settable_property and mx.is_lvalue:
874
+ typ: Type | None = var.setter_type
875
+ if typ is None and var.is_ready:
876
+ # Existing synthetic properties may not set setter type. Fall back to getter.
877
+ typ = var.type
878
+ else:
879
+ typ = var.type
880
+ if typ:
881
+ if isinstance(typ, PartialType):
882
+ return mx.chk.handle_partial_var_type(typ, mx.is_lvalue, var, mx.context)
883
+ if mx.is_lvalue and not mx.suppress_errors:
884
+ if var.is_property and not var.is_settable_property:
885
+ mx.msg.read_only_property(name, itype.type, mx.context)
886
+ if var.is_classvar:
887
+ mx.msg.cant_assign_to_classvar(name, mx.context)
888
+ # This is the most common case for variables, so start with this.
889
+ result = expand_without_binding(typ, var, itype, original_itype, mx)
890
+
891
+ # A non-None value indicates that we should actually bind self for this variable.
892
+ call_type: ProperType | None = None
893
+ if var.is_initialized_in_class and (not is_instance_var(var) or mx.is_operator):
894
+ typ = get_proper_type(typ)
895
+ if isinstance(typ, FunctionLike) and not typ.is_type_obj():
896
+ call_type = typ
897
+ elif var.is_property:
898
+ deco_mx = mx.copy_modified(original_type=typ, self_type=typ, is_lvalue=False)
899
+ call_type = get_proper_type(_analyze_member_access("__call__", typ, deco_mx))
900
+ else:
901
+ call_type = typ
902
+
903
+ # Bound variables with callable types are treated like methods
904
+ # (these are usually method aliases like __rmul__ = __mul__).
905
+ if isinstance(call_type, FunctionLike) and not call_type.is_type_obj():
906
+ if mx.is_lvalue and not var.is_property and not mx.suppress_errors:
907
+ mx.msg.cant_assign_to_method(mx.context)
908
+
909
+ # Bind the self type for each callable component (when needed).
910
+ if call_type and not var.is_staticmethod:
911
+ bound_items = []
912
+ for ct in call_type.items if isinstance(call_type, UnionType) else [call_type]:
913
+ p_ct = get_proper_type(ct)
914
+ if isinstance(p_ct, FunctionLike) and (not p_ct.bound() or var.is_property):
915
+ item = expand_and_bind_callable(p_ct, var, itype, name, mx, is_trivial_self)
916
+ else:
917
+ item = expand_without_binding(ct, var, itype, original_itype, mx)
918
+ bound_items.append(item)
919
+ result = UnionType.make_union(bound_items)
920
+ else:
921
+ if not var.is_ready and not mx.no_deferral:
922
+ mx.not_ready_callback(var.name, mx.context)
923
+ # Implicit 'Any' type.
924
+ result = AnyType(TypeOfAny.special_form)
925
+ fullname = f"{var.info.fullname}.{name}"
926
+ hook = mx.chk.plugin.get_attribute_hook(fullname)
927
+
928
+ if var.info.is_enum and not mx.is_lvalue:
929
+ if name in var.info.enum_members and name not in {"name", "value"}:
930
+ enum_literal = LiteralType(name, fallback=itype)
931
+ result = itype.copy_modified(last_known_value=enum_literal)
932
+ elif (
933
+ isinstance(p_result := get_proper_type(result), Instance)
934
+ and p_result.type.fullname == "enum.nonmember"
935
+ and p_result.args
936
+ ):
937
+ # Unwrap nonmember similar to class-level access
938
+ result = p_result.args[0]
939
+ if result and not (implicit or var.info.is_protocol and is_instance_var(var)):
940
+ result = analyze_descriptor_access(result, mx)
941
+ if hook:
942
+ result = hook(
943
+ AttributeContext(
944
+ get_proper_type(mx.original_type), result, mx.is_lvalue, mx.context, mx.chk
945
+ )
946
+ )
947
+ return result
948
+
949
+
950
+ def expand_without_binding(
951
+ typ: Type, var: Var, itype: Instance, original_itype: Instance, mx: MemberContext
952
+ ) -> Type:
953
+ if not mx.preserve_type_var_ids:
954
+ typ = freshen_all_functions_type_vars(typ)
955
+ typ = expand_self_type_if_needed(typ, mx, var, original_itype)
956
+ expanded = expand_type_by_instance(typ, itype)
957
+ freeze_all_type_vars(expanded)
958
+ return expanded
959
+
960
+
961
+ def expand_and_bind_callable(
962
+ functype: FunctionLike,
963
+ var: Var,
964
+ itype: Instance,
965
+ name: str,
966
+ mx: MemberContext,
967
+ is_trivial_self: bool,
968
+ ) -> Type:
969
+ if not mx.preserve_type_var_ids:
970
+ functype = freshen_all_functions_type_vars(functype)
971
+ typ = get_proper_type(expand_self_type(var, functype, mx.self_type))
972
+ assert isinstance(typ, FunctionLike)
973
+ if is_trivial_self:
974
+ typ = bind_self_fast(typ, mx.self_type)
975
+ else:
976
+ typ = check_self_arg(typ, mx.self_type, var.is_classmethod, mx.context, name, mx.msg)
977
+ typ = bind_self(typ, mx.self_type, var.is_classmethod)
978
+ expanded = expand_type_by_instance(typ, itype)
979
+ freeze_all_type_vars(expanded)
980
+ if not var.is_property:
981
+ return expanded
982
+ if isinstance(expanded, Overloaded):
983
+ # Legacy way to store settable properties is with overloads. Also in case it is
984
+ # an actual overloaded property, selecting first item that passed check_self_arg()
985
+ # is a good approximation, long-term we should use check_call() inference below.
986
+ if not expanded.items:
987
+ # A broken overload, error should be already reported.
988
+ return AnyType(TypeOfAny.from_error)
989
+ expanded = expanded.items[0]
990
+ assert isinstance(expanded, CallableType), expanded
991
+ if var.is_settable_property and mx.is_lvalue and var.setter_type is not None:
992
+ if expanded.variables:
993
+ type_ctx = mx.rvalue or TempNode(AnyType(TypeOfAny.special_form), context=mx.context)
994
+ _, inferred_expanded = mx.chk.expr_checker.check_call(
995
+ expanded, [type_ctx], [ARG_POS], mx.context
996
+ )
997
+ expanded = get_proper_type(inferred_expanded)
998
+ assert isinstance(expanded, CallableType)
999
+ if not expanded.arg_types:
1000
+ # This can happen when accessing invalid property from its own body,
1001
+ # error will be reported elsewhere.
1002
+ return AnyType(TypeOfAny.from_error)
1003
+ return expanded.arg_types[0]
1004
+ else:
1005
+ return expanded.ret_type
1006
+
1007
+
1008
+ def expand_self_type_if_needed(
1009
+ t: Type, mx: MemberContext, var: Var, itype: Instance, is_class: bool = False
1010
+ ) -> Type:
1011
+ """Expand special Self type in a backwards compatible manner.
1012
+
1013
+ This should ensure that mixing old-style and new-style self-types work
1014
+ seamlessly. Also, re-bind new style self-types in subclasses if needed.
1015
+ """
1016
+ original = get_proper_type(mx.self_type)
1017
+ if not (mx.is_self or mx.is_super):
1018
+ repl = mx.self_type
1019
+ if is_class:
1020
+ if isinstance(original, TypeType):
1021
+ repl = original.item
1022
+ elif isinstance(original, CallableType):
1023
+ # Problematic access errors should have been already reported.
1024
+ repl = erase_typevars(original.ret_type)
1025
+ else:
1026
+ repl = itype
1027
+ return expand_self_type(var, t, repl)
1028
+ elif supported_self_type(
1029
+ # Support compatibility with plain old style T -> T and Type[T] -> T only.
1030
+ get_proper_type(mx.self_type),
1031
+ allow_instances=False,
1032
+ allow_callable=False,
1033
+ ):
1034
+ repl = mx.self_type
1035
+ if is_class and isinstance(original, TypeType):
1036
+ repl = original.item
1037
+ return expand_self_type(var, t, repl)
1038
+ elif (
1039
+ mx.is_self
1040
+ and itype.type != var.info
1041
+ # If an attribute with Self-type was defined in a supertype, we need to
1042
+ # rebind the Self type variable to Self type variable of current class...
1043
+ and itype.type.self_type is not None
1044
+ # ...unless `self` has an explicit non-trivial annotation.
1045
+ and itype == mx.chk.scope.active_self_type()
1046
+ ):
1047
+ return expand_self_type(var, t, itype.type.self_type)
1048
+ else:
1049
+ return t
1050
+
1051
+
1052
+ def check_self_arg(
1053
+ functype: FunctionLike,
1054
+ dispatched_arg_type: Type,
1055
+ is_classmethod: bool,
1056
+ context: Context,
1057
+ name: str,
1058
+ msg: MessageBuilder,
1059
+ ) -> FunctionLike:
1060
+ """Check that an instance has a valid type for a method with annotated 'self'.
1061
+
1062
+ For example if the method is defined as:
1063
+ class A:
1064
+ def f(self: S) -> T: ...
1065
+ then for 'x.f' we check that type(x) <: S. If the method is overloaded, we select
1066
+ only overloads items that satisfy this requirement. If there are no matching
1067
+ overloads, an error is generated.
1068
+ """
1069
+ items = functype.items
1070
+ if not items:
1071
+ return functype
1072
+ new_items = []
1073
+ if is_classmethod:
1074
+ dispatched_arg_type = TypeType.make_normalized(dispatched_arg_type)
1075
+ p_dispatched_arg_type = get_proper_type(dispatched_arg_type)
1076
+
1077
+ for item in items:
1078
+ if not item.arg_types or item.arg_kinds[0] not in (ARG_POS, ARG_STAR):
1079
+ # No positional first (self) argument (*args is okay).
1080
+ msg.no_formal_self(name, item, context)
1081
+ # This is pretty bad, so just return the original signature if
1082
+ # there is at least one such error.
1083
+ return functype
1084
+ selfarg = get_proper_type(item.arg_types[0])
1085
+ if isinstance(selfarg, Instance) and isinstance(p_dispatched_arg_type, Instance):
1086
+ if selfarg.type is p_dispatched_arg_type.type and selfarg.args:
1087
+ if not is_overlapping_types(p_dispatched_arg_type, selfarg):
1088
+ # This special casing is needed since `actual <: erased(template)`
1089
+ # logic below doesn't always work, and a more correct approach may
1090
+ # be tricky.
1091
+ continue
1092
+ new_items.append(item)
1093
+
1094
+ if new_items:
1095
+ items = new_items
1096
+ new_items = []
1097
+
1098
+ for item in items:
1099
+ selfarg = get_proper_type(item.arg_types[0])
1100
+ # This matches similar special-casing in bind_self(), see more details there.
1101
+ self_callable = name == "__call__" and isinstance(selfarg, CallableType)
1102
+ if self_callable or is_subtype(
1103
+ dispatched_arg_type,
1104
+ # This level of erasure matches the one in checker.check_func_def(),
1105
+ # better keep these two checks consistent.
1106
+ erase_typevars(erase_to_bound(selfarg)),
1107
+ # This is to work around the fact that erased ParamSpec and TypeVarTuple
1108
+ # callables are not always compatible with non-erased ones both ways.
1109
+ always_covariant=any(
1110
+ not isinstance(tv, TypeVarType) for tv in get_all_type_vars(selfarg)
1111
+ ),
1112
+ ignore_pos_arg_names=True,
1113
+ ):
1114
+ new_items.append(item)
1115
+ elif isinstance(selfarg, ParamSpecType):
1116
+ # TODO: This is not always right. What's the most reasonable thing to do here?
1117
+ new_items.append(item)
1118
+ elif isinstance(selfarg, TypeVarTupleType):
1119
+ raise NotImplementedError
1120
+ if not new_items:
1121
+ # Choose first item for the message (it may be not very helpful for overloads).
1122
+ msg.incompatible_self_argument(
1123
+ name, dispatched_arg_type, items[0], is_classmethod, context
1124
+ )
1125
+ return functype
1126
+ if len(new_items) == 1:
1127
+ return new_items[0]
1128
+ return Overloaded(new_items)
1129
+
1130
+
1131
+ def analyze_class_attribute_access(
1132
+ itype: Instance,
1133
+ name: str,
1134
+ mx: MemberContext,
1135
+ *,
1136
+ mcs_fallback: Instance,
1137
+ override_info: TypeInfo | None = None,
1138
+ original_vars: Sequence[TypeVarLikeType] | None = None,
1139
+ ) -> Type | None:
1140
+ """Analyze access to an attribute on a class object.
1141
+
1142
+ itype is the return type of the class object callable, original_type is the type
1143
+ of E in the expression E.var, original_vars are type variables of the class callable
1144
+ (for generic classes).
1145
+ """
1146
+ info = itype.type
1147
+ if override_info:
1148
+ info = override_info
1149
+
1150
+ fullname = f"{info.fullname}.{name}"
1151
+ hook = mx.chk.plugin.get_class_attribute_hook(fullname)
1152
+
1153
+ node = info.get(name)
1154
+ if not node:
1155
+ if itype.extra_attrs and name in itype.extra_attrs.attrs:
1156
+ # For modules use direct symbol table lookup.
1157
+ if not itype.extra_attrs.mod_name:
1158
+ return itype.extra_attrs.attrs[name]
1159
+ if info.fallback_to_any or info.meta_fallback_to_any:
1160
+ return apply_class_attr_hook(mx, hook, AnyType(TypeOfAny.special_form))
1161
+ return None
1162
+
1163
+ if (
1164
+ isinstance(node.node, Var)
1165
+ and not node.node.is_classvar
1166
+ and not hook
1167
+ and mcs_fallback.type.get(name)
1168
+ ):
1169
+ # If the same attribute is declared on the metaclass and the class but with different types,
1170
+ # and the attribute on the class is not a ClassVar,
1171
+ # the type of the attribute on the metaclass should take priority
1172
+ # over the type of the attribute on the class,
1173
+ # when the attribute is being accessed from the class object itself.
1174
+ #
1175
+ # Return `None` here to signify that the name should be looked up
1176
+ # on the class object itself rather than the instance.
1177
+ return None
1178
+
1179
+ mx.chk.warn_deprecated(node.node, mx.context)
1180
+
1181
+ is_decorated = isinstance(node.node, Decorator)
1182
+ is_method = is_decorated or isinstance(node.node, FuncBase)
1183
+ if mx.is_lvalue and not mx.suppress_errors:
1184
+ if is_method:
1185
+ mx.msg.cant_assign_to_method(mx.context)
1186
+ if isinstance(node.node, TypeInfo):
1187
+ mx.fail(message_registry.CANNOT_ASSIGN_TO_TYPE)
1188
+
1189
+ # Refuse class attribute access if slot defined
1190
+ if info.slots and name in info.slots:
1191
+ mx.fail(message_registry.CLASS_VAR_CONFLICTS_SLOTS.format(name))
1192
+
1193
+ if node.implicit and isinstance(node.node, Var):
1194
+ if node.node.is_final:
1195
+ # If a final attribute was declared on `self` in `__init__`, then it
1196
+ # can't be accessed on the class object.
1197
+ mx.fail(message_registry.CANNOT_ACCESS_FINAL_INSTANCE_ATTR.format(node.node.name))
1198
+ elif not mx.is_lvalue and not defined_in_superclass(info, name):
1199
+ mx.fail(message_registry.CANNOT_ACCESS_INSTANCE_ONLY_ATTR.format(node.node.name))
1200
+
1201
+ # An assignment to final attribute on class object is also always an error,
1202
+ # independently of types.
1203
+ if mx.is_lvalue and not mx.chk.get_final_context():
1204
+ check_final_member(name, info, mx.msg, mx.context)
1205
+
1206
+ if info.is_enum and not (mx.is_lvalue or is_decorated or is_method):
1207
+ enum_class_attribute_type = analyze_enum_class_attribute_access(itype, name, mx)
1208
+ if enum_class_attribute_type:
1209
+ return apply_class_attr_hook(mx, hook, enum_class_attribute_type)
1210
+
1211
+ t = node.type
1212
+ if t:
1213
+ if isinstance(t, PartialType):
1214
+ symnode = node.node
1215
+ assert isinstance(symnode, Var)
1216
+ return apply_class_attr_hook(
1217
+ mx, hook, mx.chk.handle_partial_var_type(t, mx.is_lvalue, symnode, mx.context)
1218
+ )
1219
+
1220
+ # Find the class where method/variable was defined.
1221
+ if isinstance(node.node, Decorator):
1222
+ super_info: TypeInfo | None = node.node.var.info
1223
+ elif isinstance(node.node, (Var, SYMBOL_FUNCBASE_TYPES)):
1224
+ super_info = node.node.info
1225
+ else:
1226
+ super_info = None
1227
+
1228
+ # Map the type to how it would look as a defining class. For example:
1229
+ # class C(Generic[T]): ...
1230
+ # class D(C[Tuple[T, S]]): ...
1231
+ # D[int, str].method()
1232
+ # Here itype is D[int, str], isuper is C[Tuple[int, str]].
1233
+ if not super_info:
1234
+ isuper = None
1235
+ else:
1236
+ isuper = map_instance_to_supertype(itype, super_info)
1237
+
1238
+ if isinstance(node.node, Var):
1239
+ assert isuper is not None
1240
+ object_type = get_proper_type(mx.self_type)
1241
+ # Check if original variable type has type variables. For example:
1242
+ # class C(Generic[T]):
1243
+ # x: T
1244
+ # C.x # Error, ambiguous access
1245
+ # C[int].x # Also an error, since C[int] is same as C at runtime
1246
+ # Exception is Self type wrapped in ClassVar, that is safe.
1247
+ prohibit_self = not node.node.is_classvar
1248
+ def_vars = set(node.node.info.defn.type_vars)
1249
+ if prohibit_self and node.node.info.self_type:
1250
+ def_vars.add(node.node.info.self_type)
1251
+ # Exception: access on Type[...], including first argument of class methods is OK.
1252
+ prohibit_generic = not isinstance(object_type, TypeType) or node.implicit
1253
+ if prohibit_generic and def_vars & set(get_all_type_vars(t)):
1254
+ if node.node.is_classvar:
1255
+ message = message_registry.GENERIC_CLASS_VAR_ACCESS
1256
+ else:
1257
+ message = message_registry.GENERIC_INSTANCE_VAR_CLASS_ACCESS
1258
+ mx.fail(message)
1259
+ t = expand_self_type_if_needed(t, mx, node.node, itype, is_class=True)
1260
+ t = expand_type_by_instance(t, isuper)
1261
+ # Erase non-mapped variables, but keep mapped ones, even if there is an error.
1262
+ # In the above example this means that we infer following types:
1263
+ # C.x -> Any
1264
+ # C[int].x -> int
1265
+ if prohibit_generic:
1266
+ erase_vars = set(itype.type.defn.type_vars)
1267
+ if prohibit_self and itype.type.self_type:
1268
+ erase_vars.add(itype.type.self_type)
1269
+ t = erase_typevars(t, {tv.id for tv in erase_vars})
1270
+
1271
+ is_classmethod = (
1272
+ (is_decorated and cast(Decorator, node.node).func.is_class)
1273
+ or (isinstance(node.node, SYMBOL_FUNCBASE_TYPES) and node.node.is_class)
1274
+ or isinstance(node.node, Var)
1275
+ and node.node.is_classmethod
1276
+ )
1277
+ t = get_proper_type(t)
1278
+ is_trivial_self = False
1279
+ if isinstance(node.node, Decorator):
1280
+ # Use fast path if there are trivial decorators like @classmethod or @property
1281
+ is_trivial_self = node.node.func.is_trivial_self and not node.node.decorators
1282
+ elif isinstance(node.node, (FuncDef, OverloadedFuncDef)):
1283
+ is_trivial_self = node.node.is_trivial_self
1284
+ if (
1285
+ isinstance(t, FunctionLike)
1286
+ and is_classmethod
1287
+ and not is_trivial_self
1288
+ and not t.bound()
1289
+ ):
1290
+ t = check_self_arg(t, mx.self_type, False, mx.context, name, mx.msg)
1291
+ t = add_class_tvars(
1292
+ t,
1293
+ isuper,
1294
+ is_classmethod,
1295
+ mx,
1296
+ original_vars=original_vars,
1297
+ is_trivial_self=is_trivial_self,
1298
+ )
1299
+ if is_decorated:
1300
+ t = expand_self_type_if_needed(
1301
+ t, mx, cast(Decorator, node.node).var, itype, is_class=is_classmethod
1302
+ )
1303
+
1304
+ result = t
1305
+ # __set__ is not called on class objects.
1306
+ if not mx.is_lvalue:
1307
+ result = analyze_descriptor_access(result, mx)
1308
+
1309
+ return apply_class_attr_hook(mx, hook, result)
1310
+ elif isinstance(node.node, Var):
1311
+ mx.not_ready_callback(name, mx.context)
1312
+ return AnyType(TypeOfAny.special_form)
1313
+
1314
+ if isinstance(node.node, (TypeInfo, TypeAlias, MypyFile, TypeVarLikeExpr)):
1315
+ # TODO: should we apply class plugin here (similar to instance access)?
1316
+ return mx.chk.expr_checker.analyze_static_reference(node.node, mx.context, mx.is_lvalue)
1317
+
1318
+ if is_decorated:
1319
+ assert isinstance(node.node, Decorator)
1320
+ if node.node.type:
1321
+ return apply_class_attr_hook(mx, hook, node.node.type)
1322
+ else:
1323
+ mx.not_ready_callback(name, mx.context)
1324
+ return AnyType(TypeOfAny.from_error)
1325
+ else:
1326
+ assert isinstance(node.node, SYMBOL_FUNCBASE_TYPES)
1327
+ typ = mx.chk.function_type(node.node)
1328
+ # Note: if we are accessing class method on class object, the cls argument is bound.
1329
+ # Annotated and/or explicit class methods go through other code paths above, for
1330
+ # unannotated implicit class methods we do this here.
1331
+ if node.node.is_class:
1332
+ typ = bind_self_fast(typ)
1333
+ return apply_class_attr_hook(mx, hook, typ)
1334
+
1335
+
1336
+ def apply_class_attr_hook(
1337
+ mx: MemberContext, hook: Callable[[AttributeContext], Type] | None, result: Type
1338
+ ) -> Type | None:
1339
+ if hook:
1340
+ result = hook(
1341
+ AttributeContext(
1342
+ get_proper_type(mx.original_type), result, mx.is_lvalue, mx.context, mx.chk
1343
+ )
1344
+ )
1345
+ return result
1346
+
1347
+
1348
+ def analyze_enum_class_attribute_access(
1349
+ itype: Instance, name: str, mx: MemberContext
1350
+ ) -> Type | None:
1351
+ # Skip these since Enum will remove it
1352
+ if name in EXCLUDED_ENUM_ATTRIBUTES:
1353
+ return report_missing_attribute(mx.original_type, itype, name, mx)
1354
+
1355
+ node = itype.type.get(name)
1356
+ if node and node.type:
1357
+ proper = get_proper_type(node.type)
1358
+ # Support `A = nonmember(1)` function call and decorator.
1359
+ if (
1360
+ isinstance(proper, Instance)
1361
+ and proper.type.fullname == "enum.nonmember"
1362
+ and proper.args
1363
+ ):
1364
+ return proper.args[0]
1365
+
1366
+ if name not in itype.type.enum_members:
1367
+ return None
1368
+
1369
+ enum_literal = LiteralType(name, fallback=itype)
1370
+ return itype.copy_modified(last_known_value=enum_literal)
1371
+
1372
+
1373
+ def analyze_typeddict_access(
1374
+ name: str, typ: TypedDictType, mx: MemberContext, override_info: TypeInfo | None
1375
+ ) -> Type:
1376
+ if name == "__setitem__":
1377
+ if isinstance(mx.context, IndexExpr):
1378
+ # Since we can get this during `a['key'] = ...`
1379
+ # it is safe to assume that the context is `IndexExpr`.
1380
+ item_type, key_names = mx.chk.expr_checker.visit_typeddict_index_expr(
1381
+ typ, mx.context.index, setitem=True
1382
+ )
1383
+ assigned_readonly_keys = typ.readonly_keys & key_names
1384
+ if assigned_readonly_keys and not mx.suppress_errors:
1385
+ mx.msg.readonly_keys_mutated(assigned_readonly_keys, context=mx.context)
1386
+ else:
1387
+ # It can also be `a.__setitem__(...)` direct call.
1388
+ # In this case `item_type` can be `Any`,
1389
+ # because we don't have args available yet.
1390
+ # TODO: check in `default` plugin that `__setitem__` is correct.
1391
+ item_type = AnyType(TypeOfAny.implementation_artifact)
1392
+ return CallableType(
1393
+ arg_types=[mx.chk.named_type("builtins.str"), item_type],
1394
+ arg_kinds=[ARG_POS, ARG_POS],
1395
+ arg_names=[None, None],
1396
+ ret_type=NoneType(),
1397
+ fallback=mx.chk.named_type("builtins.function"),
1398
+ name=name,
1399
+ )
1400
+ elif name == "__delitem__":
1401
+ return CallableType(
1402
+ arg_types=[mx.chk.named_type("builtins.str")],
1403
+ arg_kinds=[ARG_POS],
1404
+ arg_names=[None],
1405
+ ret_type=NoneType(),
1406
+ fallback=mx.chk.named_type("builtins.function"),
1407
+ name=name,
1408
+ )
1409
+ return _analyze_member_access(name, typ.fallback, mx, override_info)
1410
+
1411
+
1412
+ def add_class_tvars(
1413
+ t: ProperType,
1414
+ isuper: Instance | None,
1415
+ is_classmethod: bool,
1416
+ mx: MemberContext,
1417
+ original_vars: Sequence[TypeVarLikeType] | None = None,
1418
+ is_trivial_self: bool = False,
1419
+ ) -> Type:
1420
+ """Instantiate type variables during analyze_class_attribute_access,
1421
+ e.g T and Q in the following:
1422
+
1423
+ class A(Generic[T]):
1424
+ @classmethod
1425
+ def foo(cls: Type[Q]) -> Tuple[T, Q]: ...
1426
+
1427
+ class B(A[str]): pass
1428
+ B.foo()
1429
+
1430
+ Args:
1431
+ t: Declared type of the method (or property)
1432
+ isuper: Current instance mapped to the superclass where method was defined, this
1433
+ is usually done by map_instance_to_supertype()
1434
+ is_classmethod: True if this method is decorated with @classmethod
1435
+ original_vars: Type variables of the class callable on which the method was accessed
1436
+ is_trivial_self: if True, we can use fast path for bind_self().
1437
+ Returns:
1438
+ Expanded method type with added type variables (when needed).
1439
+ """
1440
+ # TODO: verify consistency between Q and T
1441
+
1442
+ # We add class type variables if the class method is accessed on class object
1443
+ # without applied type arguments, this matches the behavior of __init__().
1444
+ # For example (continuing the example in docstring):
1445
+ # A # The type of callable is def [T] () -> A[T], _not_ def () -> A[Any]
1446
+ # A[int] # The type of callable is def () -> A[int]
1447
+ # and
1448
+ # A.foo # The type is generic def [T] () -> Tuple[T, A[T]]
1449
+ # A[int].foo # The type is non-generic def () -> Tuple[int, A[int]]
1450
+ #
1451
+ # This behaviour is useful for defining alternative constructors for generic classes.
1452
+ # To achieve such behaviour, we add the class type variables that are still free
1453
+ # (i.e. appear in the return type of the class object on which the method was accessed).
1454
+ if isinstance(t, CallableType):
1455
+ tvars = original_vars if original_vars is not None else []
1456
+ if not mx.preserve_type_var_ids:
1457
+ t = freshen_all_functions_type_vars(t)
1458
+ if is_classmethod and not t.is_bound:
1459
+ if is_trivial_self:
1460
+ t = bind_self_fast(t, mx.self_type)
1461
+ else:
1462
+ t = bind_self(t, mx.self_type, is_classmethod=True)
1463
+ if isuper is not None:
1464
+ t = expand_type_by_instance(t, isuper)
1465
+ freeze_all_type_vars(t)
1466
+ return t.copy_modified(variables=list(tvars) + list(t.variables))
1467
+ elif isinstance(t, Overloaded):
1468
+ return Overloaded(
1469
+ [
1470
+ cast(
1471
+ CallableType,
1472
+ add_class_tvars(item, isuper, is_classmethod, mx, original_vars=original_vars),
1473
+ )
1474
+ for item in t.items
1475
+ ]
1476
+ )
1477
+ if isuper is not None:
1478
+ t = expand_type_by_instance(t, isuper)
1479
+ return t
1480
+
1481
+
1482
+ def analyze_decorator_or_funcbase_access(
1483
+ defn: Decorator | FuncBase, itype: Instance, name: str, mx: MemberContext
1484
+ ) -> Type:
1485
+ """Analyzes the type behind method access.
1486
+
1487
+ The function itself can possibly be decorated.
1488
+ See: https://github.com/python/mypy/issues/10409
1489
+ """
1490
+ if isinstance(defn, Decorator):
1491
+ return analyze_var(name, defn.var, itype, mx)
1492
+ typ = mx.chk.function_type(defn)
1493
+ if isinstance(defn, (FuncDef, OverloadedFuncDef)) and defn.is_trivial_self:
1494
+ return bind_self_fast(typ, mx.self_type)
1495
+ typ = check_self_arg(typ, mx.self_type, defn.is_class, mx.context, name, mx.msg)
1496
+ return bind_self(typ, original_type=mx.self_type, is_classmethod=defn.is_class)
1497
+
1498
+
1499
+ F = TypeVar("F", bound=FunctionLike)
1500
+
1501
+
1502
+ def bind_self_fast(method: F, original_type: Type | None = None) -> F:
1503
+ """Return a copy of `method`, with the type of its first parameter (usually
1504
+ self or cls) bound to original_type.
1505
+
1506
+ This is a faster version of mypy.typeops.bind_self() that can be used for methods
1507
+ with trivial self/cls annotations.
1508
+ """
1509
+ if isinstance(method, Overloaded):
1510
+ items = [bind_self_fast(c, original_type) for c in method.items]
1511
+ return cast(F, Overloaded(items))
1512
+ assert isinstance(method, CallableType)
1513
+ if not method.arg_types:
1514
+ # Invalid method, return something.
1515
+ return method
1516
+ if method.arg_kinds[0] in (ARG_STAR, ARG_STAR2):
1517
+ # See typeops.py for details.
1518
+ return method
1519
+ return method.copy_modified(
1520
+ arg_types=method.arg_types[1:],
1521
+ arg_kinds=method.arg_kinds[1:],
1522
+ arg_names=method.arg_names[1:],
1523
+ is_bound=True,
1524
+ )
1525
+
1526
+
1527
+ def has_operator(typ: Type, op_method: str) -> bool:
1528
+ """Does type have operator with the given name?
1529
+
1530
+ Note: this follows the rules for operator access, in particular:
1531
+ * __getattr__ is not considered
1532
+ * for class objects we only look in metaclass
1533
+ * instance level attributes (i.e. extra_attrs) are not considered
1534
+ """
1535
+ # This is much faster than analyze_member_access, and so using
1536
+ # it first as a filter is important for performance. This is mostly relevant
1537
+ # in situations where we can't expect that method is likely present,
1538
+ # e.g. for __OP__ vs __rOP__.
1539
+ typ = get_proper_type(typ)
1540
+
1541
+ if isinstance(typ, TypeVarLikeType):
1542
+ typ = typ.values_or_bound()
1543
+ if isinstance(typ, AnyType):
1544
+ return True
1545
+ if isinstance(typ, UnionType):
1546
+ return all(has_operator(x, op_method) for x in typ.relevant_items())
1547
+ if isinstance(typ, FunctionLike) and typ.is_type_obj():
1548
+ return typ.fallback.type.has_readable_member(op_method)
1549
+ if isinstance(typ, TypeType):
1550
+ # Type[Union[X, ...]] is always normalized to Union[Type[X], ...],
1551
+ # so we don't need to care about unions here, but we need to care about
1552
+ # Type[T], where upper bound of T is a union.
1553
+ item = typ.item
1554
+ if isinstance(item, TypeVarType):
1555
+ item = item.values_or_bound()
1556
+ if isinstance(item, UnionType):
1557
+ return all(meta_has_operator(x, op_method) for x in item.relevant_items())
1558
+ return meta_has_operator(item, op_method)
1559
+ return instance_fallback(typ).type.has_readable_member(op_method)
1560
+
1561
+
1562
+ def instance_fallback(typ: ProperType) -> Instance:
1563
+ if isinstance(typ, Instance):
1564
+ return typ
1565
+ if isinstance(typ, TupleType):
1566
+ return tuple_fallback(typ)
1567
+ if isinstance(typ, (LiteralType, TypedDictType)):
1568
+ return typ.fallback
1569
+ if instance_cache.object_type is None:
1570
+ object_typeinfo = lookup_stdlib_typeinfo("builtins.object", modules_state.modules)
1571
+ instance_cache.object_type = Instance(object_typeinfo, [])
1572
+ return instance_cache.object_type
1573
+
1574
+
1575
+ def meta_has_operator(item: Type, op_method: str) -> bool:
1576
+ item = get_proper_type(item)
1577
+ if isinstance(item, AnyType):
1578
+ return True
1579
+ item = instance_fallback(item)
1580
+ meta = item.type.metaclass_type
1581
+ if meta is None:
1582
+ type_type = lookup_stdlib_typeinfo("builtins.type", modules_state.modules)
1583
+ meta = Instance(type_type, [])
1584
+ return meta.type.has_readable_member(op_method)
1585
+
1586
+
1587
+ def defined_in_superclass(info: TypeInfo, name: str) -> bool:
1588
+ """Check if a variable has an explicit value at class level in any of superclasses."""
1589
+ for base in info.mro[1:]:
1590
+ if (node := base.names.get(name)) is not None:
1591
+ if not node.implicit and isinstance(node.node, Var) and node.node.has_explicit_value:
1592
+ return True
1593
+ return False