jaclang 0.7.33__py3-none-any.whl → 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jaclang might be problematic. Click here for more details.

Files changed (1481) hide show
  1. jaclang/__init__.py +7 -414
  2. jaclang/cli/cli.md +5 -5
  3. jaclang/cli/cli.py +311 -214
  4. jaclang/cli/cmdreg.py +188 -31
  5. jaclang/compiler/__init__.py +10 -15
  6. jaclang/compiler/{codeloc.py → codeinfo.py} +11 -30
  7. jaclang/compiler/constant.py +10 -33
  8. jaclang/compiler/jac.lark +61 -92
  9. jaclang/compiler/larkparse/jac_parser.py +3444 -0
  10. jaclang/compiler/parser.py +1054 -1341
  11. jaclang/compiler/passes/__init__.py +2 -2
  12. jaclang/compiler/passes/main/__init__.py +33 -14
  13. jaclang/compiler/passes/main/annex_pass.py +85 -0
  14. jaclang/compiler/passes/main/cfg_build_pass.py +275 -0
  15. jaclang/compiler/passes/main/def_impl_match_pass.py +146 -102
  16. jaclang/compiler/passes/main/def_use_pass.py +64 -269
  17. jaclang/compiler/passes/main/import_pass.py +175 -360
  18. jaclang/compiler/passes/main/inheritance_pass.py +107 -105
  19. jaclang/compiler/passes/main/pyast_gen_pass.py +1129 -1600
  20. jaclang/compiler/passes/main/pyast_load_pass.py +540 -584
  21. jaclang/compiler/passes/main/pybc_gen_pass.py +38 -35
  22. jaclang/compiler/passes/main/pyjac_ast_link_pass.py +46 -160
  23. jaclang/compiler/passes/main/sym_tab_build_pass.py +113 -1202
  24. jaclang/compiler/passes/main/sym_tab_link_pass.py +141 -0
  25. jaclang/{tests → compiler/passes/main/tests}/fixtures/access_modifier.jac +10 -9
  26. jaclang/compiler/passes/main/tests/fixtures/atest.impl.jac +3 -0
  27. jaclang/compiler/passes/main/tests/fixtures/atest.jac +11 -0
  28. jaclang/compiler/passes/main/tests/fixtures/autoimpl.impl/getme.impl.jac +1 -1
  29. jaclang/compiler/passes/main/tests/fixtures/autoimpl.impl.jac +1 -1
  30. jaclang/compiler/passes/main/tests/fixtures/autoimpl.jac +3 -3
  31. jaclang/compiler/passes/main/tests/fixtures/autoimpl.something.else.impl.jac +1 -1
  32. jaclang/compiler/passes/main/tests/fixtures/base.impl.jac +8 -0
  33. jaclang/compiler/passes/main/tests/fixtures/base.jac +4 -4
  34. jaclang/compiler/passes/main/tests/fixtures/base2.impl.jac +8 -0
  35. jaclang/compiler/passes/main/tests/fixtures/base2.jac +4 -4
  36. jaclang/compiler/passes/main/tests/fixtures/blip.jac +1 -1
  37. jaclang/compiler/passes/main/tests/fixtures/cfg_ability_test.jac +23 -0
  38. jaclang/compiler/passes/main/tests/fixtures/cfg_gen.jac +19 -0
  39. jaclang/compiler/passes/main/tests/fixtures/circular_import.jac +7 -0
  40. jaclang/compiler/passes/main/tests/fixtures/data_spatial_types.jac +12 -12
  41. jaclang/compiler/passes/main/tests/fixtures/decls.jac +4 -4
  42. jaclang/compiler/passes/main/tests/fixtures/defn_decl_mismatch.jac +4 -4
  43. jaclang/compiler/passes/main/tests/fixtures/defs_and_uses.jac +6 -6
  44. jaclang/compiler/passes/main/tests/fixtures/enumerations.jac +13 -0
  45. jaclang/compiler/passes/main/tests/fixtures/fstrings.jac +1 -1
  46. jaclang/compiler/passes/main/tests/fixtures/func.jac +2 -2
  47. jaclang/compiler/passes/main/tests/fixtures/func2.jac +1 -1
  48. jaclang/compiler/passes/main/tests/fixtures/game1.jac +4 -4
  49. jaclang/compiler/passes/main/tests/fixtures/impl/defs1.jac +2 -2
  50. jaclang/compiler/passes/main/tests/fixtures/impl/defs2.jac +2 -2
  51. jaclang/compiler/passes/main/tests/fixtures/impl/imps.jac +0 -8
  52. jaclang/compiler/passes/main/tests/fixtures/impl_grab.impl.jac +5 -0
  53. jaclang/{tests → compiler/passes/main/tests}/fixtures/impl_grab.jac +1 -1
  54. jaclang/compiler/passes/main/tests/fixtures/incautoimpl.jac +1 -1
  55. jaclang/compiler/passes/main/tests/fixtures/main_err.impl.jac +6 -0
  56. jaclang/compiler/passes/main/tests/fixtures/main_err.jac +6 -0
  57. jaclang/compiler/passes/main/tests/fixtures/mod_type_assign.jac +1 -1
  58. jaclang/compiler/passes/main/tests/fixtures/mtest.impl.jac +6 -0
  59. jaclang/{tests → compiler/passes/main/tests}/fixtures/mtest.jac +1 -1
  60. jaclang/{tests → compiler/passes/main/tests}/fixtures/nested_impls.jac +14 -15
  61. jaclang/compiler/passes/main/tests/fixtures/py_imp_test.jac +7 -7
  62. jaclang/compiler/passes/main/tests/fixtures/second_err.jac +4 -0
  63. jaclang/compiler/passes/main/tests/fixtures/str2doc.py +3 -0
  64. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/action/__init__.py +5 -0
  65. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/action/actions.jac +23 -0
  66. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/main.jac +14 -0
  67. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/no_dupls.jac +35 -0
  68. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/one.jac +8 -0
  69. jaclang/compiler/passes/main/tests/fixtures/type_info.jac +4 -4
  70. jaclang/compiler/passes/main/tests/test_cfg_build_pass.py +99 -0
  71. jaclang/compiler/passes/main/tests/test_decl_impl_match_pass.py +157 -0
  72. jaclang/compiler/passes/main/tests/test_def_use_pass.py +4 -6
  73. jaclang/compiler/passes/main/tests/test_import_pass.py +59 -46
  74. jaclang/compiler/passes/main/tests/test_pyast_build_pass.py +15 -0
  75. jaclang/compiler/passes/main/tests/test_pyast_gen_pass.py +25 -34
  76. jaclang/compiler/passes/main/tests/test_pybc_gen_pass.py +3 -3
  77. jaclang/compiler/passes/main/tests/test_sub_node_pass.py +8 -7
  78. jaclang/compiler/passes/main/tests/test_sym_tab_build_pass.py +4 -4
  79. jaclang/compiler/passes/main/tests/test_sym_tab_link_pass.py +62 -0
  80. jaclang/compiler/passes/tool/__init__.py +2 -0
  81. jaclang/compiler/passes/tool/doc_ir.py +179 -0
  82. jaclang/compiler/passes/tool/doc_ir_gen_pass.py +1210 -0
  83. jaclang/compiler/passes/tool/fuse_comments_pass.py +90 -70
  84. jaclang/compiler/passes/tool/jac_formatter_pass.py +122 -2554
  85. jaclang/compiler/passes/tool/tests/fixtures/corelib.jac +249 -97
  86. jaclang/compiler/passes/tool/tests/fixtures/corelib_fmt.jac +94 -97
  87. jaclang/compiler/passes/tool/tests/fixtures/doc_string.jac +2 -2
  88. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/access_mod_check.jac +5 -5
  89. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/archetype_test.jac +13 -0
  90. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/decorator_stack.jac +7 -7
  91. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/line_spacing.jac +8 -8
  92. jaclang/compiler/passes/tool/tests/fixtures/multi_def_err.dot +3 -3
  93. jaclang/compiler/passes/tool/tests/fixtures/multi_def_err.txt +3 -3
  94. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/ability_impl_long_comprehension.jac +1 -1
  95. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/call_with_many_parameters.jac +2 -2
  96. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/simple_walker.jac +3 -3
  97. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/try_block_and_walker_spawn_and_fstrings.jac +1 -1
  98. jaclang/compiler/passes/tool/tests/fixtures/myca_formatted_code/type_annotation.jac +1 -1
  99. jaclang/compiler/passes/tool/tests/fixtures/simple_walk.jac +1 -1
  100. jaclang/compiler/passes/tool/tests/fixtures/simple_walk_fmt.jac +10 -4
  101. jaclang/compiler/passes/tool/tests/test_doc_ir_gen_pass.py +29 -0
  102. jaclang/compiler/passes/tool/tests/test_jac_format_pass.py +63 -88
  103. jaclang/compiler/passes/tool/tests/test_unparse_validate.py +27 -28
  104. jaclang/compiler/passes/transform.py +56 -16
  105. jaclang/compiler/passes/{ir_pass.py → uni_pass.py} +35 -52
  106. jaclang/compiler/program.py +205 -0
  107. jaclang/compiler/tests/fixtures/codegentext.jac +31 -0
  108. jaclang/compiler/tests/fixtures/fam.jac +10 -10
  109. jaclang/compiler/tests/fixtures/hello_world.jac +1 -1
  110. jaclang/compiler/tests/fixtures/staticcheck.jac +2 -2
  111. jaclang/compiler/tests/test_importer.py +21 -16
  112. jaclang/compiler/tests/test_parser.py +38 -17
  113. jaclang/compiler/{absyntree.py → unitree.py} +1120 -1012
  114. jaclang/langserve/engine.py +183 -171
  115. jaclang/langserve/sem_manager.py +26 -22
  116. jaclang/langserve/server.py +6 -15
  117. jaclang/langserve/tests/fixtures/base_module_structure.jac +7 -7
  118. jaclang/langserve/tests/fixtures/circle.jac +6 -6
  119. jaclang/langserve/tests/fixtures/circle_err.jac +6 -6
  120. jaclang/langserve/tests/fixtures/circle_pure.impl.jac +5 -5
  121. jaclang/langserve/tests/fixtures/circle_pure.jac +7 -7
  122. jaclang/langserve/tests/fixtures/circle_pure_err.impl.jac +2 -2
  123. jaclang/langserve/tests/fixtures/circle_pure_err.jac +7 -7
  124. jaclang/langserve/tests/fixtures/import_include_statements.jac +6 -6
  125. jaclang/langserve/tests/fixtures/rename.jac +6 -6
  126. jaclang/langserve/tests/server_test/test_lang_serve.py +262 -0
  127. jaclang/langserve/tests/server_test/utils.py +115 -0
  128. jaclang/langserve/tests/test_sem_tokens.py +2 -2
  129. jaclang/langserve/tests/test_server.py +41 -23
  130. jaclang/langserve/utils.jac +438 -0
  131. jaclang/runtimelib/{architype.py → archetype.py} +85 -61
  132. jaclang/runtimelib/builtin.py +92 -0
  133. jaclang/runtimelib/constructs.py +11 -13
  134. jaclang/runtimelib/importer.py +63 -51
  135. jaclang/runtimelib/machine.py +1551 -144
  136. jaclang/runtimelib/memory.py +6 -6
  137. jaclang/{plugin → runtimelib}/tests/fixtures/graph_purger.jac +1 -1
  138. jaclang/{plugin → runtimelib}/tests/fixtures/impl_match.jac +2 -2
  139. jaclang/runtimelib/tests/fixtures/impl_match_impl.jac +3 -0
  140. jaclang/{plugin → runtimelib}/tests/fixtures/other_root_access.jac +7 -7
  141. jaclang/{plugin → runtimelib}/tests/fixtures/savable_object.jac +3 -5
  142. jaclang/{plugin → runtimelib}/tests/fixtures/simple_node_connection.jac +6 -6
  143. jaclang/{plugin → runtimelib}/tests/fixtures/simple_persistent.jac +1 -1
  144. jaclang/runtimelib/tests/test_features.py +72 -0
  145. jaclang/{plugin → runtimelib}/tests/test_jaseci.py +6 -5
  146. jaclang/runtimelib/utils.py +31 -63
  147. jaclang/settings.py +1 -6
  148. jaclang/tests/fixtures/{abc.jac → abc_check.jac} +6 -6
  149. jaclang/tests/fixtures/arch_rel_import_creation.jac +4 -4
  150. jaclang/tests/fixtures/async_ability.jac +18 -0
  151. jaclang/tests/fixtures/async_walker.jac +23 -0
  152. jaclang/tests/fixtures/baddy.jac +1 -1
  153. jaclang/tests/fixtures/base_class1.jac +2 -2
  154. jaclang/tests/fixtures/base_class2.jac +2 -2
  155. jaclang/tests/fixtures/base_class_complex_expr.jac +3 -3
  156. jaclang/tests/fixtures/builtin_dotgen.jac +1 -1
  157. jaclang/tests/fixtures/builtin_dotgen_json.jac +21 -0
  158. jaclang/tests/fixtures/byllmissue.jac +1 -1
  159. jaclang/tests/fixtures/chandra_bugs.jac +1 -1
  160. jaclang/tests/fixtures/chandra_bugs2.jac +1 -1
  161. jaclang/tests/fixtures/cls_method.jac +6 -6
  162. jaclang/tests/fixtures/concurrency.jac +39 -0
  163. jaclang/tests/fixtures/connect_traverse_syntax.jac +18 -0
  164. jaclang/tests/fixtures/create_dynamic_archetype.jac +35 -0
  165. jaclang/tests/fixtures/decl_defn_param_name.jac +4 -4
  166. jaclang/tests/fixtures/deep/deeper/__init__.jac +1 -0
  167. jaclang/tests/fixtures/deep/deeper/deep_outer_import.jac +2 -3
  168. jaclang/tests/fixtures/deep/deeper/deep_outer_import2.jac +3 -3
  169. jaclang/tests/fixtures/deep/deeper/snd_lev.jac +2 -2
  170. jaclang/tests/fixtures/deep/mycode.jac +1 -1
  171. jaclang/tests/fixtures/deep/one_lev.jac +3 -4
  172. jaclang/tests/fixtures/deep/one_lev_dup.jac +2 -2
  173. jaclang/tests/fixtures/deep_convert.jac +1 -1
  174. jaclang/tests/fixtures/deep_import.jac +2 -2
  175. jaclang/tests/fixtures/deep_import_interp.jac +8 -0
  176. jaclang/tests/fixtures/deep_import_mods.jac +3 -3
  177. jaclang/tests/fixtures/deferred_field.jac +1 -1
  178. jaclang/tests/fixtures/del_clean.jac +7 -0
  179. jaclang/tests/fixtures/disconn.jac +3 -3
  180. jaclang/tests/fixtures/dynamic_archetype.jac +34 -0
  181. jaclang/tests/fixtures/edge_node_walk.jac +12 -12
  182. jaclang/tests/fixtures/edge_ops.jac +7 -7
  183. jaclang/tests/fixtures/edges_walk.jac +10 -10
  184. jaclang/tests/fixtures/edgetypeissue.jac +1 -1
  185. jaclang/tests/fixtures/enum_inside_archtype.jac +4 -4
  186. jaclang/tests/fixtures/err.impl.jac +1 -1
  187. jaclang/tests/fixtures/err.jac +2 -2
  188. jaclang/tests/fixtures/err_runtime.jac +2 -2
  189. jaclang/tests/fixtures/foo.jac +7 -7
  190. jaclang/tests/fixtures/game1.jac +4 -4
  191. jaclang/tests/fixtures/gendot_bubble_sort.jac +4 -4
  192. jaclang/tests/fixtures/glob_multivar_statement.jac +1 -1
  193. jaclang/tests/fixtures/guess_game.jac +5 -5
  194. jaclang/tests/fixtures/has_goodness.jac +1 -1
  195. jaclang/tests/fixtures/hash_init_check.jac +3 -3
  196. jaclang/tests/fixtures/hello.jac +1 -1
  197. jaclang/tests/fixtures/ignore.jac +3 -3
  198. jaclang/tests/fixtures/ignore_dup.jac +3 -3
  199. jaclang/tests/fixtures/impl_match_confused.impl.jac +1 -1
  200. jaclang/tests/fixtures/import.jac +9 -9
  201. jaclang/tests/fixtures/import_all.jac +1 -1
  202. jaclang/tests/fixtures/index_slice.jac +1 -1
  203. jaclang/tests/fixtures/inherit_check.jac +3 -3
  204. jaclang/tests/fixtures/jac_from_py.py +4 -0
  205. jaclang/tests/fixtures/jacsamp.jac +1 -1
  206. jaclang/tests/fixtures/jactest_main.jac +1 -1
  207. jaclang/tests/fixtures/jp_importer.jac +7 -8
  208. jaclang/tests/fixtures/jp_importer_auto.jac +3 -3
  209. jaclang/tests/fixtures/lambda.jac +2 -2
  210. jaclang/tests/fixtures/needs_import.jac +6 -6
  211. jaclang/tests/fixtures/needs_import_1.jac +1 -1
  212. jaclang/tests/fixtures/needs_import_2.jac +1 -1
  213. jaclang/tests/fixtures/needs_import_3.jac +1 -1
  214. jaclang/tests/fixtures/needs_import_dup.jac +6 -6
  215. jaclang/tests/fixtures/node_del.jac +60 -0
  216. jaclang/tests/fixtures/nosigself.jac +3 -3
  217. jaclang/tests/fixtures/py2jac.py +30 -0
  218. jaclang/tests/fixtures/py_bool_expr.py +7 -0
  219. jaclang/tests/fixtures/py_namedexpr.py +7 -0
  220. jaclang/tests/fixtures/pyfunc_3.py +0 -2
  221. jaclang/tests/fixtures/random_check.jac +5 -5
  222. jaclang/tests/fixtures/refs_target.jac +17 -0
  223. jaclang/tests/fixtures/simple_archs.jac +2 -2
  224. jaclang/tests/fixtures/simple_walk.jac +52 -0
  225. jaclang/tests/fixtures/slice_vals.jac +3 -3
  226. jaclang/tests/fixtures/sub_abil_sep.jac +3 -3
  227. jaclang/tests/fixtures/sub_abil_sep_multilev.jac +3 -3
  228. jaclang/tests/fixtures/trailing_comma.jac +4 -4
  229. jaclang/tests/fixtures/type_info.jac +5 -5
  230. jaclang/{compiler/passes/main/tests → tests}/fixtures/uninitialized_hasvars.jac +1 -1
  231. jaclang/tests/fixtures/visit_order.jac +4 -4
  232. jaclang/tests/fixtures/walker_override.jac +2 -2
  233. jaclang/tests/fixtures/walker_update.jac +5 -5
  234. jaclang/tests/fixtures/with_context.jac +4 -4
  235. jaclang/tests/test_bugs.py +2 -2
  236. jaclang/tests/test_cli.py +118 -223
  237. jaclang/tests/test_language.py +474 -468
  238. jaclang/tests/test_man_code.py +2 -2
  239. jaclang/tests/test_reference.py +4 -4
  240. jaclang/tests/test_settings.py +16 -16
  241. jaclang/tests/test_typecheck.py +555 -0
  242. jaclang/utils/__init__.py +4 -0
  243. jaclang/utils/helpers.py +12 -27
  244. jaclang/utils/lang_tools.py +84 -74
  245. jaclang/utils/module_resolver.py +69 -0
  246. jaclang/utils/test.py +8 -5
  247. jaclang/utils/tests/test_lang_tools.py +38 -13
  248. jaclang/utils/treeprinter.py +177 -40
  249. jaclang/vendor/__init__.py +1 -2
  250. jaclang/vendor/attr/__init__.py +14 -44
  251. jaclang/vendor/attr/__init__.pyi +155 -321
  252. jaclang/vendor/attr/_cmp.py +25 -15
  253. jaclang/vendor/attr/_cmp.pyi +7 -7
  254. jaclang/vendor/attr/_compat.py +15 -8
  255. jaclang/vendor/attr/_config.py +1 -1
  256. jaclang/vendor/attr/_funcs.py +148 -163
  257. jaclang/vendor/attr/_make.py +859 -855
  258. jaclang/vendor/attr/_next_gen.py +426 -32
  259. jaclang/vendor/attr/converters.py +67 -49
  260. jaclang/vendor/attr/converters.pyi +13 -7
  261. jaclang/vendor/attr/filters.py +17 -11
  262. jaclang/vendor/attr/filters.pyi +3 -3
  263. jaclang/vendor/attr/setters.py +11 -5
  264. jaclang/vendor/attr/setters.pyi +2 -1
  265. jaclang/vendor/attr/validators.py +191 -162
  266. jaclang/vendor/attr/validators.pyi +25 -27
  267. jaclang/vendor/attrs/__init__.py +9 -5
  268. jaclang/vendor/attrs/__init__.pyi +225 -29
  269. jaclang/vendor/attrs-25.3.0.dist-info/INSTALLER +1 -0
  270. jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/METADATA +83 -53
  271. jaclang/vendor/attrs-25.3.0.dist-info/RECORD +56 -0
  272. jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/WHEEL +1 -1
  273. jaclang/vendor/bin/dmypy +8 -0
  274. jaclang/vendor/bin/mypy +8 -0
  275. jaclang/vendor/bin/mypyc +8 -0
  276. jaclang/vendor/bin/stubgen +8 -0
  277. jaclang/vendor/bin/stubtest +8 -0
  278. jaclang/vendor/cattr/gen.py +2 -2
  279. jaclang/vendor/cattr/preconf/bson.py +1 -0
  280. jaclang/vendor/cattr/preconf/json.py +1 -0
  281. jaclang/vendor/cattr/preconf/msgpack.py +1 -0
  282. jaclang/vendor/cattr/preconf/orjson.py +1 -0
  283. jaclang/vendor/cattr/preconf/pyyaml.py +1 -0
  284. jaclang/vendor/cattr/preconf/tomlkit.py +1 -0
  285. jaclang/vendor/cattr/preconf/ujson.py +1 -0
  286. jaclang/vendor/cattrs/__init__.py +21 -21
  287. jaclang/vendor/cattrs/_compat.py +176 -62
  288. jaclang/vendor/cattrs/_generics.py +5 -3
  289. jaclang/vendor/cattrs/cols.py +289 -0
  290. jaclang/vendor/cattrs/converters.py +505 -187
  291. jaclang/vendor/cattrs/disambiguators.py +118 -45
  292. jaclang/vendor/cattrs/dispatch.py +66 -36
  293. jaclang/vendor/cattrs/fns.py +6 -1
  294. jaclang/vendor/cattrs/gen/__init__.py +365 -202
  295. jaclang/vendor/cattrs/gen/_generics.py +41 -5
  296. jaclang/vendor/cattrs/gen/_lc.py +3 -2
  297. jaclang/vendor/cattrs/gen/_shared.py +39 -32
  298. jaclang/vendor/cattrs/gen/typeddicts.py +75 -88
  299. jaclang/vendor/cattrs/preconf/__init__.py +20 -0
  300. jaclang/vendor/cattrs/preconf/bson.py +7 -8
  301. jaclang/vendor/cattrs/preconf/cbor2.py +3 -0
  302. jaclang/vendor/cattrs/preconf/json.py +8 -4
  303. jaclang/vendor/cattrs/preconf/msgpack.py +3 -0
  304. jaclang/vendor/cattrs/preconf/msgspec.py +185 -0
  305. jaclang/vendor/cattrs/preconf/orjson.py +20 -7
  306. jaclang/vendor/cattrs/preconf/pyyaml.py +15 -3
  307. jaclang/vendor/cattrs/preconf/tomlkit.py +3 -1
  308. jaclang/vendor/cattrs/preconf/ujson.py +3 -0
  309. jaclang/vendor/cattrs/strategies/__init__.py +1 -0
  310. jaclang/vendor/cattrs/strategies/_class_methods.py +1 -1
  311. jaclang/vendor/cattrs/strategies/_subclasses.py +43 -29
  312. jaclang/vendor/cattrs/strategies/_unions.py +47 -24
  313. jaclang/vendor/cattrs/v.py +1 -0
  314. jaclang/vendor/cattrs-24.1.3.dist-info/INSTALLER +1 -0
  315. jaclang/vendor/cattrs-24.1.3.dist-info/METADATA +161 -0
  316. jaclang/vendor/cattrs-24.1.3.dist-info/RECORD +96 -0
  317. jaclang/vendor/{cattrs-23.2.3.dist-info → cattrs-24.1.3.dist-info}/WHEEL +1 -1
  318. jaclang/vendor/lark/__init__.py +38 -38
  319. jaclang/vendor/lark/__pyinstaller/__init__.py +6 -6
  320. jaclang/vendor/lark/__pyinstaller/hook-lark.py +14 -14
  321. jaclang/vendor/lark/ast_utils.py +59 -59
  322. jaclang/vendor/lark/common.py +86 -89
  323. jaclang/vendor/lark/exceptions.py +292 -292
  324. jaclang/vendor/lark/grammar.py +130 -130
  325. jaclang/vendor/lark/grammars/common.lark +59 -59
  326. jaclang/vendor/lark/grammars/lark.lark +62 -62
  327. jaclang/vendor/lark/grammars/python.lark +302 -302
  328. jaclang/vendor/lark/grammars/unicode.lark +7 -7
  329. jaclang/vendor/lark/indenter.py +143 -112
  330. jaclang/vendor/lark/lark.py +658 -661
  331. jaclang/vendor/lark/lexer.py +678 -678
  332. jaclang/vendor/lark/load_grammar.py +1428 -1428
  333. jaclang/vendor/lark/parse_tree_builder.py +391 -391
  334. jaclang/vendor/lark/parser_frontends.py +257 -257
  335. jaclang/vendor/lark/parsers/cyk.py +340 -340
  336. jaclang/vendor/lark/parsers/earley.py +317 -308
  337. jaclang/vendor/lark/parsers/earley_common.py +42 -42
  338. jaclang/vendor/lark/parsers/earley_forest.py +802 -810
  339. jaclang/vendor/lark/parsers/grammar_analysis.py +203 -203
  340. jaclang/vendor/lark/parsers/lalr_analysis.py +332 -332
  341. jaclang/vendor/lark/parsers/lalr_interactive_parser.py +158 -157
  342. jaclang/vendor/lark/parsers/lalr_parser.py +122 -122
  343. jaclang/vendor/lark/parsers/lalr_parser_state.py +110 -110
  344. jaclang/vendor/lark/parsers/xearley.py +165 -165
  345. jaclang/vendor/lark/reconstruct.py +107 -107
  346. jaclang/vendor/lark/tools/__init__.py +70 -71
  347. jaclang/vendor/lark/tools/nearley.py +202 -202
  348. jaclang/vendor/lark/tools/serialize.py +32 -32
  349. jaclang/vendor/lark/tools/standalone.py +196 -196
  350. jaclang/vendor/lark/tree.py +267 -272
  351. jaclang/vendor/lark/tree_matcher.py +186 -186
  352. jaclang/vendor/lark/utils.py +346 -361
  353. jaclang/vendor/lark/visitors.py +596 -593
  354. jaclang/vendor/lark-1.2.2.dist-info/INSTALLER +1 -0
  355. jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/METADATA +48 -47
  356. jaclang/vendor/lark-1.2.2.dist-info/RECORD +83 -0
  357. jaclang/vendor/{mypy_extensions-1.0.0.dist-info → lark-1.2.2.dist-info}/WHEEL +1 -1
  358. jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info/licenses}/LICENSE +18 -18
  359. jaclang/vendor/lsprotocol-2023.0.1.dist-info/INSTALLER +1 -0
  360. jaclang/vendor/lsprotocol-2023.0.1.dist-info/METADATA +2 -1
  361. jaclang/vendor/lsprotocol-2023.0.1.dist-info/RECORD +17 -10
  362. jaclang/vendor/lsprotocol-2023.0.1.dist-info/WHEEL +1 -1
  363. jaclang/vendor/pluggy/_version.py +7 -2
  364. jaclang/vendor/pluggy-1.5.0.dist-info/INSTALLER +1 -0
  365. jaclang/vendor/pluggy-1.5.0.dist-info/METADATA +6 -5
  366. jaclang/vendor/pluggy-1.5.0.dist-info/RECORD +24 -14
  367. jaclang/vendor/pluggy-1.5.0.dist-info/WHEEL +1 -1
  368. jaclang/vendor/pygls-1.3.1.dist-info/INSTALLER +1 -0
  369. jaclang/vendor/pygls-1.3.1.dist-info/METADATA +2 -2
  370. jaclang/vendor/pygls-1.3.1.dist-info/RECORD +45 -24
  371. jaclang/vendor/pygls-1.3.1.dist-info/WHEEL +1 -1
  372. {jaclang-0.7.33.dist-info → jaclang-0.8.0.dist-info}/METADATA +4 -4
  373. jaclang-0.8.0.dist-info/RECORD +552 -0
  374. {jaclang-0.7.33.dist-info → jaclang-0.8.0.dist-info}/WHEEL +1 -1
  375. jaclang/compiler/.gitignore +0 -1
  376. jaclang/compiler/compile.py +0 -119
  377. jaclang/compiler/passes/main/access_modifier_pass.py +0 -130
  378. jaclang/compiler/passes/main/fuse_typeinfo_pass.py +0 -656
  379. jaclang/compiler/passes/main/py_collect_dep_pass.py +0 -78
  380. jaclang/compiler/passes/main/pyout_pass.py +0 -86
  381. jaclang/compiler/passes/main/registry_pass.py +0 -156
  382. jaclang/compiler/passes/main/schedules.py +0 -47
  383. jaclang/compiler/passes/main/sub_node_tab_pass.py +0 -36
  384. jaclang/compiler/passes/main/tests/fixtures/registry.jac +0 -36
  385. jaclang/compiler/passes/main/tests/test_decl_def_match_pass.py +0 -114
  386. jaclang/compiler/passes/main/tests/test_registry_pass.py +0 -31
  387. jaclang/compiler/passes/main/tests/test_type_check_pass.py +0 -91
  388. jaclang/compiler/passes/main/tests/test_typeinfo_pass.py +0 -29
  389. jaclang/compiler/passes/main/type_check_pass.py +0 -128
  390. jaclang/compiler/passes/tool/schedules.py +0 -18
  391. jaclang/compiler/passes/tool/tests/fixtures/genai/essay_review.jac +0 -36
  392. jaclang/compiler/passes/tool/tests/fixtures/genai/expert_answer.jac +0 -17
  393. jaclang/compiler/passes/tool/tests/fixtures/genai/joke_gen.jac +0 -32
  394. jaclang/compiler/passes/tool/tests/fixtures/genai/odd_word_out.jac +0 -27
  395. jaclang/compiler/passes/tool/tests/fixtures/genai/personality_finder.jac +0 -35
  396. jaclang/compiler/passes/tool/tests/fixtures/genai/text_to_type.jac +0 -25
  397. jaclang/compiler/passes/tool/tests/fixtures/genai/translator.jac +0 -13
  398. jaclang/compiler/passes/tool/tests/fixtures/genai/wikipedia.jac +0 -63
  399. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/architype_test.jac +0 -13
  400. jaclang/compiler/passes/utils/mypy_ast_build.py +0 -940
  401. jaclang/compiler/py_info.py +0 -22
  402. jaclang/compiler/semtable.py +0 -159
  403. jaclang/compiler/symtable.py +0 -297
  404. jaclang/langserve/utils.py +0 -458
  405. jaclang/plugin/__init__.py +0 -7
  406. jaclang/plugin/builtin.py +0 -57
  407. jaclang/plugin/default.py +0 -1443
  408. jaclang/plugin/feature.py +0 -574
  409. jaclang/plugin/plugin.md +0 -471
  410. jaclang/plugin/spec.py +0 -536
  411. jaclang/plugin/tests/fixtures/impl_match_impl.jac +0 -3
  412. jaclang/plugin/tests/test_features.py +0 -56
  413. jaclang/runtimelib/context.py +0 -191
  414. jaclang/tests/fixtures/create_dynamic_architype.jac +0 -35
  415. jaclang/tests/fixtures/dynamic_architype.jac +0 -34
  416. jaclang/tests/fixtures/impl_grab.impl.jac +0 -5
  417. jaclang/tests/fixtures/mtest.impl.jac +0 -6
  418. jaclang/tests/fixtures/registry.jac +0 -58
  419. jaclang/tests/fixtures/semstr.jac +0 -30
  420. jaclang/tests/main.jac +0 -2
  421. jaclang/utils/profiler.py +0 -62
  422. jaclang/vendor/attrs-23.2.0.dist-info/RECORD +0 -35
  423. jaclang/vendor/cattrs-23.2.3.dist-info/METADATA +0 -221
  424. jaclang/vendor/cattrs-23.2.3.dist-info/RECORD +0 -48
  425. jaclang/vendor/lark-1.1.9.dist-info/RECORD +0 -46
  426. jaclang/vendor/lark-1.1.9.dist-info/WHEEL +0 -5
  427. jaclang/vendor/mypy/__init__.py +0 -1
  428. jaclang/vendor/mypy/__main__.py +0 -37
  429. jaclang/vendor/mypy/api.py +0 -94
  430. jaclang/vendor/mypy/applytype.py +0 -172
  431. jaclang/vendor/mypy/argmap.py +0 -268
  432. jaclang/vendor/mypy/binder.py +0 -538
  433. jaclang/vendor/mypy/bogus_type.py +0 -27
  434. jaclang/vendor/mypy/build.py +0 -3562
  435. jaclang/vendor/mypy/checker.py +0 -8445
  436. jaclang/vendor/mypy/checkexpr.py +0 -6623
  437. jaclang/vendor/mypy/checkmember.py +0 -1363
  438. jaclang/vendor/mypy/checkpattern.py +0 -801
  439. jaclang/vendor/mypy/checkstrformat.py +0 -1109
  440. jaclang/vendor/mypy/config_parser.py +0 -670
  441. jaclang/vendor/mypy/constant_fold.py +0 -187
  442. jaclang/vendor/mypy/constraints.py +0 -1636
  443. jaclang/vendor/mypy/copytype.py +0 -133
  444. jaclang/vendor/mypy/defaults.py +0 -46
  445. jaclang/vendor/mypy/dmypy/__main__.py +0 -6
  446. jaclang/vendor/mypy/dmypy/client.py +0 -749
  447. jaclang/vendor/mypy/dmypy_os.py +0 -42
  448. jaclang/vendor/mypy/dmypy_server.py +0 -1107
  449. jaclang/vendor/mypy/dmypy_util.py +0 -117
  450. jaclang/vendor/mypy/erasetype.py +0 -278
  451. jaclang/vendor/mypy/errorcodes.py +0 -291
  452. jaclang/vendor/mypy/errors.py +0 -1280
  453. jaclang/vendor/mypy/evalexpr.py +0 -205
  454. jaclang/vendor/mypy/expandtype.py +0 -524
  455. jaclang/vendor/mypy/exprtotype.py +0 -209
  456. jaclang/vendor/mypy/fastparse.py +0 -2147
  457. jaclang/vendor/mypy/find_sources.py +0 -243
  458. jaclang/vendor/mypy/fixup.py +0 -428
  459. jaclang/vendor/mypy/freetree.py +0 -23
  460. jaclang/vendor/mypy/fscache.py +0 -309
  461. jaclang/vendor/mypy/fswatcher.py +0 -106
  462. jaclang/vendor/mypy/gclogger.py +0 -47
  463. jaclang/vendor/mypy/git.py +0 -34
  464. jaclang/vendor/mypy/graph_utils.py +0 -112
  465. jaclang/vendor/mypy/indirection.py +0 -121
  466. jaclang/vendor/mypy/infer.py +0 -75
  467. jaclang/vendor/mypy/inspections.py +0 -627
  468. jaclang/vendor/mypy/ipc.py +0 -310
  469. jaclang/vendor/mypy/join.py +0 -871
  470. jaclang/vendor/mypy/literals.py +0 -306
  471. jaclang/vendor/mypy/lookup.py +0 -61
  472. jaclang/vendor/mypy/main.py +0 -1574
  473. jaclang/vendor/mypy/maptype.py +0 -106
  474. jaclang/vendor/mypy/meet.py +0 -1140
  475. jaclang/vendor/mypy/memprofile.py +0 -121
  476. jaclang/vendor/mypy/message_registry.py +0 -329
  477. jaclang/vendor/mypy/messages.py +0 -3186
  478. jaclang/vendor/mypy/metastore.py +0 -225
  479. jaclang/vendor/mypy/mixedtraverser.py +0 -112
  480. jaclang/vendor/mypy/modulefinder.py +0 -875
  481. jaclang/vendor/mypy/moduleinspect.py +0 -184
  482. jaclang/vendor/mypy/mro.py +0 -62
  483. jaclang/vendor/mypy/nodes.py +0 -4115
  484. jaclang/vendor/mypy/operators.py +0 -126
  485. jaclang/vendor/mypy/options.py +0 -556
  486. jaclang/vendor/mypy/parse.py +0 -30
  487. jaclang/vendor/mypy/partially_defined.py +0 -675
  488. jaclang/vendor/mypy/patterns.py +0 -150
  489. jaclang/vendor/mypy/plugin.py +0 -901
  490. jaclang/vendor/mypy/plugins/attrs.py +0 -1166
  491. jaclang/vendor/mypy/plugins/common.py +0 -440
  492. jaclang/vendor/mypy/plugins/ctypes.py +0 -245
  493. jaclang/vendor/mypy/plugins/dataclasses.py +0 -1108
  494. jaclang/vendor/mypy/plugins/default.py +0 -531
  495. jaclang/vendor/mypy/plugins/enums.py +0 -259
  496. jaclang/vendor/mypy/plugins/functools.py +0 -104
  497. jaclang/vendor/mypy/plugins/proper_plugin.py +0 -175
  498. jaclang/vendor/mypy/plugins/singledispatch.py +0 -224
  499. jaclang/vendor/mypy/py.typed +0 -1
  500. jaclang/vendor/mypy/pyinfo.py +0 -78
  501. jaclang/vendor/mypy/reachability.py +0 -362
  502. jaclang/vendor/mypy/refinfo.py +0 -92
  503. jaclang/vendor/mypy/renaming.py +0 -568
  504. jaclang/vendor/mypy/report.py +0 -924
  505. jaclang/vendor/mypy/scope.py +0 -125
  506. jaclang/vendor/mypy/semanal.py +0 -7187
  507. jaclang/vendor/mypy/semanal_classprop.py +0 -187
  508. jaclang/vendor/mypy/semanal_enum.py +0 -253
  509. jaclang/vendor/mypy/semanal_infer.py +0 -128
  510. jaclang/vendor/mypy/semanal_main.py +0 -511
  511. jaclang/vendor/mypy/semanal_namedtuple.py +0 -670
  512. jaclang/vendor/mypy/semanal_newtype.py +0 -273
  513. jaclang/vendor/mypy/semanal_pass1.py +0 -156
  514. jaclang/vendor/mypy/semanal_shared.py +0 -490
  515. jaclang/vendor/mypy/semanal_typeargs.py +0 -265
  516. jaclang/vendor/mypy/semanal_typeddict.py +0 -575
  517. jaclang/vendor/mypy/server/astdiff.py +0 -518
  518. jaclang/vendor/mypy/server/astmerge.py +0 -562
  519. jaclang/vendor/mypy/server/aststrip.py +0 -281
  520. jaclang/vendor/mypy/server/deps.py +0 -1137
  521. jaclang/vendor/mypy/server/mergecheck.py +0 -83
  522. jaclang/vendor/mypy/server/objgraph.py +0 -101
  523. jaclang/vendor/mypy/server/subexpr.py +0 -198
  524. jaclang/vendor/mypy/server/target.py +0 -11
  525. jaclang/vendor/mypy/server/trigger.py +0 -26
  526. jaclang/vendor/mypy/server/update.py +0 -1339
  527. jaclang/vendor/mypy/sharedparse.py +0 -112
  528. jaclang/vendor/mypy/solve.py +0 -562
  529. jaclang/vendor/mypy/split_namespace.py +0 -35
  530. jaclang/vendor/mypy/state.py +0 -28
  531. jaclang/vendor/mypy/stats.py +0 -489
  532. jaclang/vendor/mypy/strconv.py +0 -641
  533. jaclang/vendor/mypy/stubdoc.py +0 -491
  534. jaclang/vendor/mypy/stubgen.py +0 -1886
  535. jaclang/vendor/mypy/stubgenc.py +0 -993
  536. jaclang/vendor/mypy/stubinfo.py +0 -173
  537. jaclang/vendor/mypy/stubtest.py +0 -2079
  538. jaclang/vendor/mypy/stubutil.py +0 -834
  539. jaclang/vendor/mypy/subtypes.py +0 -1980
  540. jaclang/vendor/mypy/suggestions.py +0 -1046
  541. jaclang/vendor/mypy/test/config.py +0 -28
  542. jaclang/vendor/mypy/test/data.py +0 -821
  543. jaclang/vendor/mypy/test/helpers.py +0 -476
  544. jaclang/vendor/mypy/test/meta/_pytest.py +0 -72
  545. jaclang/vendor/mypy/test/meta/test_diff_helper.py +0 -47
  546. jaclang/vendor/mypy/test/meta/test_parse_data.py +0 -73
  547. jaclang/vendor/mypy/test/meta/test_update_data.py +0 -135
  548. jaclang/vendor/mypy/test/test_find_sources.py +0 -376
  549. jaclang/vendor/mypy/test/test_ref_info.py +0 -45
  550. jaclang/vendor/mypy/test/testapi.py +0 -45
  551. jaclang/vendor/mypy/test/testargs.py +0 -77
  552. jaclang/vendor/mypy/test/testcheck.py +0 -322
  553. jaclang/vendor/mypy/test/testcmdline.py +0 -152
  554. jaclang/vendor/mypy/test/testconstraints.py +0 -134
  555. jaclang/vendor/mypy/test/testdaemon.py +0 -132
  556. jaclang/vendor/mypy/test/testdeps.py +0 -77
  557. jaclang/vendor/mypy/test/testdiff.py +0 -67
  558. jaclang/vendor/mypy/test/testerrorstream.py +0 -46
  559. jaclang/vendor/mypy/test/testfinegrained.py +0 -438
  560. jaclang/vendor/mypy/test/testfinegrainedcache.py +0 -18
  561. jaclang/vendor/mypy/test/testformatter.py +0 -85
  562. jaclang/vendor/mypy/test/testfscache.py +0 -101
  563. jaclang/vendor/mypy/test/testgraph.py +0 -83
  564. jaclang/vendor/mypy/test/testinfer.py +0 -373
  565. jaclang/vendor/mypy/test/testipc.py +0 -119
  566. jaclang/vendor/mypy/test/testmerge.py +0 -238
  567. jaclang/vendor/mypy/test/testmodulefinder.py +0 -278
  568. jaclang/vendor/mypy/test/testmypyc.py +0 -14
  569. jaclang/vendor/mypy/test/testparse.py +0 -107
  570. jaclang/vendor/mypy/test/testpep561.py +0 -211
  571. jaclang/vendor/mypy/test/testpythoneval.py +0 -117
  572. jaclang/vendor/mypy/test/testreports.py +0 -55
  573. jaclang/vendor/mypy/test/testsemanal.py +0 -209
  574. jaclang/vendor/mypy/test/testsolve.py +0 -285
  575. jaclang/vendor/mypy/test/teststubgen.py +0 -1412
  576. jaclang/vendor/mypy/test/teststubinfo.py +0 -12
  577. jaclang/vendor/mypy/test/teststubtest.py +0 -2492
  578. jaclang/vendor/mypy/test/testsubtypes.py +0 -303
  579. jaclang/vendor/mypy/test/testtransform.py +0 -64
  580. jaclang/vendor/mypy/test/testtypegen.py +0 -83
  581. jaclang/vendor/mypy/test/testtypes.py +0 -1551
  582. jaclang/vendor/mypy/test/testutil.py +0 -111
  583. jaclang/vendor/mypy/test/typefixture.py +0 -415
  584. jaclang/vendor/mypy/test/update_data.py +0 -87
  585. jaclang/vendor/mypy/test/visitors.py +0 -63
  586. jaclang/vendor/mypy/traverser.py +0 -961
  587. jaclang/vendor/mypy/treetransform.py +0 -800
  588. jaclang/vendor/mypy/tvar_scope.py +0 -169
  589. jaclang/vendor/mypy/type_visitor.py +0 -564
  590. jaclang/vendor/mypy/typeanal.py +0 -2596
  591. jaclang/vendor/mypy/typeops.py +0 -1082
  592. jaclang/vendor/mypy/types.py +0 -3708
  593. jaclang/vendor/mypy/types_utils.py +0 -166
  594. jaclang/vendor/mypy/typeshed/LICENSE +0 -237
  595. jaclang/vendor/mypy/typeshed/stdlib/VERSIONS +0 -309
  596. jaclang/vendor/mypy/typeshed/stdlib/__future__.pyi +0 -36
  597. jaclang/vendor/mypy/typeshed/stdlib/__main__.pyi +0 -3
  598. jaclang/vendor/mypy/typeshed/stdlib/_ast.pyi +0 -591
  599. jaclang/vendor/mypy/typeshed/stdlib/_bisect.pyi +0 -84
  600. jaclang/vendor/mypy/typeshed/stdlib/_bootlocale.pyi +0 -1
  601. jaclang/vendor/mypy/typeshed/stdlib/_codecs.pyi +0 -133
  602. jaclang/vendor/mypy/typeshed/stdlib/_collections_abc.pyi +0 -94
  603. jaclang/vendor/mypy/typeshed/stdlib/_compat_pickle.pyi +0 -8
  604. jaclang/vendor/mypy/typeshed/stdlib/_compression.pyi +0 -25
  605. jaclang/vendor/mypy/typeshed/stdlib/_csv.pyi +0 -90
  606. jaclang/vendor/mypy/typeshed/stdlib/_ctypes.pyi +0 -207
  607. jaclang/vendor/mypy/typeshed/stdlib/_curses.pyi +0 -566
  608. jaclang/vendor/mypy/typeshed/stdlib/_decimal.pyi +0 -281
  609. jaclang/vendor/mypy/typeshed/stdlib/_dummy_thread.pyi +0 -33
  610. jaclang/vendor/mypy/typeshed/stdlib/_dummy_threading.pyi +0 -164
  611. jaclang/vendor/mypy/typeshed/stdlib/_heapq.pyi +0 -11
  612. jaclang/vendor/mypy/typeshed/stdlib/_imp.pyi +0 -28
  613. jaclang/vendor/mypy/typeshed/stdlib/_json.pyi +0 -49
  614. jaclang/vendor/mypy/typeshed/stdlib/_locale.pyi +0 -100
  615. jaclang/vendor/mypy/typeshed/stdlib/_lsprof.pyi +0 -35
  616. jaclang/vendor/mypy/typeshed/stdlib/_markupbase.pyi +0 -16
  617. jaclang/vendor/mypy/typeshed/stdlib/_msi.pyi +0 -92
  618. jaclang/vendor/mypy/typeshed/stdlib/_operator.pyi +0 -147
  619. jaclang/vendor/mypy/typeshed/stdlib/_osx_support.pyi +0 -34
  620. jaclang/vendor/mypy/typeshed/stdlib/_posixsubprocess.pyi +0 -33
  621. jaclang/vendor/mypy/typeshed/stdlib/_py_abc.pyi +0 -14
  622. jaclang/vendor/mypy/typeshed/stdlib/_pydecimal.pyi +0 -43
  623. jaclang/vendor/mypy/typeshed/stdlib/_random.pyi +0 -12
  624. jaclang/vendor/mypy/typeshed/stdlib/_sitebuiltins.pyi +0 -16
  625. jaclang/vendor/mypy/typeshed/stdlib/_socket.pyi +0 -803
  626. jaclang/vendor/mypy/typeshed/stdlib/_stat.pyi +0 -103
  627. jaclang/vendor/mypy/typeshed/stdlib/_thread.pyi +0 -59
  628. jaclang/vendor/mypy/typeshed/stdlib/_threading_local.pyi +0 -17
  629. jaclang/vendor/mypy/typeshed/stdlib/_tkinter.pyi +0 -121
  630. jaclang/vendor/mypy/typeshed/stdlib/_tracemalloc.pyi +0 -17
  631. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/__init__.pyi +0 -347
  632. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/dbapi.pyi +0 -37
  633. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/wsgi.pyi +0 -44
  634. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/xml.pyi +0 -9
  635. jaclang/vendor/mypy/typeshed/stdlib/_warnings.pyi +0 -55
  636. jaclang/vendor/mypy/typeshed/stdlib/_weakref.pyi +0 -41
  637. jaclang/vendor/mypy/typeshed/stdlib/_weakrefset.pyi +0 -51
  638. jaclang/vendor/mypy/typeshed/stdlib/_winapi.pyi +0 -255
  639. jaclang/vendor/mypy/typeshed/stdlib/abc.pyi +0 -51
  640. jaclang/vendor/mypy/typeshed/stdlib/aifc.pyi +0 -91
  641. jaclang/vendor/mypy/typeshed/stdlib/antigravity.pyi +0 -3
  642. jaclang/vendor/mypy/typeshed/stdlib/argparse.pyi +0 -595
  643. jaclang/vendor/mypy/typeshed/stdlib/array.pyi +0 -92
  644. jaclang/vendor/mypy/typeshed/stdlib/ast.pyi +0 -277
  645. jaclang/vendor/mypy/typeshed/stdlib/asynchat.pyi +0 -21
  646. jaclang/vendor/mypy/typeshed/stdlib/asyncio/__init__.pyi +0 -41
  647. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_events.pyi +0 -440
  648. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_futures.pyi +0 -19
  649. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +0 -63
  650. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_tasks.pyi +0 -9
  651. jaclang/vendor/mypy/typeshed/stdlib/asyncio/constants.pyi +0 -20
  652. jaclang/vendor/mypy/typeshed/stdlib/asyncio/coroutines.pyi +0 -26
  653. jaclang/vendor/mypy/typeshed/stdlib/asyncio/events.pyi +0 -580
  654. jaclang/vendor/mypy/typeshed/stdlib/asyncio/exceptions.pyi +0 -43
  655. jaclang/vendor/mypy/typeshed/stdlib/asyncio/format_helpers.pyi +0 -20
  656. jaclang/vendor/mypy/typeshed/stdlib/asyncio/futures.pyi +0 -57
  657. jaclang/vendor/mypy/typeshed/stdlib/asyncio/locks.pyi +0 -121
  658. jaclang/vendor/mypy/typeshed/stdlib/asyncio/log.pyi +0 -3
  659. jaclang/vendor/mypy/typeshed/stdlib/asyncio/mixins.pyi +0 -9
  660. jaclang/vendor/mypy/typeshed/stdlib/asyncio/proactor_events.pyi +0 -64
  661. jaclang/vendor/mypy/typeshed/stdlib/asyncio/protocols.pyi +0 -34
  662. jaclang/vendor/mypy/typeshed/stdlib/asyncio/queues.pyi +0 -47
  663. jaclang/vendor/mypy/typeshed/stdlib/asyncio/runners.pyi +0 -32
  664. jaclang/vendor/mypy/typeshed/stdlib/asyncio/selector_events.pyi +0 -8
  665. jaclang/vendor/mypy/typeshed/stdlib/asyncio/sslproto.pyi +0 -165
  666. jaclang/vendor/mypy/typeshed/stdlib/asyncio/staggered.pyi +0 -10
  667. jaclang/vendor/mypy/typeshed/stdlib/asyncio/streams.pyi +0 -153
  668. jaclang/vendor/mypy/typeshed/stdlib/asyncio/subprocess.pyi +0 -229
  669. jaclang/vendor/mypy/typeshed/stdlib/asyncio/taskgroups.pyi +0 -25
  670. jaclang/vendor/mypy/typeshed/stdlib/asyncio/tasks.pyi +0 -497
  671. jaclang/vendor/mypy/typeshed/stdlib/asyncio/threads.pyi +0 -9
  672. jaclang/vendor/mypy/typeshed/stdlib/asyncio/timeouts.pyi +0 -19
  673. jaclang/vendor/mypy/typeshed/stdlib/asyncio/transports.pyi +0 -47
  674. jaclang/vendor/mypy/typeshed/stdlib/asyncio/trsock.pyi +0 -94
  675. jaclang/vendor/mypy/typeshed/stdlib/asyncio/unix_events.pyi +0 -196
  676. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_events.pyi +0 -85
  677. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_utils.pyi +0 -49
  678. jaclang/vendor/mypy/typeshed/stdlib/asyncore.pyi +0 -90
  679. jaclang/vendor/mypy/typeshed/stdlib/atexit.pyi +0 -12
  680. jaclang/vendor/mypy/typeshed/stdlib/audioop.pyi +0 -43
  681. jaclang/vendor/mypy/typeshed/stdlib/base64.pyi +0 -59
  682. jaclang/vendor/mypy/typeshed/stdlib/bdb.pyi +0 -102
  683. jaclang/vendor/mypy/typeshed/stdlib/binascii.pyi +0 -36
  684. jaclang/vendor/mypy/typeshed/stdlib/binhex.pyi +0 -45
  685. jaclang/vendor/mypy/typeshed/stdlib/bisect.pyi +0 -4
  686. jaclang/vendor/mypy/typeshed/stdlib/builtins.pyi +0 -1936
  687. jaclang/vendor/mypy/typeshed/stdlib/bz2.pyi +0 -146
  688. jaclang/vendor/mypy/typeshed/stdlib/cProfile.pyi +0 -31
  689. jaclang/vendor/mypy/typeshed/stdlib/calendar.pyi +0 -208
  690. jaclang/vendor/mypy/typeshed/stdlib/cgi.pyi +0 -118
  691. jaclang/vendor/mypy/typeshed/stdlib/cgitb.pyi +0 -32
  692. jaclang/vendor/mypy/typeshed/stdlib/chunk.pyi +0 -20
  693. jaclang/vendor/mypy/typeshed/stdlib/cmath.pyi +0 -36
  694. jaclang/vendor/mypy/typeshed/stdlib/cmd.pyi +0 -45
  695. jaclang/vendor/mypy/typeshed/stdlib/code.pyi +0 -33
  696. jaclang/vendor/mypy/typeshed/stdlib/codecs.pyi +0 -285
  697. jaclang/vendor/mypy/typeshed/stdlib/codeop.pyi +0 -13
  698. jaclang/vendor/mypy/typeshed/stdlib/collections/__init__.pyi +0 -485
  699. jaclang/vendor/mypy/typeshed/stdlib/collections/abc.pyi +0 -2
  700. jaclang/vendor/mypy/typeshed/stdlib/colorsys.pyi +0 -13
  701. jaclang/vendor/mypy/typeshed/stdlib/compileall.pyi +0 -111
  702. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +0 -32
  703. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/_base.pyi +0 -126
  704. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/process.pyi +0 -233
  705. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/thread.pyi +0 -80
  706. jaclang/vendor/mypy/typeshed/stdlib/configparser.pyi +0 -313
  707. jaclang/vendor/mypy/typeshed/stdlib/contextlib.pyi +0 -208
  708. jaclang/vendor/mypy/typeshed/stdlib/contextvars.pyi +0 -63
  709. jaclang/vendor/mypy/typeshed/stdlib/copy.pyi +0 -16
  710. jaclang/vendor/mypy/typeshed/stdlib/copyreg.pyi +0 -21
  711. jaclang/vendor/mypy/typeshed/stdlib/crypt.pyi +0 -12
  712. jaclang/vendor/mypy/typeshed/stdlib/csv.pyi +0 -147
  713. jaclang/vendor/mypy/typeshed/stdlib/ctypes/__init__.pyi +0 -187
  714. jaclang/vendor/mypy/typeshed/stdlib/ctypes/_endian.pyi +0 -19
  715. jaclang/vendor/mypy/typeshed/stdlib/ctypes/util.pyi +0 -6
  716. jaclang/vendor/mypy/typeshed/stdlib/ctypes/wintypes.pyi +0 -298
  717. jaclang/vendor/mypy/typeshed/stdlib/curses/__init__.pyi +0 -22
  718. jaclang/vendor/mypy/typeshed/stdlib/curses/ascii.pyi +0 -62
  719. jaclang/vendor/mypy/typeshed/stdlib/curses/has_key.pyi +0 -1
  720. jaclang/vendor/mypy/typeshed/stdlib/curses/panel.pyi +0 -22
  721. jaclang/vendor/mypy/typeshed/stdlib/curses/textpad.pyi +0 -11
  722. jaclang/vendor/mypy/typeshed/stdlib/dataclasses.pyi +0 -315
  723. jaclang/vendor/mypy/typeshed/stdlib/datetime.pyi +0 -295
  724. jaclang/vendor/mypy/typeshed/stdlib/dbm/__init__.pyi +0 -95
  725. jaclang/vendor/mypy/typeshed/stdlib/dbm/dumb.pyi +0 -31
  726. jaclang/vendor/mypy/typeshed/stdlib/dbm/gnu.pyi +0 -41
  727. jaclang/vendor/mypy/typeshed/stdlib/dbm/ndbm.pyi +0 -37
  728. jaclang/vendor/mypy/typeshed/stdlib/decimal.pyi +0 -2
  729. jaclang/vendor/mypy/typeshed/stdlib/difflib.pyi +0 -140
  730. jaclang/vendor/mypy/typeshed/stdlib/dis.pyi +0 -144
  731. jaclang/vendor/mypy/typeshed/stdlib/distutils/__init__.pyi +0 -5
  732. jaclang/vendor/mypy/typeshed/stdlib/distutils/archive_util.pyi +0 -20
  733. jaclang/vendor/mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +0 -3
  734. jaclang/vendor/mypy/typeshed/stdlib/distutils/ccompiler.pyi +0 -152
  735. jaclang/vendor/mypy/typeshed/stdlib/distutils/cmd.pyi +0 -66
  736. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist.pyi +0 -25
  737. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +0 -21
  738. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +0 -45
  739. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +0 -52
  740. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_wininst.pyi +0 -16
  741. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build.pyi +0 -31
  742. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_clib.pyi +0 -27
  743. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_ext.pyi +0 -50
  744. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_py.pyi +0 -44
  745. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +0 -24
  746. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/check.pyi +0 -39
  747. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/clean.pyi +0 -17
  748. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/config.pyi +0 -83
  749. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install.pyi +0 -63
  750. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_data.pyi +0 -19
  751. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +0 -18
  752. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_headers.pyi +0 -16
  753. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_lib.pyi +0 -25
  754. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +0 -18
  755. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/register.pyi +0 -18
  756. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/sdist.pyi +0 -42
  757. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/upload.pyi +0 -17
  758. jaclang/vendor/mypy/typeshed/stdlib/distutils/config.pyi +0 -17
  759. jaclang/vendor/mypy/typeshed/stdlib/distutils/core.pyi +0 -57
  760. jaclang/vendor/mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +0 -20
  761. jaclang/vendor/mypy/typeshed/stdlib/distutils/debug.pyi +0 -1
  762. jaclang/vendor/mypy/typeshed/stdlib/distutils/dep_util.pyi +0 -3
  763. jaclang/vendor/mypy/typeshed/stdlib/distutils/dir_util.pyi +0 -13
  764. jaclang/vendor/mypy/typeshed/stdlib/distutils/dist.pyi +0 -146
  765. jaclang/vendor/mypy/typeshed/stdlib/distutils/errors.pyi +0 -19
  766. jaclang/vendor/mypy/typeshed/stdlib/distutils/extension.pyi +0 -36
  767. jaclang/vendor/mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +0 -34
  768. jaclang/vendor/mypy/typeshed/stdlib/distutils/file_util.pyi +0 -14
  769. jaclang/vendor/mypy/typeshed/stdlib/distutils/filelist.pyi +0 -50
  770. jaclang/vendor/mypy/typeshed/stdlib/distutils/log.pyi +0 -25
  771. jaclang/vendor/mypy/typeshed/stdlib/distutils/msvccompiler.pyi +0 -3
  772. jaclang/vendor/mypy/typeshed/stdlib/distutils/spawn.pyi +0 -2
  773. jaclang/vendor/mypy/typeshed/stdlib/distutils/sysconfig.pyi +0 -31
  774. jaclang/vendor/mypy/typeshed/stdlib/distutils/text_file.pyi +0 -21
  775. jaclang/vendor/mypy/typeshed/stdlib/distutils/unixccompiler.pyi +0 -3
  776. jaclang/vendor/mypy/typeshed/stdlib/distutils/util.pyi +0 -46
  777. jaclang/vendor/mypy/typeshed/stdlib/distutils/version.pyi +0 -36
  778. jaclang/vendor/mypy/typeshed/stdlib/doctest.pyi +0 -248
  779. jaclang/vendor/mypy/typeshed/stdlib/dummy_threading.pyi +0 -2
  780. jaclang/vendor/mypy/typeshed/stdlib/email/__init__.pyi +0 -29
  781. jaclang/vendor/mypy/typeshed/stdlib/email/_header_value_parser.pyi +0 -392
  782. jaclang/vendor/mypy/typeshed/stdlib/email/_policybase.pyi +0 -51
  783. jaclang/vendor/mypy/typeshed/stdlib/email/base64mime.pyi +0 -13
  784. jaclang/vendor/mypy/typeshed/stdlib/email/charset.pyi +0 -34
  785. jaclang/vendor/mypy/typeshed/stdlib/email/contentmanager.pyi +0 -11
  786. jaclang/vendor/mypy/typeshed/stdlib/email/encoders.pyi +0 -8
  787. jaclang/vendor/mypy/typeshed/stdlib/email/errors.pyi +0 -39
  788. jaclang/vendor/mypy/typeshed/stdlib/email/feedparser.pyi +0 -23
  789. jaclang/vendor/mypy/typeshed/stdlib/email/generator.pyi +0 -40
  790. jaclang/vendor/mypy/typeshed/stdlib/email/header.pyi +0 -31
  791. jaclang/vendor/mypy/typeshed/stdlib/email/headerregistry.pyi +0 -178
  792. jaclang/vendor/mypy/typeshed/stdlib/email/iterators.pyi +0 -12
  793. jaclang/vendor/mypy/typeshed/stdlib/email/message.pyi +0 -165
  794. jaclang/vendor/mypy/typeshed/stdlib/email/mime/application.pyi +0 -17
  795. jaclang/vendor/mypy/typeshed/stdlib/email/mime/audio.pyi +0 -17
  796. jaclang/vendor/mypy/typeshed/stdlib/email/mime/base.pyi +0 -8
  797. jaclang/vendor/mypy/typeshed/stdlib/email/mime/image.pyi +0 -17
  798. jaclang/vendor/mypy/typeshed/stdlib/email/mime/message.pyi +0 -8
  799. jaclang/vendor/mypy/typeshed/stdlib/email/mime/multipart.pyi +0 -18
  800. jaclang/vendor/mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +0 -5
  801. jaclang/vendor/mypy/typeshed/stdlib/email/mime/text.pyi +0 -9
  802. jaclang/vendor/mypy/typeshed/stdlib/email/parser.pyi +0 -26
  803. jaclang/vendor/mypy/typeshed/stdlib/email/policy.pyi +0 -38
  804. jaclang/vendor/mypy/typeshed/stdlib/email/quoprimime.pyi +0 -28
  805. jaclang/vendor/mypy/typeshed/stdlib/email/utils.pyi +0 -70
  806. jaclang/vendor/mypy/typeshed/stdlib/encodings/__init__.pyi +0 -10
  807. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8.pyi +0 -21
  808. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +0 -22
  809. jaclang/vendor/mypy/typeshed/stdlib/ensurepip/__init__.pyi +0 -12
  810. jaclang/vendor/mypy/typeshed/stdlib/enum.pyi +0 -320
  811. jaclang/vendor/mypy/typeshed/stdlib/errno.pyi +0 -222
  812. jaclang/vendor/mypy/typeshed/stdlib/faulthandler.pyi +0 -13
  813. jaclang/vendor/mypy/typeshed/stdlib/fcntl.pyi +0 -127
  814. jaclang/vendor/mypy/typeshed/stdlib/filecmp.pyi +0 -57
  815. jaclang/vendor/mypy/typeshed/stdlib/fileinput.pyi +0 -213
  816. jaclang/vendor/mypy/typeshed/stdlib/fnmatch.pyi +0 -9
  817. jaclang/vendor/mypy/typeshed/stdlib/formatter.pyi +0 -88
  818. jaclang/vendor/mypy/typeshed/stdlib/fractions.pyi +0 -150
  819. jaclang/vendor/mypy/typeshed/stdlib/ftplib.pyi +0 -178
  820. jaclang/vendor/mypy/typeshed/stdlib/functools.pyi +0 -213
  821. jaclang/vendor/mypy/typeshed/stdlib/gc.pyi +0 -37
  822. jaclang/vendor/mypy/typeshed/stdlib/genericpath.pyi +0 -52
  823. jaclang/vendor/mypy/typeshed/stdlib/getopt.pyi +0 -11
  824. jaclang/vendor/mypy/typeshed/stdlib/getpass.pyi +0 -8
  825. jaclang/vendor/mypy/typeshed/stdlib/gettext.pyi +0 -169
  826. jaclang/vendor/mypy/typeshed/stdlib/glob.pyi +0 -42
  827. jaclang/vendor/mypy/typeshed/stdlib/graphlib.pyi +0 -28
  828. jaclang/vendor/mypy/typeshed/stdlib/grp.pyi +0 -22
  829. jaclang/vendor/mypy/typeshed/stdlib/gzip.pyi +0 -160
  830. jaclang/vendor/mypy/typeshed/stdlib/hashlib.pyi +0 -167
  831. jaclang/vendor/mypy/typeshed/stdlib/heapq.pyi +0 -17
  832. jaclang/vendor/mypy/typeshed/stdlib/hmac.pyi +0 -38
  833. jaclang/vendor/mypy/typeshed/stdlib/html/__init__.pyi +0 -6
  834. jaclang/vendor/mypy/typeshed/stdlib/html/entities.pyi +0 -6
  835. jaclang/vendor/mypy/typeshed/stdlib/html/parser.pyi +0 -34
  836. jaclang/vendor/mypy/typeshed/stdlib/http/__init__.pyi +0 -105
  837. jaclang/vendor/mypy/typeshed/stdlib/http/client.pyi +0 -259
  838. jaclang/vendor/mypy/typeshed/stdlib/http/cookiejar.pyi +0 -159
  839. jaclang/vendor/mypy/typeshed/stdlib/http/cookies.pyi +0 -60
  840. jaclang/vendor/mypy/typeshed/stdlib/http/server.pyi +0 -83
  841. jaclang/vendor/mypy/typeshed/stdlib/imaplib.pyi +0 -168
  842. jaclang/vendor/mypy/typeshed/stdlib/imghdr.pyi +0 -17
  843. jaclang/vendor/mypy/typeshed/stdlib/imp.pyi +0 -62
  844. jaclang/vendor/mypy/typeshed/stdlib/importlib/__init__.pyi +0 -24
  845. jaclang/vendor/mypy/typeshed/stdlib/importlib/_abc.pyi +0 -15
  846. jaclang/vendor/mypy/typeshed/stdlib/importlib/abc.pyi +0 -172
  847. jaclang/vendor/mypy/typeshed/stdlib/importlib/machinery.pyi +0 -179
  848. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +0 -285
  849. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +0 -49
  850. jaclang/vendor/mypy/typeshed/stdlib/importlib/readers.pyi +0 -68
  851. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/__init__.pyi +0 -46
  852. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/abc.pyi +0 -12
  853. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/readers.pyi +0 -14
  854. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/simple.pyi +0 -56
  855. jaclang/vendor/mypy/typeshed/stdlib/importlib/simple.pyi +0 -11
  856. jaclang/vendor/mypy/typeshed/stdlib/importlib/util.pyi +0 -43
  857. jaclang/vendor/mypy/typeshed/stdlib/inspect.pyi +0 -632
  858. jaclang/vendor/mypy/typeshed/stdlib/io.pyi +0 -238
  859. jaclang/vendor/mypy/typeshed/stdlib/ipaddress.pyi +0 -208
  860. jaclang/vendor/mypy/typeshed/stdlib/itertools.pyi +0 -273
  861. jaclang/vendor/mypy/typeshed/stdlib/json/__init__.pyi +0 -61
  862. jaclang/vendor/mypy/typeshed/stdlib/json/decoder.pyi +0 -32
  863. jaclang/vendor/mypy/typeshed/stdlib/json/encoder.pyi +0 -40
  864. jaclang/vendor/mypy/typeshed/stdlib/json/tool.pyi +0 -1
  865. jaclang/vendor/mypy/typeshed/stdlib/keyword.pyi +0 -21
  866. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +0 -28
  867. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +0 -42
  868. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +0 -8
  869. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +0 -10
  870. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +0 -8
  871. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +0 -8
  872. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +0 -16
  873. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +0 -14
  874. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +0 -8
  875. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +0 -8
  876. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +0 -13
  877. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +0 -9
  878. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +0 -8
  879. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +0 -8
  880. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +0 -8
  881. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +0 -8
  882. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +0 -15
  883. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +0 -16
  884. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +0 -21
  885. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +0 -6
  886. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +0 -11
  887. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +0 -9
  888. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +0 -8
  889. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +0 -9
  890. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +0 -7
  891. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +0 -7
  892. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +0 -9
  893. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +0 -17
  894. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +0 -10
  895. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +0 -8
  896. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +0 -19
  897. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +0 -8
  898. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +0 -8
  899. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +0 -12
  900. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +0 -8
  901. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +0 -12
  902. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +0 -8
  903. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +0 -8
  904. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +0 -8
  905. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +0 -9
  906. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +0 -17
  907. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +0 -8
  908. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +0 -7
  909. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +0 -8
  910. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +0 -9
  911. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +0 -8
  912. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +0 -17
  913. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +0 -8
  914. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +0 -12
  915. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +0 -15
  916. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +0 -12
  917. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +0 -20
  918. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +0 -8
  919. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +0 -9
  920. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/main.pyi +0 -42
  921. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +0 -9
  922. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +0 -27
  923. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +0 -24
  924. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +0 -7
  925. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +0 -30
  926. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +0 -50
  927. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +0 -67
  928. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +0 -96
  929. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pygram.pyi +0 -114
  930. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pytree.pyi +0 -117
  931. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/refactor.pyi +0 -82
  932. jaclang/vendor/mypy/typeshed/stdlib/linecache.pyi +0 -23
  933. jaclang/vendor/mypy/typeshed/stdlib/locale.pyi +0 -152
  934. jaclang/vendor/mypy/typeshed/stdlib/logging/__init__.pyi +0 -658
  935. jaclang/vendor/mypy/typeshed/stdlib/logging/config.pyi +0 -134
  936. jaclang/vendor/mypy/typeshed/stdlib/logging/handlers.pyi +0 -275
  937. jaclang/vendor/mypy/typeshed/stdlib/lzma.pyi +0 -197
  938. jaclang/vendor/mypy/typeshed/stdlib/mailbox.pyi +0 -256
  939. jaclang/vendor/mypy/typeshed/stdlib/mailcap.pyi +0 -11
  940. jaclang/vendor/mypy/typeshed/stdlib/marshal.pyi +0 -33
  941. jaclang/vendor/mypy/typeshed/stdlib/math.pyi +0 -125
  942. jaclang/vendor/mypy/typeshed/stdlib/mimetypes.pyi +0 -46
  943. jaclang/vendor/mypy/typeshed/stdlib/mmap.pyi +0 -113
  944. jaclang/vendor/mypy/typeshed/stdlib/modulefinder.pyi +0 -66
  945. jaclang/vendor/mypy/typeshed/stdlib/msilib/__init__.pyi +0 -177
  946. jaclang/vendor/mypy/typeshed/stdlib/msilib/schema.pyi +0 -94
  947. jaclang/vendor/mypy/typeshed/stdlib/msilib/sequence.pyi +0 -13
  948. jaclang/vendor/mypy/typeshed/stdlib/msilib/text.pyi +0 -7
  949. jaclang/vendor/mypy/typeshed/stdlib/msvcrt.pyi +0 -32
  950. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/__init__.pyi +0 -90
  951. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/connection.pyi +0 -75
  952. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/context.pyi +0 -189
  953. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +0 -77
  954. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +0 -39
  955. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +0 -31
  956. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/heap.pyi +0 -36
  957. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/managers.pyi +0 -212
  958. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/pool.pyi +0 -103
  959. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +0 -23
  960. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +0 -16
  961. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +0 -20
  962. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +0 -30
  963. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/process.pyi +0 -39
  964. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/queues.pyi +0 -41
  965. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/reduction.pyi +0 -90
  966. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +0 -20
  967. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +0 -18
  968. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +0 -40
  969. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +0 -107
  970. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/spawn.pyi +0 -32
  971. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +0 -54
  972. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/util.pyi +0 -98
  973. jaclang/vendor/mypy/typeshed/stdlib/netrc.pyi +0 -23
  974. jaclang/vendor/mypy/typeshed/stdlib/nis.pyi +0 -9
  975. jaclang/vendor/mypy/typeshed/stdlib/nntplib.pyi +0 -125
  976. jaclang/vendor/mypy/typeshed/stdlib/nt.pyi +0 -111
  977. jaclang/vendor/mypy/typeshed/stdlib/ntpath.pyi +0 -119
  978. jaclang/vendor/mypy/typeshed/stdlib/nturl2path.pyi +0 -2
  979. jaclang/vendor/mypy/typeshed/stdlib/numbers.pyi +0 -209
  980. jaclang/vendor/mypy/typeshed/stdlib/opcode.pyi +0 -59
  981. jaclang/vendor/mypy/typeshed/stdlib/operator.pyi +0 -110
  982. jaclang/vendor/mypy/typeshed/stdlib/optparse.pyi +0 -255
  983. jaclang/vendor/mypy/typeshed/stdlib/os/__init__.pyi +0 -1157
  984. jaclang/vendor/mypy/typeshed/stdlib/os/path.pyi +0 -8
  985. jaclang/vendor/mypy/typeshed/stdlib/ossaudiodev.pyi +0 -131
  986. jaclang/vendor/mypy/typeshed/stdlib/parser.pyi +0 -24
  987. jaclang/vendor/mypy/typeshed/stdlib/pathlib.pyi +0 -232
  988. jaclang/vendor/mypy/typeshed/stdlib/pdb.pyi +0 -181
  989. jaclang/vendor/mypy/typeshed/stdlib/pickle.pyi +0 -271
  990. jaclang/vendor/mypy/typeshed/stdlib/pickletools.pyi +0 -167
  991. jaclang/vendor/mypy/typeshed/stdlib/pipes.pyi +0 -16
  992. jaclang/vendor/mypy/typeshed/stdlib/pkgutil.pyi +0 -53
  993. jaclang/vendor/mypy/typeshed/stdlib/platform.pyi +0 -42
  994. jaclang/vendor/mypy/typeshed/stdlib/plistlib.pyi +0 -113
  995. jaclang/vendor/mypy/typeshed/stdlib/poplib.pyi +0 -71
  996. jaclang/vendor/mypy/typeshed/stdlib/posix.pyi +0 -361
  997. jaclang/vendor/mypy/typeshed/stdlib/posixpath.pyi +0 -161
  998. jaclang/vendor/mypy/typeshed/stdlib/pprint.pyi +0 -112
  999. jaclang/vendor/mypy/typeshed/stdlib/profile.pyi +0 -31
  1000. jaclang/vendor/mypy/typeshed/stdlib/pstats.pyi +0 -80
  1001. jaclang/vendor/mypy/typeshed/stdlib/pty.pyi +0 -19
  1002. jaclang/vendor/mypy/typeshed/stdlib/pwd.pyi +0 -28
  1003. jaclang/vendor/mypy/typeshed/stdlib/py_compile.pyi +0 -34
  1004. jaclang/vendor/mypy/typeshed/stdlib/pyclbr.pyi +0 -74
  1005. jaclang/vendor/mypy/typeshed/stdlib/pydoc.pyi +0 -261
  1006. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  1007. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/topics.pyi +0 -1
  1008. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/__init__.pyi +0 -85
  1009. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/errors.pyi +0 -49
  1010. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/model.pyi +0 -11
  1011. jaclang/vendor/mypy/typeshed/stdlib/queue.pyi +0 -66
  1012. jaclang/vendor/mypy/typeshed/stdlib/quopri.pyi +0 -11
  1013. jaclang/vendor/mypy/typeshed/stdlib/random.pyi +0 -138
  1014. jaclang/vendor/mypy/typeshed/stdlib/re.pyi +0 -290
  1015. jaclang/vendor/mypy/typeshed/stdlib/readline.pyi +0 -36
  1016. jaclang/vendor/mypy/typeshed/stdlib/reprlib.pyi +0 -65
  1017. jaclang/vendor/mypy/typeshed/stdlib/resource.pyi +0 -94
  1018. jaclang/vendor/mypy/typeshed/stdlib/rlcompleter.pyi +0 -9
  1019. jaclang/vendor/mypy/typeshed/stdlib/runpy.pyi +0 -24
  1020. jaclang/vendor/mypy/typeshed/stdlib/sched.pyi +0 -42
  1021. jaclang/vendor/mypy/typeshed/stdlib/secrets.pyi +0 -15
  1022. jaclang/vendor/mypy/typeshed/stdlib/select.pyi +0 -155
  1023. jaclang/vendor/mypy/typeshed/stdlib/selectors.pyi +0 -67
  1024. jaclang/vendor/mypy/typeshed/stdlib/shelve.pyi +0 -46
  1025. jaclang/vendor/mypy/typeshed/stdlib/shlex.pyi +0 -63
  1026. jaclang/vendor/mypy/typeshed/stdlib/shutil.pyi +0 -185
  1027. jaclang/vendor/mypy/typeshed/stdlib/signal.pyi +0 -188
  1028. jaclang/vendor/mypy/typeshed/stdlib/site.pyi +0 -27
  1029. jaclang/vendor/mypy/typeshed/stdlib/smtpd.pyi +0 -91
  1030. jaclang/vendor/mypy/typeshed/stdlib/smtplib.pyi +0 -204
  1031. jaclang/vendor/mypy/typeshed/stdlib/sndhdr.pyi +0 -14
  1032. jaclang/vendor/mypy/typeshed/stdlib/socket.pyi +0 -825
  1033. jaclang/vendor/mypy/typeshed/stdlib/socketserver.pyi +0 -168
  1034. jaclang/vendor/mypy/typeshed/stdlib/spwd.pyi +0 -41
  1035. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/__init__.pyi +0 -1
  1036. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +0 -551
  1037. jaclang/vendor/mypy/typeshed/stdlib/sre_compile.pyi +0 -11
  1038. jaclang/vendor/mypy/typeshed/stdlib/sre_constants.pyi +0 -130
  1039. jaclang/vendor/mypy/typeshed/stdlib/sre_parse.pyi +0 -104
  1040. jaclang/vendor/mypy/typeshed/stdlib/ssl.pyi +0 -537
  1041. jaclang/vendor/mypy/typeshed/stdlib/stat.pyi +0 -1
  1042. jaclang/vendor/mypy/typeshed/stdlib/statistics.pyi +0 -132
  1043. jaclang/vendor/mypy/typeshed/stdlib/string.pyi +0 -83
  1044. jaclang/vendor/mypy/typeshed/stdlib/stringprep.pyi +0 -27
  1045. jaclang/vendor/mypy/typeshed/stdlib/struct.pyi +0 -26
  1046. jaclang/vendor/mypy/typeshed/stdlib/subprocess.pyi +0 -2615
  1047. jaclang/vendor/mypy/typeshed/stdlib/sunau.pyi +0 -86
  1048. jaclang/vendor/mypy/typeshed/stdlib/symbol.pyi +0 -93
  1049. jaclang/vendor/mypy/typeshed/stdlib/symtable.pyi +0 -58
  1050. jaclang/vendor/mypy/typeshed/stdlib/sys/__init__.pyi +0 -373
  1051. jaclang/vendor/mypy/typeshed/stdlib/sys/_monitoring.pyi +0 -52
  1052. jaclang/vendor/mypy/typeshed/stdlib/sysconfig.pyi +0 -48
  1053. jaclang/vendor/mypy/typeshed/stdlib/syslog.pyi +0 -46
  1054. jaclang/vendor/mypy/typeshed/stdlib/tabnanny.pyi +0 -16
  1055. jaclang/vendor/mypy/typeshed/stdlib/tarfile.pyi +0 -441
  1056. jaclang/vendor/mypy/typeshed/stdlib/telnetlib.pyi +0 -122
  1057. jaclang/vendor/mypy/typeshed/stdlib/tempfile.pyi +0 -477
  1058. jaclang/vendor/mypy/typeshed/stdlib/termios.pyi +0 -267
  1059. jaclang/vendor/mypy/typeshed/stdlib/textwrap.pyi +0 -103
  1060. jaclang/vendor/mypy/typeshed/stdlib/this.pyi +0 -2
  1061. jaclang/vendor/mypy/typeshed/stdlib/threading.pyi +0 -187
  1062. jaclang/vendor/mypy/typeshed/stdlib/time.pyi +0 -108
  1063. jaclang/vendor/mypy/typeshed/stdlib/timeit.pyi +0 -32
  1064. jaclang/vendor/mypy/typeshed/stdlib/tkinter/__init__.pyi +0 -3654
  1065. jaclang/vendor/mypy/typeshed/stdlib/tkinter/colorchooser.pyi +0 -20
  1066. jaclang/vendor/mypy/typeshed/stdlib/tkinter/commondialog.pyi +0 -14
  1067. jaclang/vendor/mypy/typeshed/stdlib/tkinter/constants.pyi +0 -80
  1068. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dialog.pyi +0 -16
  1069. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dnd.pyi +0 -20
  1070. jaclang/vendor/mypy/typeshed/stdlib/tkinter/filedialog.pyi +0 -151
  1071. jaclang/vendor/mypy/typeshed/stdlib/tkinter/font.pyi +0 -116
  1072. jaclang/vendor/mypy/typeshed/stdlib/tkinter/messagebox.pyi +0 -44
  1073. jaclang/vendor/mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +0 -9
  1074. jaclang/vendor/mypy/typeshed/stdlib/tkinter/simpledialog.pyi +0 -54
  1075. jaclang/vendor/mypy/typeshed/stdlib/tkinter/tix.pyi +0 -299
  1076. jaclang/vendor/mypy/typeshed/stdlib/tkinter/ttk.pyi +0 -1204
  1077. jaclang/vendor/mypy/typeshed/stdlib/token.pyi +0 -159
  1078. jaclang/vendor/mypy/typeshed/stdlib/tokenize.pyi +0 -177
  1079. jaclang/vendor/mypy/typeshed/stdlib/tomllib.pyi +0 -10
  1080. jaclang/vendor/mypy/typeshed/stdlib/trace.pyi +0 -79
  1081. jaclang/vendor/mypy/typeshed/stdlib/traceback.pyi +0 -262
  1082. jaclang/vendor/mypy/typeshed/stdlib/tracemalloc.pyi +0 -124
  1083. jaclang/vendor/mypy/typeshed/stdlib/tty.pyi +0 -30
  1084. jaclang/vendor/mypy/typeshed/stdlib/turtle.pyi +0 -713
  1085. jaclang/vendor/mypy/typeshed/stdlib/types.pyi +0 -614
  1086. jaclang/vendor/mypy/typeshed/stdlib/typing.pyi +0 -976
  1087. jaclang/vendor/mypy/typeshed/stdlib/typing_extensions.pyi +0 -509
  1088. jaclang/vendor/mypy/typeshed/stdlib/unicodedata.pyi +0 -73
  1089. jaclang/vendor/mypy/typeshed/stdlib/unittest/__init__.pyi +0 -67
  1090. jaclang/vendor/mypy/typeshed/stdlib/unittest/_log.pyi +0 -27
  1091. jaclang/vendor/mypy/typeshed/stdlib/unittest/async_case.pyi +0 -21
  1092. jaclang/vendor/mypy/typeshed/stdlib/unittest/case.pyi +0 -342
  1093. jaclang/vendor/mypy/typeshed/stdlib/unittest/loader.pyi +0 -51
  1094. jaclang/vendor/mypy/typeshed/stdlib/unittest/main.pyi +0 -69
  1095. jaclang/vendor/mypy/typeshed/stdlib/unittest/mock.pyi +0 -430
  1096. jaclang/vendor/mypy/typeshed/stdlib/unittest/result.pyi +0 -47
  1097. jaclang/vendor/mypy/typeshed/stdlib/unittest/runner.pyi +0 -72
  1098. jaclang/vendor/mypy/typeshed/stdlib/unittest/signals.pyi +0 -15
  1099. jaclang/vendor/mypy/typeshed/stdlib/unittest/suite.pyi +0 -22
  1100. jaclang/vendor/mypy/typeshed/stdlib/unittest/util.pyi +0 -23
  1101. jaclang/vendor/mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  1102. jaclang/vendor/mypy/typeshed/stdlib/urllib/error.pyi +0 -23
  1103. jaclang/vendor/mypy/typeshed/stdlib/urllib/parse.pyi +0 -210
  1104. jaclang/vendor/mypy/typeshed/stdlib/urllib/request.pyi +0 -400
  1105. jaclang/vendor/mypy/typeshed/stdlib/urllib/response.pyi +0 -43
  1106. jaclang/vendor/mypy/typeshed/stdlib/urllib/robotparser.pyi +0 -20
  1107. jaclang/vendor/mypy/typeshed/stdlib/uu.pyi +0 -13
  1108. jaclang/vendor/mypy/typeshed/stdlib/uuid.pyi +0 -100
  1109. jaclang/vendor/mypy/typeshed/stdlib/warnings.pyi +0 -112
  1110. jaclang/vendor/mypy/typeshed/stdlib/wave.pyi +0 -85
  1111. jaclang/vendor/mypy/typeshed/stdlib/weakref.pyi +0 -149
  1112. jaclang/vendor/mypy/typeshed/stdlib/webbrowser.pyi +0 -74
  1113. jaclang/vendor/mypy/typeshed/stdlib/winreg.pyi +0 -132
  1114. jaclang/vendor/mypy/typeshed/stdlib/winsound.pyi +0 -28
  1115. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  1116. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/handlers.pyi +0 -91
  1117. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/headers.pyi +0 -26
  1118. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/simple_server.pyi +0 -37
  1119. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/types.pyi +0 -32
  1120. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/util.pyi +0 -24
  1121. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/validate.pyi +0 -50
  1122. jaclang/vendor/mypy/typeshed/stdlib/xdrlib.pyi +0 -57
  1123. jaclang/vendor/mypy/typeshed/stdlib/xml/__init__.pyi +0 -1
  1124. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +0 -19
  1125. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/__init__.pyi +0 -69
  1126. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/domreg.pyi +0 -8
  1127. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +0 -100
  1128. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minicompat.pyi +0 -22
  1129. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minidom.pyi +0 -404
  1130. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/pulldom.pyi +0 -94
  1131. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +0 -108
  1132. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +0 -28
  1133. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +0 -34
  1134. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +0 -327
  1135. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  1136. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +0 -1
  1137. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/__init__.pyi +0 -1
  1138. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +0 -1
  1139. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +0 -1
  1140. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +0 -1
  1141. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/__init__.pyi +0 -25
  1142. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +0 -19
  1143. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/handler.pyi +0 -55
  1144. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/saxutils.pyi +0 -60
  1145. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +0 -87
  1146. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  1147. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/client.pyi +0 -296
  1148. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/server.pyi +0 -143
  1149. jaclang/vendor/mypy/typeshed/stdlib/xxlimited.pyi +0 -22
  1150. jaclang/vendor/mypy/typeshed/stdlib/zipapp.pyi +0 -20
  1151. jaclang/vendor/mypy/typeshed/stdlib/zipfile/__init__.pyi +0 -306
  1152. jaclang/vendor/mypy/typeshed/stdlib/zipfile/_path.pyi +0 -95
  1153. jaclang/vendor/mypy/typeshed/stdlib/zipimport.pyi +0 -32
  1154. jaclang/vendor/mypy/typeshed/stdlib/zlib.pyi +0 -56
  1155. jaclang/vendor/mypy/typeshed/stdlib/zoneinfo/__init__.pyi +0 -38
  1156. jaclang/vendor/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +0 -218
  1157. jaclang/vendor/mypy/typestate.py +0 -323
  1158. jaclang/vendor/mypy/typetraverser.py +0 -148
  1159. jaclang/vendor/mypy/typevars.py +0 -93
  1160. jaclang/vendor/mypy/typevartuples.py +0 -32
  1161. jaclang/vendor/mypy/util.py +0 -869
  1162. jaclang/vendor/mypy/version.py +0 -1
  1163. jaclang/vendor/mypy/visitor.py +0 -621
  1164. jaclang/vendor/mypy/xml/mypy-html.css +0 -104
  1165. jaclang/vendor/mypy/xml/mypy-html.xslt +0 -81
  1166. jaclang/vendor/mypy/xml/mypy-txt.xslt +0 -100
  1167. jaclang/vendor/mypy/xml/mypy.xsd +0 -50
  1168. jaclang/vendor/mypy-1.10.0.dist-info/LICENSE +0 -229
  1169. jaclang/vendor/mypy-1.10.0.dist-info/METADATA +0 -48
  1170. jaclang/vendor/mypy-1.10.0.dist-info/RECORD +0 -1241
  1171. jaclang/vendor/mypy-1.10.0.dist-info/WHEEL +0 -6
  1172. jaclang/vendor/mypy-1.10.0.dist-info/entry_points.txt +0 -6
  1173. jaclang/vendor/mypy-1.10.0.dist-info/top_level.txt +0 -3
  1174. jaclang/vendor/mypy_extensions-1.0.0.dist-info/LICENSE +0 -27
  1175. jaclang/vendor/mypy_extensions-1.0.0.dist-info/METADATA +0 -29
  1176. jaclang/vendor/mypy_extensions-1.0.0.dist-info/RECORD +0 -6
  1177. jaclang/vendor/mypy_extensions-1.0.0.dist-info/top_level.txt +0 -1
  1178. jaclang/vendor/mypy_extensions.py +0 -213
  1179. jaclang/vendor/mypyc/README.md +0 -133
  1180. jaclang/vendor/mypyc/__init__.py +0 -0
  1181. jaclang/vendor/mypyc/__main__.py +0 -57
  1182. jaclang/vendor/mypyc/analysis/__init__.py +0 -0
  1183. jaclang/vendor/mypyc/analysis/attrdefined.py +0 -436
  1184. jaclang/vendor/mypyc/analysis/blockfreq.py +0 -32
  1185. jaclang/vendor/mypyc/analysis/dataflow.py +0 -628
  1186. jaclang/vendor/mypyc/analysis/ircheck.py +0 -433
  1187. jaclang/vendor/mypyc/analysis/selfleaks.py +0 -211
  1188. jaclang/vendor/mypyc/build.py +0 -616
  1189. jaclang/vendor/mypyc/codegen/__init__.py +0 -0
  1190. jaclang/vendor/mypyc/codegen/cstring.py +0 -54
  1191. jaclang/vendor/mypyc/codegen/emit.py +0 -1193
  1192. jaclang/vendor/mypyc/codegen/emitclass.py +0 -1060
  1193. jaclang/vendor/mypyc/codegen/emitfunc.py +0 -852
  1194. jaclang/vendor/mypyc/codegen/emitmodule.py +0 -1136
  1195. jaclang/vendor/mypyc/codegen/emitwrapper.py +0 -979
  1196. jaclang/vendor/mypyc/codegen/literals.py +0 -302
  1197. jaclang/vendor/mypyc/common.py +0 -136
  1198. jaclang/vendor/mypyc/crash.py +0 -31
  1199. jaclang/vendor/mypyc/doc/Makefile +0 -20
  1200. jaclang/vendor/mypyc/doc/bool_operations.rst +0 -27
  1201. jaclang/vendor/mypyc/doc/compilation_units.rst +0 -20
  1202. jaclang/vendor/mypyc/doc/conf.py +0 -59
  1203. jaclang/vendor/mypyc/doc/cpython-timings.md +0 -25
  1204. jaclang/vendor/mypyc/doc/dev-intro.md +0 -548
  1205. jaclang/vendor/mypyc/doc/dict_operations.rst +0 -59
  1206. jaclang/vendor/mypyc/doc/differences_from_python.rst +0 -332
  1207. jaclang/vendor/mypyc/doc/float_operations.rst +0 -50
  1208. jaclang/vendor/mypyc/doc/future.md +0 -42
  1209. jaclang/vendor/mypyc/doc/getting_started.rst +0 -240
  1210. jaclang/vendor/mypyc/doc/index.rst +0 -61
  1211. jaclang/vendor/mypyc/doc/int_operations.rst +0 -162
  1212. jaclang/vendor/mypyc/doc/introduction.rst +0 -150
  1213. jaclang/vendor/mypyc/doc/list_operations.rst +0 -65
  1214. jaclang/vendor/mypyc/doc/make.bat +0 -35
  1215. jaclang/vendor/mypyc/doc/native_classes.rst +0 -206
  1216. jaclang/vendor/mypyc/doc/native_operations.rst +0 -55
  1217. jaclang/vendor/mypyc/doc/performance_tips_and_tricks.rst +0 -244
  1218. jaclang/vendor/mypyc/doc/set_operations.rst +0 -47
  1219. jaclang/vendor/mypyc/doc/str_operations.rst +0 -35
  1220. jaclang/vendor/mypyc/doc/tuple_operations.rst +0 -33
  1221. jaclang/vendor/mypyc/doc/using_type_annotations.rst +0 -398
  1222. jaclang/vendor/mypyc/errors.py +0 -29
  1223. jaclang/vendor/mypyc/external/googletest/LICENSE +0 -28
  1224. jaclang/vendor/mypyc/external/googletest/README.md +0 -280
  1225. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-death-test.h +0 -294
  1226. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-message.h +0 -250
  1227. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h +0 -1444
  1228. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h.pump +0 -510
  1229. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-printers.h +0 -993
  1230. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-spi.h +0 -232
  1231. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-test-part.h +0 -179
  1232. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-typed-test.h +0 -263
  1233. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest.h +0 -2236
  1234. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_pred_impl.h +0 -358
  1235. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_prod.h +0 -58
  1236. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
  1237. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  1238. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest.h +0 -41
  1239. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
  1240. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h +0 -206
  1241. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-internal.h +0 -1238
  1242. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  1243. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
  1244. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
  1245. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util.h +0 -731
  1246. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
  1247. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port.h +0 -2560
  1248. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-string.h +0 -167
  1249. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  1250. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  1251. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
  1252. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
  1253. jaclang/vendor/mypyc/external/googletest/make/Makefile +0 -61
  1254. jaclang/vendor/mypyc/external/googletest/src/gtest-all.cc +0 -48
  1255. jaclang/vendor/mypyc/external/googletest/src/gtest-death-test.cc +0 -1342
  1256. jaclang/vendor/mypyc/external/googletest/src/gtest-filepath.cc +0 -387
  1257. jaclang/vendor/mypyc/external/googletest/src/gtest-internal-inl.h +0 -1183
  1258. jaclang/vendor/mypyc/external/googletest/src/gtest-port.cc +0 -1259
  1259. jaclang/vendor/mypyc/external/googletest/src/gtest-printers.cc +0 -373
  1260. jaclang/vendor/mypyc/external/googletest/src/gtest-test-part.cc +0 -110
  1261. jaclang/vendor/mypyc/external/googletest/src/gtest-typed-test.cc +0 -118
  1262. jaclang/vendor/mypyc/external/googletest/src/gtest.cc +0 -5388
  1263. jaclang/vendor/mypyc/external/googletest/src/gtest_main.cc +0 -38
  1264. jaclang/vendor/mypyc/ir/__init__.py +0 -0
  1265. jaclang/vendor/mypyc/ir/class_ir.py +0 -499
  1266. jaclang/vendor/mypyc/ir/func_ir.py +0 -370
  1267. jaclang/vendor/mypyc/ir/module_ir.py +0 -88
  1268. jaclang/vendor/mypyc/ir/ops.py +0 -1727
  1269. jaclang/vendor/mypyc/ir/pprint.py +0 -516
  1270. jaclang/vendor/mypyc/ir/rtypes.py +0 -1038
  1271. jaclang/vendor/mypyc/irbuild/__init__.py +0 -0
  1272. jaclang/vendor/mypyc/irbuild/ast_helpers.py +0 -123
  1273. jaclang/vendor/mypyc/irbuild/builder.py +0 -1394
  1274. jaclang/vendor/mypyc/irbuild/callable_class.py +0 -173
  1275. jaclang/vendor/mypyc/irbuild/classdef.py +0 -850
  1276. jaclang/vendor/mypyc/irbuild/constant_fold.py +0 -95
  1277. jaclang/vendor/mypyc/irbuild/context.py +0 -186
  1278. jaclang/vendor/mypyc/irbuild/env_class.py +0 -223
  1279. jaclang/vendor/mypyc/irbuild/expression.py +0 -1070
  1280. jaclang/vendor/mypyc/irbuild/for_helpers.py +0 -1075
  1281. jaclang/vendor/mypyc/irbuild/format_str_tokenizer.py +0 -250
  1282. jaclang/vendor/mypyc/irbuild/function.py +0 -1088
  1283. jaclang/vendor/mypyc/irbuild/generator.py +0 -346
  1284. jaclang/vendor/mypyc/irbuild/ll_builder.py +0 -2389
  1285. jaclang/vendor/mypyc/irbuild/main.py +0 -153
  1286. jaclang/vendor/mypyc/irbuild/mapper.py +0 -221
  1287. jaclang/vendor/mypyc/irbuild/match.py +0 -355
  1288. jaclang/vendor/mypyc/irbuild/nonlocalcontrol.py +0 -197
  1289. jaclang/vendor/mypyc/irbuild/prebuildvisitor.py +0 -203
  1290. jaclang/vendor/mypyc/irbuild/prepare.py +0 -609
  1291. jaclang/vendor/mypyc/irbuild/specialize.py +0 -822
  1292. jaclang/vendor/mypyc/irbuild/statement.py +0 -1017
  1293. jaclang/vendor/mypyc/irbuild/targets.py +0 -57
  1294. jaclang/vendor/mypyc/irbuild/util.py +0 -189
  1295. jaclang/vendor/mypyc/irbuild/visitor.py +0 -401
  1296. jaclang/vendor/mypyc/irbuild/vtable.py +0 -82
  1297. jaclang/vendor/mypyc/lib-rt/CPy.h +0 -638
  1298. jaclang/vendor/mypyc/lib-rt/bytes_ops.c +0 -143
  1299. jaclang/vendor/mypyc/lib-rt/dict_ops.c +0 -446
  1300. jaclang/vendor/mypyc/lib-rt/exc_ops.c +0 -259
  1301. jaclang/vendor/mypyc/lib-rt/float_ops.c +0 -192
  1302. jaclang/vendor/mypyc/lib-rt/generic_ops.c +0 -64
  1303. jaclang/vendor/mypyc/lib-rt/getargs.c +0 -450
  1304. jaclang/vendor/mypyc/lib-rt/getargsfast.c +0 -569
  1305. jaclang/vendor/mypyc/lib-rt/init.c +0 -13
  1306. jaclang/vendor/mypyc/lib-rt/int_ops.c +0 -803
  1307. jaclang/vendor/mypyc/lib-rt/list_ops.c +0 -335
  1308. jaclang/vendor/mypyc/lib-rt/misc_ops.c +0 -942
  1309. jaclang/vendor/mypyc/lib-rt/module_shim.tmpl +0 -18
  1310. jaclang/vendor/mypyc/lib-rt/mypyc_util.h +0 -118
  1311. jaclang/vendor/mypyc/lib-rt/pythoncapi_compat.h +0 -497
  1312. jaclang/vendor/mypyc/lib-rt/pythonsupport.h +0 -533
  1313. jaclang/vendor/mypyc/lib-rt/set_ops.c +0 -17
  1314. jaclang/vendor/mypyc/lib-rt/setup.py +0 -70
  1315. jaclang/vendor/mypyc/lib-rt/str_ops.c +0 -241
  1316. jaclang/vendor/mypyc/lib-rt/test_capi.cc +0 -585
  1317. jaclang/vendor/mypyc/lib-rt/tuple_ops.c +0 -61
  1318. jaclang/vendor/mypyc/lower/__init__.py +0 -0
  1319. jaclang/vendor/mypyc/lower/int_ops.py +0 -113
  1320. jaclang/vendor/mypyc/lower/list_ops.py +0 -45
  1321. jaclang/vendor/mypyc/lower/misc_ops.py +0 -12
  1322. jaclang/vendor/mypyc/lower/registry.py +0 -26
  1323. jaclang/vendor/mypyc/namegen.py +0 -115
  1324. jaclang/vendor/mypyc/options.py +0 -32
  1325. jaclang/vendor/mypyc/primitives/__init__.py +0 -0
  1326. jaclang/vendor/mypyc/primitives/bytes_ops.py +0 -101
  1327. jaclang/vendor/mypyc/primitives/dict_ops.py +0 -325
  1328. jaclang/vendor/mypyc/primitives/exc_ops.py +0 -101
  1329. jaclang/vendor/mypyc/primitives/float_ops.py +0 -168
  1330. jaclang/vendor/mypyc/primitives/generic_ops.py +0 -384
  1331. jaclang/vendor/mypyc/primitives/int_ops.py +0 -303
  1332. jaclang/vendor/mypyc/primitives/list_ops.py +0 -310
  1333. jaclang/vendor/mypyc/primitives/misc_ops.py +0 -267
  1334. jaclang/vendor/mypyc/primitives/registry.py +0 -360
  1335. jaclang/vendor/mypyc/primitives/set_ops.py +0 -121
  1336. jaclang/vendor/mypyc/primitives/str_ops.py +0 -229
  1337. jaclang/vendor/mypyc/primitives/tuple_ops.py +0 -83
  1338. jaclang/vendor/mypyc/rt_subtype.py +0 -77
  1339. jaclang/vendor/mypyc/sametype.py +0 -83
  1340. jaclang/vendor/mypyc/subtype.py +0 -88
  1341. jaclang/vendor/mypyc/test/__init__.py +0 -0
  1342. jaclang/vendor/mypyc/test/config.py +0 -13
  1343. jaclang/vendor/mypyc/test/test_alwaysdefined.py +0 -46
  1344. jaclang/vendor/mypyc/test/test_analysis.py +0 -77
  1345. jaclang/vendor/mypyc/test/test_cheader.py +0 -53
  1346. jaclang/vendor/mypyc/test/test_commandline.py +0 -82
  1347. jaclang/vendor/mypyc/test/test_emit.py +0 -69
  1348. jaclang/vendor/mypyc/test/test_emitclass.py +0 -35
  1349. jaclang/vendor/mypyc/test/test_emitfunc.py +0 -928
  1350. jaclang/vendor/mypyc/test/test_emitwrapper.py +0 -60
  1351. jaclang/vendor/mypyc/test/test_exceptions.py +0 -56
  1352. jaclang/vendor/mypyc/test/test_external.py +0 -49
  1353. jaclang/vendor/mypyc/test/test_irbuild.py +0 -87
  1354. jaclang/vendor/mypyc/test/test_ircheck.py +0 -199
  1355. jaclang/vendor/mypyc/test/test_literals.py +0 -90
  1356. jaclang/vendor/mypyc/test/test_lowering.py +0 -56
  1357. jaclang/vendor/mypyc/test/test_namegen.py +0 -48
  1358. jaclang/vendor/mypyc/test/test_optimizations.py +0 -68
  1359. jaclang/vendor/mypyc/test/test_pprint.py +0 -42
  1360. jaclang/vendor/mypyc/test/test_rarray.py +0 -48
  1361. jaclang/vendor/mypyc/test/test_refcount.py +0 -59
  1362. jaclang/vendor/mypyc/test/test_run.py +0 -426
  1363. jaclang/vendor/mypyc/test/test_serialization.py +0 -108
  1364. jaclang/vendor/mypyc/test/test_struct.py +0 -112
  1365. jaclang/vendor/mypyc/test/test_tuplename.py +0 -33
  1366. jaclang/vendor/mypyc/test/test_typeops.py +0 -97
  1367. jaclang/vendor/mypyc/test/testutil.py +0 -283
  1368. jaclang/vendor/mypyc/test-data/alwaysdefined.test +0 -732
  1369. jaclang/vendor/mypyc/test-data/analysis.test +0 -470
  1370. jaclang/vendor/mypyc/test-data/commandline.test +0 -245
  1371. jaclang/vendor/mypyc/test-data/driver/driver.py +0 -48
  1372. jaclang/vendor/mypyc/test-data/exceptions-freq.test +0 -125
  1373. jaclang/vendor/mypyc/test-data/exceptions.test +0 -699
  1374. jaclang/vendor/mypyc/test-data/fixtures/ir.py +0 -373
  1375. jaclang/vendor/mypyc/test-data/fixtures/testutil.py +0 -103
  1376. jaclang/vendor/mypyc/test-data/fixtures/typing-full.pyi +0 -169
  1377. jaclang/vendor/mypyc/test-data/irbuild-any.test +0 -236
  1378. jaclang/vendor/mypyc/test-data/irbuild-basic.test +0 -3399
  1379. jaclang/vendor/mypyc/test-data/irbuild-bool.test +0 -424
  1380. jaclang/vendor/mypyc/test-data/irbuild-bytes.test +0 -181
  1381. jaclang/vendor/mypyc/test-data/irbuild-classes.test +0 -1302
  1382. jaclang/vendor/mypyc/test-data/irbuild-constant-fold.test +0 -480
  1383. jaclang/vendor/mypyc/test-data/irbuild-dict.test +0 -584
  1384. jaclang/vendor/mypyc/test-data/irbuild-dunders.test +0 -215
  1385. jaclang/vendor/mypyc/test-data/irbuild-float.test +0 -497
  1386. jaclang/vendor/mypyc/test-data/irbuild-generics.test +0 -150
  1387. jaclang/vendor/mypyc/test-data/irbuild-glue-methods.test +0 -437
  1388. jaclang/vendor/mypyc/test-data/irbuild-i16.test +0 -526
  1389. jaclang/vendor/mypyc/test-data/irbuild-i32.test +0 -598
  1390. jaclang/vendor/mypyc/test-data/irbuild-i64.test +0 -2144
  1391. jaclang/vendor/mypyc/test-data/irbuild-int.test +0 -194
  1392. jaclang/vendor/mypyc/test-data/irbuild-isinstance.test +0 -109
  1393. jaclang/vendor/mypyc/test-data/irbuild-lists.test +0 -513
  1394. jaclang/vendor/mypyc/test-data/irbuild-match.test +0 -1717
  1395. jaclang/vendor/mypyc/test-data/irbuild-math.test +0 -64
  1396. jaclang/vendor/mypyc/test-data/irbuild-nested.test +0 -807
  1397. jaclang/vendor/mypyc/test-data/irbuild-optional.test +0 -536
  1398. jaclang/vendor/mypyc/test-data/irbuild-set.test +0 -806
  1399. jaclang/vendor/mypyc/test-data/irbuild-singledispatch.test +0 -257
  1400. jaclang/vendor/mypyc/test-data/irbuild-statements.test +0 -1060
  1401. jaclang/vendor/mypyc/test-data/irbuild-str.test +0 -312
  1402. jaclang/vendor/mypyc/test-data/irbuild-strip-asserts.test +0 -12
  1403. jaclang/vendor/mypyc/test-data/irbuild-try.test +0 -523
  1404. jaclang/vendor/mypyc/test-data/irbuild-tuple.test +0 -386
  1405. jaclang/vendor/mypyc/test-data/irbuild-u8.test +0 -543
  1406. jaclang/vendor/mypyc/test-data/irbuild-unreachable.test +0 -241
  1407. jaclang/vendor/mypyc/test-data/irbuild-vectorcall.test +0 -153
  1408. jaclang/vendor/mypyc/test-data/lowering-int.test +0 -377
  1409. jaclang/vendor/mypyc/test-data/lowering-list.test +0 -33
  1410. jaclang/vendor/mypyc/test-data/opt-copy-propagation.test +0 -400
  1411. jaclang/vendor/mypyc/test-data/opt-flag-elimination.test +0 -296
  1412. jaclang/vendor/mypyc/test-data/refcount.test +0 -1482
  1413. jaclang/vendor/mypyc/test-data/run-async.test +0 -173
  1414. jaclang/vendor/mypyc/test-data/run-attrs.test +0 -318
  1415. jaclang/vendor/mypyc/test-data/run-bench.test +0 -196
  1416. jaclang/vendor/mypyc/test-data/run-bools.test +0 -229
  1417. jaclang/vendor/mypyc/test-data/run-bytes.test +0 -302
  1418. jaclang/vendor/mypyc/test-data/run-classes.test +0 -2505
  1419. jaclang/vendor/mypyc/test-data/run-dicts.test +0 -334
  1420. jaclang/vendor/mypyc/test-data/run-dunders.test +0 -945
  1421. jaclang/vendor/mypyc/test-data/run-exceptions.test +0 -448
  1422. jaclang/vendor/mypyc/test-data/run-floats.test +0 -516
  1423. jaclang/vendor/mypyc/test-data/run-functions.test +0 -1310
  1424. jaclang/vendor/mypyc/test-data/run-generators.test +0 -682
  1425. jaclang/vendor/mypyc/test-data/run-i16.test +0 -338
  1426. jaclang/vendor/mypyc/test-data/run-i32.test +0 -336
  1427. jaclang/vendor/mypyc/test-data/run-i64.test +0 -1519
  1428. jaclang/vendor/mypyc/test-data/run-imports.test +0 -265
  1429. jaclang/vendor/mypyc/test-data/run-integers.test +0 -540
  1430. jaclang/vendor/mypyc/test-data/run-lists.test +0 -411
  1431. jaclang/vendor/mypyc/test-data/run-loops.test +0 -485
  1432. jaclang/vendor/mypyc/test-data/run-match.test +0 -283
  1433. jaclang/vendor/mypyc/test-data/run-math.test +0 -106
  1434. jaclang/vendor/mypyc/test-data/run-misc.test +0 -1170
  1435. jaclang/vendor/mypyc/test-data/run-multimodule.test +0 -887
  1436. jaclang/vendor/mypyc/test-data/run-mypy-sim.test +0 -138
  1437. jaclang/vendor/mypyc/test-data/run-primitives.test +0 -375
  1438. jaclang/vendor/mypyc/test-data/run-python37.test +0 -159
  1439. jaclang/vendor/mypyc/test-data/run-python38.test +0 -88
  1440. jaclang/vendor/mypyc/test-data/run-sets.test +0 -150
  1441. jaclang/vendor/mypyc/test-data/run-singledispatch.test +0 -698
  1442. jaclang/vendor/mypyc/test-data/run-strings.test +0 -641
  1443. jaclang/vendor/mypyc/test-data/run-traits.test +0 -411
  1444. jaclang/vendor/mypyc/test-data/run-tuples.test +0 -258
  1445. jaclang/vendor/mypyc/test-data/run-u8.test +0 -303
  1446. jaclang/vendor/mypyc/transform/__init__.py +0 -0
  1447. jaclang/vendor/mypyc/transform/copy_propagation.py +0 -94
  1448. jaclang/vendor/mypyc/transform/exceptions.py +0 -182
  1449. jaclang/vendor/mypyc/transform/flag_elimination.py +0 -108
  1450. jaclang/vendor/mypyc/transform/ir_transform.py +0 -368
  1451. jaclang/vendor/mypyc/transform/lower.py +0 -33
  1452. jaclang/vendor/mypyc/transform/refcount.py +0 -294
  1453. jaclang/vendor/mypyc/transform/uninit.py +0 -190
  1454. jaclang/vendor/typing_extensions-4.12.2.dist-info/LICENSE +0 -279
  1455. jaclang/vendor/typing_extensions-4.12.2.dist-info/METADATA +0 -67
  1456. jaclang/vendor/typing_extensions-4.12.2.dist-info/RECORD +0 -5
  1457. jaclang/vendor/typing_extensions-4.12.2.dist-info/WHEEL +0 -4
  1458. jaclang/vendor/typing_extensions.py +0 -3641
  1459. jaclang-0.7.33.dist-info/RECORD +0 -1562
  1460. /jaclang/{vendor/mypy/dmypy → compiler/larkparse}/__init__.py +0 -0
  1461. /jaclang/{tests → compiler/passes/main/tests}/fixtures/access_checker.jac +0 -0
  1462. /jaclang/{vendor/mypy/plugins/__init__.py → langserve/tests/fixtures/deep_check_crash.jac} +0 -0
  1463. /jaclang/{vendor/mypy/server/__init__.py → langserve/tests/server_test/code_test.py} +0 -0
  1464. /jaclang/{plugin → runtimelib}/tests/__init__.py +0 -0
  1465. /jaclang/{plugin → runtimelib}/tests/fixtures/traversing_save.jac +0 -0
  1466. /jaclang/{vendor/mypy/test → tests}/__init__.py +0 -0
  1467. /jaclang/{vendor/mypy/test/meta → tests/fixtures}/__init__.py +0 -0
  1468. /jaclang/tests/fixtures/{architype_def_bug.jac → archetype_def_bug.jac} +0 -0
  1469. /jaclang/vendor/{mypy/typeshed/stdlib/concurrent/__init__.pyi → attrs-25.3.0.dist-info/REQUESTED} +0 -0
  1470. /jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/licenses/LICENSE +0 -0
  1471. /jaclang/vendor/{mypy/typeshed/stdlib/distutils/command/__init__.pyi → cattrs-24.1.3.dist-info/REQUESTED} +0 -0
  1472. /jaclang/vendor/{cattrs-23.2.3.dist-info → cattrs-24.1.3.dist-info}/licenses/LICENSE +0 -0
  1473. /jaclang/vendor/{mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi → lark-1.2.2.dist-info/REQUESTED} +0 -0
  1474. /jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/entry_points.txt +0 -0
  1475. /jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/top_level.txt +0 -0
  1476. /jaclang/vendor/{mypy/typeshed/stdlib/email/mime/__init__.pyi → lsprotocol-2023.0.1.dist-info/REQUESTED} +0 -0
  1477. /jaclang/vendor/lsprotocol-2023.0.1.dist-info/{LICENSE → licenses/LICENSE} +0 -0
  1478. /jaclang/vendor/{mypy/typeshed/stdlib/lib2to3/__init__.pyi → pluggy-1.5.0.dist-info/REQUESTED} +0 -0
  1479. /jaclang/vendor/pluggy-1.5.0.dist-info/{LICENSE → licenses/LICENSE} +0 -0
  1480. /jaclang/vendor/{mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi → pygls-1.3.1.dist-info/REQUESTED} +0 -0
  1481. {jaclang-0.7.33.dist-info → jaclang-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -1,25 +1,31 @@
1
1
  # SPDX-License-Identifier: MIT
2
2
 
3
+ from __future__ import annotations
4
+
5
+ import abc
3
6
  import contextlib
4
7
  import copy
5
8
  import enum
6
- import functools
7
9
  import inspect
8
10
  import itertools
9
11
  import linecache
10
12
  import sys
11
13
  import types
12
- import typing
14
+ import unicodedata
13
15
 
14
- from operator import itemgetter
16
+ from collections.abc import Callable, Mapping
17
+ from functools import cached_property
18
+ from typing import Any, NamedTuple, TypeVar
15
19
 
16
20
  # We need to import _compat itself in addition to the _compat members to avoid
17
21
  # having the thread-local in the globals here.
18
22
  from . import _compat, _config, setters
19
23
  from ._compat import (
20
- PY310,
21
- PY_3_8_PLUS,
24
+ PY_3_10_PLUS,
25
+ PY_3_11_PLUS,
26
+ PY_3_13_PLUS,
22
27
  _AnnotationExtractor,
28
+ _get_annotations,
23
29
  get_generic_base,
24
30
  )
25
31
  from .exceptions import (
@@ -31,10 +37,9 @@ from .exceptions import (
31
37
 
32
38
 
33
39
  # This is used at least twice, so cache it here.
34
- _obj_setattr = object.__setattr__
35
- _init_converter_pat = "__attr_converter_%s"
36
- _init_factory_pat = "__attr_factory_%s"
37
- _classvar_prefixes = (
40
+ _OBJ_SETATTR = object.__setattr__
41
+ _INIT_FACTORY_PAT = "__attr_factory_%s"
42
+ _CLASSVAR_PREFIXES = (
38
43
  "typing.ClassVar",
39
44
  "t.ClassVar",
40
45
  "ClassVar",
@@ -43,19 +48,19 @@ _classvar_prefixes = (
43
48
  # we don't use a double-underscore prefix because that triggers
44
49
  # name mangling when trying to create a slot for the field
45
50
  # (when slots=True)
46
- _hash_cache_field = "_attrs_cached_hash"
51
+ _HASH_CACHE_FIELD = "_attrs_cached_hash"
47
52
 
48
- _empty_metadata_singleton = types.MappingProxyType({})
53
+ _EMPTY_METADATA_SINGLETON = types.MappingProxyType({})
49
54
 
50
55
  # Unique object for unequivocal getattr() defaults.
51
- _sentinel = object()
56
+ _SENTINEL = object()
52
57
 
53
- _ng_default_on_setattr = setters.pipe(setters.convert, setters.validate)
58
+ _DEFAULT_ON_SETATTR = setters.pipe(setters.convert, setters.validate)
54
59
 
55
60
 
56
61
  class _Nothing(enum.Enum):
57
62
  """
58
- Sentinel to indicate the lack of a value when ``None`` is ambiguous.
63
+ Sentinel to indicate the lack of a value when `None` is ambiguous.
59
64
 
60
65
  If extending attrs, you can use ``typing.Literal[NOTHING]`` to show
61
66
  that a value may be ``NOTHING``.
@@ -75,7 +80,9 @@ class _Nothing(enum.Enum):
75
80
 
76
81
  NOTHING = _Nothing.NOTHING
77
82
  """
78
- Sentinel to indicate the lack of a value when ``None`` is ambiguous.
83
+ Sentinel to indicate the lack of a value when `None` is ambiguous.
84
+
85
+ When using in 3rd party code, use `attrs.NothingType` for type annotations.
79
86
  """
80
87
 
81
88
 
@@ -84,7 +91,7 @@ class _CacheHashWrapper(int):
84
91
  An integer subclass that pickles / copies as None
85
92
 
86
93
  This is used for non-slots classes with ``cache_hash=True``, to avoid
87
- serializing a potentially (even likely) invalid hash value. Since ``None``
94
+ serializing a potentially (even likely) invalid hash value. Since `None`
88
95
  is the default value for uncalculated hashes, whenever this is copied,
89
96
  the copy's value for the hash should automatically reset.
90
97
 
@@ -113,137 +120,29 @@ def attrib(
113
120
  alias=None,
114
121
  ):
115
122
  """
116
- Create a new attribute on a class.
117
-
118
- .. warning::
119
-
120
- Does *not* do anything unless the class is also decorated with `attr.s`
121
- / `attrs.define` / and so on!
122
-
123
- Please consider using `attrs.field` in new code (``attr.ib`` will *never*
124
- go away, though).
125
-
126
- :param default: A value that is used if an *attrs*-generated ``__init__``
127
- is used and no value is passed while instantiating or the attribute is
128
- excluded using ``init=False``.
129
-
130
- If the value is an instance of `attrs.Factory`, its callable will be
131
- used to construct a new value (useful for mutable data types like lists
132
- or dicts).
133
-
134
- If a default is not set (or set manually to `attrs.NOTHING`), a value
135
- *must* be supplied when instantiating; otherwise a `TypeError` will be
136
- raised.
137
-
138
- The default can also be set using decorator notation as shown below.
139
-
140
- .. seealso:: `defaults`
141
-
142
- :param callable factory: Syntactic sugar for
143
- ``default=attr.Factory(factory)``.
144
-
145
- :param validator: `callable` that is called by *attrs*-generated
146
- ``__init__`` methods after the instance has been initialized. They
147
- receive the initialized instance, the :func:`~attrs.Attribute`, and the
148
- passed value.
149
-
150
- The return value is *not* inspected so the validator has to throw an
151
- exception itself.
152
-
153
- If a `list` is passed, its items are treated as validators and must all
154
- pass.
155
-
156
- Validators can be globally disabled and re-enabled using
157
- `attrs.validators.get_disabled` / `attrs.validators.set_disabled`.
158
-
159
- The validator can also be set using decorator notation as shown below.
160
-
161
- .. seealso:: :ref:`validators`
162
-
163
- :type validator: `callable` or a `list` of `callable`\\ s.
164
-
165
- :param repr: Include this attribute in the generated ``__repr__`` method.
166
- If ``True``, include the attribute; if ``False``, omit it. By default,
167
- the built-in ``repr()`` function is used. To override how the attribute
168
- value is formatted, pass a ``callable`` that takes a single value and
169
- returns a string. Note that the resulting string is used as-is, i.e. it
170
- will be used directly *instead* of calling ``repr()`` (the default).
171
- :type repr: a `bool` or a `callable` to use a custom function.
172
-
173
- :param eq: If ``True`` (default), include this attribute in the generated
174
- ``__eq__`` and ``__ne__`` methods that check two instances for
175
- equality. To override how the attribute value is compared, pass a
176
- ``callable`` that takes a single value and returns the value to be
177
- compared.
123
+ Create a new field / attribute on a class.
178
124
 
179
- .. seealso:: `comparison`
180
- :type eq: a `bool` or a `callable`.
125
+ Identical to `attrs.field`, except it's not keyword-only.
181
126
 
182
- :param order: If ``True`` (default), include this attributes in the
183
- generated ``__lt__``, ``__le__``, ``__gt__`` and ``__ge__`` methods. To
184
- override how the attribute value is ordered, pass a ``callable`` that
185
- takes a single value and returns the value to be ordered.
127
+ Consider using `attrs.field` in new code (``attr.ib`` will *never* go away,
128
+ though).
186
129
 
187
- .. seealso:: `comparison`
188
- :type order: a `bool` or a `callable`.
189
-
190
- :param cmp: Setting *cmp* is equivalent to setting *eq* and *order* to the
191
- same value. Must not be mixed with *eq* or *order*.
192
-
193
- .. seealso:: `comparison`
194
- :type cmp: a `bool` or a `callable`.
195
-
196
- :param bool | None hash: Include this attribute in the generated
197
- ``__hash__`` method. If ``None`` (default), mirror *eq*'s value. This
198
- is the correct behavior according the Python spec. Setting this value
199
- to anything else than ``None`` is *discouraged*.
200
-
201
- .. seealso:: `hashing`
202
- :param bool init: Include this attribute in the generated ``__init__``
203
- method. It is possible to set this to ``False`` and set a default
204
- value. In that case this attributed is unconditionally initialized
205
- with the specified default value or factory.
206
-
207
- .. seealso:: `init`
208
- :param callable converter: `callable` that is called by *attrs*-generated
209
- ``__init__`` methods to convert attribute's value to the desired
210
- format. It is given the passed-in value, and the returned value will
211
- be used as the new value of the attribute. The value is converted
212
- before being passed to the validator, if any.
130
+ .. warning::
213
131
 
214
- .. seealso:: :ref:`converters`
215
- :param dict | None metadata: An arbitrary mapping, to be used by
216
- third-party components. See `extending-metadata`.
132
+ Does **nothing** unless the class is also decorated with
133
+ `attr.s` (or similar)!
217
134
 
218
- :param type: The type of the attribute. Nowadays, the preferred method to
219
- specify the type is using a variable annotation (see :pep:`526`). This
220
- argument is provided for backward compatibility. Regardless of the
221
- approach used, the type will be stored on ``Attribute.type``.
222
-
223
- Please note that *attrs* doesn't do anything with this metadata by
224
- itself. You can use it as part of your own code or for `static type
225
- checking <types>`.
226
- :param bool kw_only: Make this attribute keyword-only in the generated
227
- ``__init__`` (if ``init`` is ``False``, this parameter is ignored).
228
- :param on_setattr: Allows to overwrite the *on_setattr* setting from
229
- `attr.s`. If left `None`, the *on_setattr* value from `attr.s` is used.
230
- Set to `attrs.setters.NO_OP` to run **no** `setattr` hooks for this
231
- attribute -- regardless of the setting in `attr.s`.
232
- :type on_setattr: `callable`, or a list of callables, or `None`, or
233
- `attrs.setters.NO_OP`
234
- :param str | None alias: Override this attribute's parameter name in the
235
- generated ``__init__`` method. If left `None`, default to ``name``
236
- stripped of leading underscores. See `private-attributes`.
237
135
 
238
136
  .. versionadded:: 15.2.0 *convert*
239
137
  .. versionadded:: 16.3.0 *metadata*
240
138
  .. versionchanged:: 17.1.0 *validator* can be a ``list`` now.
241
139
  .. versionchanged:: 17.1.0
242
- *hash* is ``None`` and therefore mirrors *eq* by default.
140
+ *hash* is `None` and therefore mirrors *eq* by default.
243
141
  .. versionadded:: 17.3.0 *type*
244
142
  .. deprecated:: 17.4.0 *convert*
245
- .. versionadded:: 17.4.0 *converter* as a replacement for the deprecated
246
- *convert* to achieve consistency with other noun-based arguments.
143
+ .. versionadded:: 17.4.0
144
+ *converter* as a replacement for the deprecated *convert* to achieve
145
+ consistency with other noun-based arguments.
247
146
  .. versionadded:: 18.1.0
248
147
  ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.
249
148
  .. versionadded:: 18.2.0 *kw_only*
@@ -310,19 +209,31 @@ def attrib(
310
209
  )
311
210
 
312
211
 
313
- def _compile_and_eval(script, globs, locs=None, filename=""):
212
+ def _compile_and_eval(
213
+ script: str,
214
+ globs: dict[str, Any] | None,
215
+ locs: Mapping[str, object] | None = None,
216
+ filename: str = "",
217
+ ) -> None:
314
218
  """
315
- "Exec" the script with the given global (globs) and local (locs) variables.
219
+ Evaluate the script with the given global (globs) and local (locs)
220
+ variables.
316
221
  """
317
222
  bytecode = compile(script, filename, "exec")
318
223
  eval(bytecode, globs, locs)
319
224
 
320
225
 
321
- def _make_method(name, script, filename, globs):
226
+ def _linecache_and_compile(
227
+ script: str,
228
+ filename: str,
229
+ globs: dict[str, Any] | None,
230
+ locals: Mapping[str, object] | None = None,
231
+ ) -> dict[str, Any]:
322
232
  """
323
- Create the method with the script given and return the method object.
233
+ Cache the script with _linecache_, compile it and return the _locals_.
324
234
  """
325
- locs = {}
235
+
236
+ locs = {} if locals is None else locals
326
237
 
327
238
  # In order of debuggers like PDB being able to step through the code,
328
239
  # we add a fake linecache entry.
@@ -344,10 +255,10 @@ def _make_method(name, script, filename, globs):
344
255
 
345
256
  _compile_and_eval(script, globs, locs, filename)
346
257
 
347
- return locs[name]
258
+ return locs
348
259
 
349
260
 
350
- def _make_attr_tuple_class(cls_name, attr_names):
261
+ def _make_attr_tuple_class(cls_name: str, attr_names: list[str]) -> type:
351
262
  """
352
263
  Create a tuple subclass to hold `Attribute`s for an `attrs` class.
353
264
 
@@ -358,35 +269,22 @@ def _make_attr_tuple_class(cls_name, attr_names):
358
269
  x = property(itemgetter(0))
359
270
  """
360
271
  attr_class_name = f"{cls_name}Attributes"
361
- attr_class_template = [
362
- f"class {attr_class_name}(tuple):",
363
- " __slots__ = ()",
364
- ]
365
- if attr_names:
366
- for i, attr_name in enumerate(attr_names):
367
- attr_class_template.append(
368
- f" {attr_name} = _attrs_property(_attrs_itemgetter({i}))"
369
- )
370
- else:
371
- attr_class_template.append(" pass")
372
- globs = {"_attrs_itemgetter": itemgetter, "_attrs_property": property}
373
- _compile_and_eval("\n".join(attr_class_template), globs)
374
- return globs[attr_class_name]
272
+ body = {}
273
+ for i, attr_name in enumerate(attr_names):
274
+
275
+ def getter(self, i=i):
276
+ return self[i]
277
+
278
+ body[attr_name] = property(getter)
279
+ return type(attr_class_name, (tuple,), body)
375
280
 
376
281
 
377
282
  # Tuple class for extracted attributes from a class definition.
378
283
  # `base_attrs` is a subset of `attrs`.
379
- _Attributes = _make_attr_tuple_class(
380
- "_Attributes",
381
- [
382
- # all attributes to build dunder methods for
383
- "attrs",
384
- # attributes that have been inherited
385
- "base_attrs",
386
- # map inherited attributes to their originating classes
387
- "base_attrs_map",
388
- ],
389
- )
284
+ class _Attributes(NamedTuple):
285
+ attrs: type
286
+ base_attrs: list[Attribute]
287
+ base_attrs_map: dict[str, type]
390
288
 
391
289
 
392
290
  def _is_class_var(annot):
@@ -403,36 +301,19 @@ def _is_class_var(annot):
403
301
  if annot.startswith(("'", '"')) and annot.endswith(("'", '"')):
404
302
  annot = annot[1:-1]
405
303
 
406
- return annot.startswith(_classvar_prefixes)
304
+ return annot.startswith(_CLASSVAR_PREFIXES)
407
305
 
408
306
 
409
307
  def _has_own_attribute(cls, attrib_name):
410
308
  """
411
309
  Check whether *cls* defines *attrib_name* (and doesn't just inherit it).
412
310
  """
413
- attr = getattr(cls, attrib_name, _sentinel)
414
- if attr is _sentinel:
415
- return False
416
-
417
- for base_cls in cls.__mro__[1:]:
418
- a = getattr(base_cls, attrib_name, None)
419
- if attr is a:
420
- return False
421
-
422
- return True
423
-
424
-
425
- def _get_annotations(cls):
426
- """
427
- Get annotations for *cls*.
428
- """
429
- if _has_own_attribute(cls, "__annotations__"):
430
- return cls.__annotations__
431
-
432
- return {}
311
+ return attrib_name in cls.__dict__
433
312
 
434
313
 
435
- def _collect_base_attrs(cls, taken_attr_names):
314
+ def _collect_base_attrs(
315
+ cls, taken_attr_names
316
+ ) -> tuple[list[Attribute], dict[str, type]]:
436
317
  """
437
318
  Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.
438
319
  """
@@ -493,14 +374,14 @@ def _collect_base_attrs_broken(cls, taken_attr_names):
493
374
 
494
375
  def _transform_attrs(
495
376
  cls, these, auto_attribs, kw_only, collect_by_mro, field_transformer
496
- ):
377
+ ) -> _Attributes:
497
378
  """
498
379
  Transform all `_CountingAttr`s on a class into `Attribute`s.
499
380
 
500
381
  If *these* is passed, use that and don't look for them on the class.
501
382
 
502
- *collect_by_mro* is True, collect them in the correct MRO order, otherwise
503
- use the old -- incorrect -- order. See #428.
383
+ If *collect_by_mro* is True, collect them in the correct MRO order,
384
+ otherwise use the old -- incorrect -- order. See #428.
504
385
 
505
386
  Return an `_Attributes`.
506
387
  """
@@ -513,7 +394,7 @@ def _transform_attrs(
513
394
  ca_names = {
514
395
  name
515
396
  for name, attr in cd.items()
516
- if isinstance(attr, _CountingAttr)
397
+ if attr.__class__ is _CountingAttr
517
398
  }
518
399
  ca_list = []
519
400
  annot_names = set()
@@ -523,12 +404,12 @@ def _transform_attrs(
523
404
  annot_names.add(attr_name)
524
405
  a = cd.get(attr_name, NOTHING)
525
406
 
526
- if not isinstance(a, _CountingAttr):
527
- a = attrib() if a is NOTHING else attrib(default=a)
407
+ if a.__class__ is not _CountingAttr:
408
+ a = attrib(a)
528
409
  ca_list.append((attr_name, a))
529
410
 
530
411
  unannotated = ca_names - annot_names
531
- if len(unannotated) > 0:
412
+ if unannotated:
532
413
  raise UnannotatedAttributeError(
533
414
  "The following `attr.ib`s lack a type annotation: "
534
415
  + ", ".join(
@@ -541,16 +422,14 @@ def _transform_attrs(
541
422
  (
542
423
  (name, attr)
543
424
  for name, attr in cd.items()
544
- if isinstance(attr, _CountingAttr)
425
+ if attr.__class__ is _CountingAttr
545
426
  ),
546
427
  key=lambda e: e[1].counter,
547
428
  )
548
429
 
430
+ fca = Attribute.from_counting_attr
549
431
  own_attrs = [
550
- Attribute.from_counting_attr(
551
- name=attr_name, ca=ca, type=anns.get(attr_name)
552
- )
553
- for attr_name, ca in ca_list
432
+ fca(attr_name, ca, anns.get(attr_name)) for attr_name, ca in ca_list
554
433
  ]
555
434
 
556
435
  if collect_by_mro:
@@ -568,6 +447,10 @@ def _transform_attrs(
568
447
 
569
448
  attrs = base_attrs + own_attrs
570
449
 
450
+ if field_transformer is not None:
451
+ attrs = tuple(field_transformer(cls, attrs))
452
+
453
+ # Check attr order after executing the field_transformer.
571
454
  # Mandatory vs non-mandatory attr order only matters when they are part of
572
455
  # the __init__ signature and when they aren't kw_only (which are moved to
573
456
  # the end and can be mandatory or non-mandatory in any order, as they will
@@ -581,34 +464,27 @@ def _transform_attrs(
581
464
  if had_default is False and a.default is not NOTHING:
582
465
  had_default = True
583
466
 
584
- if field_transformer is not None:
585
- attrs = field_transformer(cls, attrs)
586
-
587
467
  # Resolve default field alias after executing field_transformer.
588
468
  # This allows field_transformer to differentiate between explicit vs
589
469
  # default aliases and supply their own defaults.
590
- attrs = [
591
- a.evolve(alias=_default_init_alias_for(a.name)) if not a.alias else a
592
- for a in attrs
593
- ]
470
+ for a in attrs:
471
+ if not a.alias:
472
+ # Evolve is very slow, so we hold our nose and do it dirty.
473
+ _OBJ_SETATTR.__get__(a)("alias", _default_init_alias_for(a.name))
594
474
 
595
475
  # Create AttrsClass *after* applying the field_transformer since it may
596
476
  # add or remove attributes!
597
477
  attr_names = [a.name for a in attrs]
598
478
  AttrsClass = _make_attr_tuple_class(cls.__name__, attr_names)
599
479
 
600
- return _Attributes((AttrsClass(attrs), base_attrs, base_attr_map))
480
+ return _Attributes(AttrsClass(attrs), base_attrs, base_attr_map)
601
481
 
602
482
 
603
- def _make_cached_property_getattr(
604
- cached_properties,
605
- original_getattr,
606
- cls,
607
- ):
483
+ def _make_cached_property_getattr(cached_properties, original_getattr, cls):
608
484
  lines = [
609
485
  # Wrapped to get `__class__` into closure cell for super()
610
486
  # (It will be replaced with the newly constructed class after construction).
611
- "def wrapper():",
487
+ "def wrapper(_cls):",
612
488
  " __class__ = _cls",
613
489
  " def __getattr__(self, item, cached_properties=cached_properties, original_getattr=original_getattr, _cached_setattr_get=_cached_setattr_get):",
614
490
  " func = cached_properties.get(item)",
@@ -625,8 +501,12 @@ def _make_cached_property_getattr(
625
501
  else:
626
502
  lines.extend(
627
503
  [
628
- " if hasattr(super(), '__getattr__'):",
629
- " return super().__getattr__(item)",
504
+ " try:",
505
+ " return super().__getattribute__(item)",
506
+ " except AttributeError:",
507
+ " if not hasattr(super(), '__getattr__'):",
508
+ " raise",
509
+ " return super().__getattr__(item)",
630
510
  " original_error = f\"'{self.__class__.__name__}' object has no attribute '{item}'\"",
631
511
  " raise AttributeError(original_error)",
632
512
  ]
@@ -635,7 +515,7 @@ def _make_cached_property_getattr(
635
515
  lines.extend(
636
516
  [
637
517
  " return __getattr__",
638
- "__getattr__ = wrapper()",
518
+ "__getattr__ = wrapper(_cls)",
639
519
  ]
640
520
  )
641
521
 
@@ -643,17 +523,13 @@ def _make_cached_property_getattr(
643
523
 
644
524
  glob = {
645
525
  "cached_properties": cached_properties,
646
- "_cached_setattr_get": _obj_setattr.__get__,
647
- "_cls": cls,
526
+ "_cached_setattr_get": _OBJ_SETATTR.__get__,
648
527
  "original_getattr": original_getattr,
649
528
  }
650
529
 
651
- return _make_method(
652
- "__getattr__",
653
- "\n".join(lines),
654
- unique_filename,
655
- glob,
656
- )
530
+ return _linecache_and_compile(
531
+ "\n".join(lines), unique_filename, glob, locals={"_cls": cls}
532
+ )["__getattr__"]
657
533
 
658
534
 
659
535
  def _frozen_setattrs(self, name, value):
@@ -664,18 +540,82 @@ def _frozen_setattrs(self, name, value):
664
540
  "__cause__",
665
541
  "__context__",
666
542
  "__traceback__",
543
+ "__suppress_context__",
544
+ "__notes__",
667
545
  ):
668
546
  BaseException.__setattr__(self, name, value)
669
547
  return
670
548
 
671
- raise FrozenInstanceError()
549
+ raise FrozenInstanceError
672
550
 
673
551
 
674
552
  def _frozen_delattrs(self, name):
675
553
  """
676
554
  Attached to frozen classes as __delattr__.
677
555
  """
678
- raise FrozenInstanceError()
556
+ if isinstance(self, BaseException) and name in ("__notes__",):
557
+ BaseException.__delattr__(self, name)
558
+ return
559
+
560
+ raise FrozenInstanceError
561
+
562
+
563
+ def evolve(*args, **changes):
564
+ """
565
+ Create a new instance, based on the first positional argument with
566
+ *changes* applied.
567
+
568
+ .. tip::
569
+
570
+ On Python 3.13 and later, you can also use `copy.replace` instead.
571
+
572
+ Args:
573
+
574
+ inst:
575
+ Instance of a class with *attrs* attributes. *inst* must be passed
576
+ as a positional argument.
577
+
578
+ changes:
579
+ Keyword changes in the new copy.
580
+
581
+ Returns:
582
+ A copy of inst with *changes* incorporated.
583
+
584
+ Raises:
585
+ TypeError:
586
+ If *attr_name* couldn't be found in the class ``__init__``.
587
+
588
+ attrs.exceptions.NotAnAttrsClassError:
589
+ If *cls* is not an *attrs* class.
590
+
591
+ .. versionadded:: 17.1.0
592
+ .. deprecated:: 23.1.0
593
+ It is now deprecated to pass the instance using the keyword argument
594
+ *inst*. It will raise a warning until at least April 2024, after which
595
+ it will become an error. Always pass the instance as a positional
596
+ argument.
597
+ .. versionchanged:: 24.1.0
598
+ *inst* can't be passed as a keyword argument anymore.
599
+ """
600
+ try:
601
+ (inst,) = args
602
+ except ValueError:
603
+ msg = (
604
+ f"evolve() takes 1 positional argument, but {len(args)} were given"
605
+ )
606
+ raise TypeError(msg) from None
607
+
608
+ cls = inst.__class__
609
+ attrs = fields(cls)
610
+ for a in attrs:
611
+ if not a.init:
612
+ continue
613
+ attr_name = a.name # To deal with private attributes.
614
+ init_name = a.alias
615
+ if init_name not in changes:
616
+ changes[init_name] = getattr(inst, attr_name)
617
+
618
+ return cls(**changes)
679
619
 
680
620
 
681
621
  class _ClassBuilder:
@@ -684,6 +624,7 @@ class _ClassBuilder:
684
624
  """
685
625
 
686
626
  __slots__ = (
627
+ "_add_method_dunders",
687
628
  "_attr_names",
688
629
  "_attrs",
689
630
  "_base_attr_map",
@@ -693,20 +634,22 @@ class _ClassBuilder:
693
634
  "_cls_dict",
694
635
  "_delete_attribs",
695
636
  "_frozen",
696
- "_has_pre_init",
697
- "_pre_init_has_args",
637
+ "_has_custom_setattr",
698
638
  "_has_post_init",
639
+ "_has_pre_init",
699
640
  "_is_exc",
700
641
  "_on_setattr",
642
+ "_pre_init_has_args",
643
+ "_repr_added",
644
+ "_script_snippets",
701
645
  "_slots",
702
646
  "_weakref_slot",
703
647
  "_wrote_own_setattr",
704
- "_has_custom_setattr",
705
648
  )
706
649
 
707
650
  def __init__(
708
651
  self,
709
- cls,
652
+ cls: type,
710
653
  these,
711
654
  slots,
712
655
  frozen,
@@ -764,7 +707,7 @@ class _ClassBuilder:
764
707
 
765
708
  self._wrote_own_setattr = True
766
709
  elif on_setattr in (
767
- _ng_default_on_setattr,
710
+ _DEFAULT_ON_SETATTR,
768
711
  setters.validate,
769
712
  setters.convert,
770
713
  ):
@@ -779,7 +722,7 @@ class _ClassBuilder:
779
722
  break
780
723
  if (
781
724
  (
782
- on_setattr == _ng_default_on_setattr
725
+ on_setattr == _DEFAULT_ON_SETATTR
783
726
  and not (has_validator or has_converter)
784
727
  )
785
728
  or (on_setattr == setters.validate and not has_validator)
@@ -796,37 +739,65 @@ class _ClassBuilder:
796
739
  self._cls_dict["__setstate__"],
797
740
  ) = self._make_getstate_setstate()
798
741
 
742
+ # tuples of script, globs, hook
743
+ self._script_snippets: list[
744
+ tuple[str, dict, Callable[[dict, dict], Any]]
745
+ ] = []
746
+ self._repr_added = False
747
+
748
+ # We want to only do this check once; in 99.9% of cases these
749
+ # exist.
750
+ if not hasattr(self._cls, "__module__") or not hasattr(
751
+ self._cls, "__qualname__"
752
+ ):
753
+ self._add_method_dunders = self._add_method_dunders_safe
754
+ else:
755
+ self._add_method_dunders = self._add_method_dunders_unsafe
756
+
799
757
  def __repr__(self):
800
758
  return f"<_ClassBuilder(cls={self._cls.__name__})>"
801
759
 
802
- if PY310:
803
- import abc
804
-
805
- def build_class(self):
806
- """
807
- Finalize class based on the accumulated configuration.
760
+ def _eval_snippets(self) -> None:
761
+ """
762
+ Evaluate any registered snippets in one go.
763
+ """
764
+ script = "\n".join([snippet[0] for snippet in self._script_snippets])
765
+ globs = {}
766
+ for _, snippet_globs, _ in self._script_snippets:
767
+ globs.update(snippet_globs)
768
+
769
+ locs = _linecache_and_compile(
770
+ script,
771
+ _generate_unique_filename(self._cls, "methods"),
772
+ globs,
773
+ )
808
774
 
809
- Builder cannot be used after calling this method.
810
- """
811
- if self._slots is True:
812
- return self._create_slots_class()
775
+ for _, _, hook in self._script_snippets:
776
+ hook(self._cls_dict, locs)
813
777
 
814
- return self.abc.update_abstractmethods(
815
- self._patch_original_class()
816
- )
817
-
818
- else:
778
+ def build_class(self):
779
+ """
780
+ Finalize class based on the accumulated configuration.
819
781
 
820
- def build_class(self):
821
- """
822
- Finalize class based on the accumulated configuration.
782
+ Builder cannot be used after calling this method.
783
+ """
784
+ self._eval_snippets()
785
+ if self._slots is True:
786
+ cls = self._create_slots_class()
787
+ else:
788
+ cls = self._patch_original_class()
789
+ if PY_3_10_PLUS:
790
+ cls = abc.update_abstractmethods(cls)
823
791
 
824
- Builder cannot be used after calling this method.
825
- """
826
- if self._slots is True:
827
- return self._create_slots_class()
792
+ # The method gets only called if it's not inherited from a base class.
793
+ # _has_own_attribute does NOT work properly for classmethods.
794
+ if (
795
+ getattr(cls, "__attrs_init_subclass__", None)
796
+ and "__attrs_init_subclass__" not in cls.__dict__
797
+ ):
798
+ cls.__attrs_init_subclass__()
828
799
 
829
- return self._patch_original_class()
800
+ return cls
830
801
 
831
802
  def _patch_original_class(self):
832
803
  """
@@ -840,7 +811,7 @@ class _ClassBuilder:
840
811
  for name in self._attr_names:
841
812
  if (
842
813
  name not in base_names
843
- and getattr(cls, name, _sentinel) is not _sentinel
814
+ and getattr(cls, name, _SENTINEL) is not _SENTINEL
844
815
  ):
845
816
  # An AttributeError can happen if a base class defines a
846
817
  # class variable and we want to set an attribute with the
@@ -860,7 +831,7 @@ class _ClassBuilder:
860
831
  cls.__attrs_own_setattr__ = False
861
832
 
862
833
  if not self._has_custom_setattr:
863
- cls.__setattr__ = _obj_setattr
834
+ cls.__setattr__ = _OBJ_SETATTR
864
835
 
865
836
  return cls
866
837
 
@@ -888,7 +859,7 @@ class _ClassBuilder:
888
859
  if not self._has_custom_setattr:
889
860
  for base_cls in self._cls.__bases__:
890
861
  if base_cls.__dict__.get("__attrs_own_setattr__", False):
891
- cd["__setattr__"] = _obj_setattr
862
+ cd["__setattr__"] = _OBJ_SETATTR
892
863
  break
893
864
 
894
865
  # Traverse the MRO to collect existing slots
@@ -916,30 +887,23 @@ class _ClassBuilder:
916
887
  ):
917
888
  names += ("__weakref__",)
918
889
 
919
- if PY_3_8_PLUS:
920
- cached_properties = {
921
- name: cached_property.func
922
- for name, cached_property in cd.items()
923
- if isinstance(cached_property, functools.cached_property)
924
- }
925
- else:
926
- # `functools.cached_property` was introduced in 3.8.
927
- # So can't be used before this.
928
- cached_properties = {}
890
+ cached_properties = {
891
+ name: cached_prop.func
892
+ for name, cached_prop in cd.items()
893
+ if isinstance(cached_prop, cached_property)
894
+ }
929
895
 
930
896
  # Collect methods with a `__class__` reference that are shadowed in the new class.
931
897
  # To know to update them.
932
898
  additional_closure_functions_to_update = []
933
899
  if cached_properties:
934
- # Add cached properties to names for slotting.
935
- names += tuple(cached_properties.keys())
936
-
937
- for name in cached_properties:
938
- # Clear out function from class to avoid clashing.
939
- del cd[name]
940
-
941
900
  class_annotations = _get_annotations(self._cls)
942
901
  for name, func in cached_properties.items():
902
+ # Add cached properties to names for slotting.
903
+ names += (name,)
904
+ # Clear out function from class to avoid clashing.
905
+ del cd[name]
906
+ additional_closure_functions_to_update.append(func)
943
907
  annotation = inspect.signature(func).return_annotation
944
908
  if annotation is not inspect.Parameter.empty:
945
909
  class_annotations[name] = annotation
@@ -968,7 +932,7 @@ class _ClassBuilder:
968
932
  slot_names = [name for name in slot_names if name not in reused_slots]
969
933
  cd.update(reused_slots)
970
934
  if self._cache_hash:
971
- slot_names.append(_hash_cache_field)
935
+ slot_names.append(_HASH_CACHE_FIELD)
972
936
 
973
937
  cd["__slots__"] = tuple(slot_names)
974
938
 
@@ -1011,14 +975,17 @@ class _ClassBuilder:
1011
975
  return cls
1012
976
 
1013
977
  def add_repr(self, ns):
1014
- self._cls_dict["__repr__"] = self._add_method_dunders(
1015
- _make_repr(self._attrs, ns, self._cls)
1016
- )
978
+ script, globs = _make_repr_script(self._attrs, ns)
979
+
980
+ def _attach_repr(cls_dict, globs):
981
+ cls_dict["__repr__"] = self._add_method_dunders(globs["__repr__"])
982
+
983
+ self._script_snippets.append((script, globs, _attach_repr))
984
+ self._repr_added = True
1017
985
  return self
1018
986
 
1019
987
  def add_str(self):
1020
- repr = self._cls_dict.get("__repr__")
1021
- if repr is None:
988
+ if not self._repr_added:
1022
989
  msg = "__str__ can only be generated if a __repr__ exists."
1023
990
  raise ValueError(msg)
1024
991
 
@@ -1049,7 +1016,7 @@ class _ClassBuilder:
1049
1016
  """
1050
1017
  Automatically created by attrs.
1051
1018
  """
1052
- __bound_setattr = _obj_setattr.__get__(self)
1019
+ __bound_setattr = _OBJ_SETATTR.__get__(self)
1053
1020
  if isinstance(state, tuple):
1054
1021
  # Backward compatibility with attrs instances pickled with
1055
1022
  # attrs versions before v22.2.0 which stored tuples.
@@ -1065,7 +1032,7 @@ class _ClassBuilder:
1065
1032
  # indicate that the first call to __hash__ should be a cache
1066
1033
  # miss.
1067
1034
  if hash_caching_enabled:
1068
- __bound_setattr(_hash_cache_field, None)
1035
+ __bound_setattr(_HASH_CACHE_FIELD, None)
1069
1036
 
1070
1037
  return slots_getstate, slots_setstate
1071
1038
 
@@ -1074,35 +1041,49 @@ class _ClassBuilder:
1074
1041
  return self
1075
1042
 
1076
1043
  def add_hash(self):
1077
- self._cls_dict["__hash__"] = self._add_method_dunders(
1078
- _make_hash(
1079
- self._cls,
1080
- self._attrs,
1081
- frozen=self._frozen,
1082
- cache_hash=self._cache_hash,
1083
- )
1044
+ script, globs = _make_hash_script(
1045
+ self._cls,
1046
+ self._attrs,
1047
+ frozen=self._frozen,
1048
+ cache_hash=self._cache_hash,
1084
1049
  )
1085
1050
 
1051
+ def attach_hash(cls_dict: dict, locs: dict) -> None:
1052
+ cls_dict["__hash__"] = self._add_method_dunders(locs["__hash__"])
1053
+
1054
+ self._script_snippets.append((script, globs, attach_hash))
1055
+
1086
1056
  return self
1087
1057
 
1088
1058
  def add_init(self):
1089
- self._cls_dict["__init__"] = self._add_method_dunders(
1090
- _make_init(
1091
- self._cls,
1092
- self._attrs,
1093
- self._has_pre_init,
1094
- self._pre_init_has_args,
1095
- self._has_post_init,
1096
- self._frozen,
1097
- self._slots,
1098
- self._cache_hash,
1099
- self._base_attr_map,
1100
- self._is_exc,
1101
- self._on_setattr,
1102
- attrs_init=False,
1103
- )
1059
+ script, globs, annotations = _make_init_script(
1060
+ self._cls,
1061
+ self._attrs,
1062
+ self._has_pre_init,
1063
+ self._pre_init_has_args,
1064
+ self._has_post_init,
1065
+ self._frozen,
1066
+ self._slots,
1067
+ self._cache_hash,
1068
+ self._base_attr_map,
1069
+ self._is_exc,
1070
+ self._on_setattr,
1071
+ attrs_init=False,
1104
1072
  )
1105
1073
 
1074
+ def _attach_init(cls_dict, globs):
1075
+ init = globs["__init__"]
1076
+ init.__annotations__ = annotations
1077
+ cls_dict["__init__"] = self._add_method_dunders(init)
1078
+
1079
+ self._script_snippets.append((script, globs, _attach_init))
1080
+
1081
+ return self
1082
+
1083
+ def add_replace(self):
1084
+ self._cls_dict["__replace__"] = self._add_method_dunders(
1085
+ lambda self, **changes: evolve(self, **changes)
1086
+ )
1106
1087
  return self
1107
1088
 
1108
1089
  def add_match_args(self):
@@ -1113,32 +1094,41 @@ class _ClassBuilder:
1113
1094
  )
1114
1095
 
1115
1096
  def add_attrs_init(self):
1116
- self._cls_dict["__attrs_init__"] = self._add_method_dunders(
1117
- _make_init(
1118
- self._cls,
1119
- self._attrs,
1120
- self._has_pre_init,
1121
- self._pre_init_has_args,
1122
- self._has_post_init,
1123
- self._frozen,
1124
- self._slots,
1125
- self._cache_hash,
1126
- self._base_attr_map,
1127
- self._is_exc,
1128
- self._on_setattr,
1129
- attrs_init=True,
1130
- )
1097
+ script, globs, annotations = _make_init_script(
1098
+ self._cls,
1099
+ self._attrs,
1100
+ self._has_pre_init,
1101
+ self._pre_init_has_args,
1102
+ self._has_post_init,
1103
+ self._frozen,
1104
+ self._slots,
1105
+ self._cache_hash,
1106
+ self._base_attr_map,
1107
+ self._is_exc,
1108
+ self._on_setattr,
1109
+ attrs_init=True,
1131
1110
  )
1132
1111
 
1112
+ def _attach_attrs_init(cls_dict, globs):
1113
+ init = globs["__attrs_init__"]
1114
+ init.__annotations__ = annotations
1115
+ cls_dict["__attrs_init__"] = self._add_method_dunders(init)
1116
+
1117
+ self._script_snippets.append((script, globs, _attach_attrs_init))
1118
+
1133
1119
  return self
1134
1120
 
1135
1121
  def add_eq(self):
1136
1122
  cd = self._cls_dict
1137
1123
 
1138
- cd["__eq__"] = self._add_method_dunders(
1139
- _make_eq(self._cls, self._attrs)
1140
- )
1141
- cd["__ne__"] = self._add_method_dunders(_make_ne())
1124
+ script, globs = _make_eq_script(self._attrs)
1125
+
1126
+ def _attach_eq(cls_dict, globs):
1127
+ cls_dict["__eq__"] = self._add_method_dunders(globs["__eq__"])
1128
+
1129
+ self._script_snippets.append((script, globs, _attach_eq))
1130
+
1131
+ cd["__ne__"] = __ne__
1142
1132
 
1143
1133
  return self
1144
1134
 
@@ -1153,9 +1143,6 @@ class _ClassBuilder:
1153
1143
  return self
1154
1144
 
1155
1145
  def add_setattr(self):
1156
- if self._frozen:
1157
- return self
1158
-
1159
1146
  sa_attrs = {}
1160
1147
  for a in self._attrs:
1161
1148
  on_setattr = a.on_setattr or self._on_setattr
@@ -1179,7 +1166,7 @@ class _ClassBuilder:
1179
1166
  else:
1180
1167
  nval = hook(self, a, val)
1181
1168
 
1182
- _obj_setattr(self, name, nval)
1169
+ _OBJ_SETATTR(self, name, nval)
1183
1170
 
1184
1171
  self._cls_dict["__attrs_own_setattr__"] = True
1185
1172
  self._cls_dict["__setattr__"] = self._add_method_dunders(__setattr__)
@@ -1187,7 +1174,21 @@ class _ClassBuilder:
1187
1174
 
1188
1175
  return self
1189
1176
 
1190
- def _add_method_dunders(self, method):
1177
+ def _add_method_dunders_unsafe(self, method: Callable) -> Callable:
1178
+ """
1179
+ Add __module__ and __qualname__ to a *method*.
1180
+ """
1181
+ method.__module__ = self._cls.__module__
1182
+
1183
+ method.__qualname__ = f"{self._cls.__qualname__}.{method.__name__}"
1184
+
1185
+ method.__doc__ = (
1186
+ f"Method generated by attrs for class {self._cls.__qualname__}."
1187
+ )
1188
+
1189
+ return method
1190
+
1191
+ def _add_method_dunders_safe(self, method: Callable) -> Callable:
1191
1192
  """
1192
1193
  Add __module__ and __qualname__ to a *method* if possible.
1193
1194
  """
@@ -1198,10 +1199,7 @@ class _ClassBuilder:
1198
1199
  method.__qualname__ = f"{self._cls.__qualname__}.{method.__name__}"
1199
1200
 
1200
1201
  with contextlib.suppress(AttributeError):
1201
- method.__doc__ = (
1202
- "Method generated by attrs for class "
1203
- f"{self._cls.__qualname__}."
1204
- )
1202
+ method.__doc__ = f"Method generated by attrs for class {self._cls.__qualname__}."
1205
1203
 
1206
1204
  return method
1207
1205
 
@@ -1333,238 +1331,28 @@ def attrs(
1333
1331
  A class decorator that adds :term:`dunder methods` according to the
1334
1332
  specified attributes using `attr.ib` or the *these* argument.
1335
1333
 
1336
- Please consider using `attrs.define` / `attrs.frozen` in new code
1337
- (``attr.s`` will *never* go away, though).
1338
-
1339
- :param these: A dictionary of name to `attr.ib` mappings. This is useful
1340
- to avoid the definition of your attributes within the class body
1341
- because you can't (e.g. if you want to add ``__repr__`` methods to
1342
- Django models) or don't want to.
1343
-
1344
- If *these* is not ``None``, *attrs* will *not* search the class body
1345
- for attributes and will *not* remove any attributes from it.
1346
-
1347
- The order is deduced from the order of the attributes inside *these*.
1348
-
1349
- :type these: `dict` of `str` to `attr.ib`
1350
-
1351
- :param str repr_ns: When using nested classes, there's no way in Python 2
1352
- to automatically detect that. Therefore it's possible to set the
1353
- namespace explicitly for a more meaningful ``repr`` output.
1354
- :param bool auto_detect: Instead of setting the *init*, *repr*, *eq*,
1355
- *order*, and *hash* arguments explicitly, assume they are set to
1356
- ``True`` **unless any** of the involved methods for one of the
1357
- arguments is implemented in the *current* class (i.e. it is *not*
1358
- inherited from some base class).
1359
-
1360
- So for example by implementing ``__eq__`` on a class yourself, *attrs*
1361
- will deduce ``eq=False`` and will create *neither* ``__eq__`` *nor*
1362
- ``__ne__`` (but Python classes come with a sensible ``__ne__`` by
1363
- default, so it *should* be enough to only implement ``__eq__`` in most
1364
- cases).
1365
-
1366
- .. warning::
1367
-
1368
- If you prevent *attrs* from creating the ordering methods for you
1369
- (``order=False``, e.g. by implementing ``__le__``), it becomes
1370
- *your* responsibility to make sure its ordering is sound. The best
1371
- way is to use the `functools.total_ordering` decorator.
1372
-
1373
-
1374
- Passing ``True`` or ``False`` to *init*, *repr*, *eq*, *order*, *cmp*,
1375
- or *hash* overrides whatever *auto_detect* would determine.
1376
-
1377
- :param bool repr: Create a ``__repr__`` method with a human readable
1378
- representation of *attrs* attributes..
1379
- :param bool str: Create a ``__str__`` method that is identical to
1380
- ``__repr__``. This is usually not necessary except for `Exception`\ s.
1381
- :param bool | None eq: If ``True`` or ``None`` (default), add ``__eq__``
1382
- and ``__ne__`` methods that check two instances for equality.
1383
-
1384
- They compare the instances as if they were tuples of their *attrs*
1385
- attributes if and only if the types of both classes are *identical*!
1386
-
1387
- .. seealso:: `comparison`
1388
- :param bool | None order: If ``True``, add ``__lt__``, ``__le__``,
1389
- ``__gt__``, and ``__ge__`` methods that behave like *eq* above and
1390
- allow instances to be ordered. If ``None`` (default) mirror value of
1391
- *eq*.
1392
-
1393
- .. seealso:: `comparison`
1394
- :param bool | None cmp: Setting *cmp* is equivalent to setting *eq* and
1395
- *order* to the same value. Must not be mixed with *eq* or *order*.
1396
-
1397
- .. seealso:: `comparison`
1398
- :param bool | None unsafe_hash: If ``None`` (default), the ``__hash__``
1399
- method is generated according how *eq* and *frozen* are set.
1400
-
1401
- 1. If *both* are True, *attrs* will generate a ``__hash__`` for you.
1402
- 2. If *eq* is True and *frozen* is False, ``__hash__`` will be set to
1403
- None, marking it unhashable (which it is).
1404
- 3. If *eq* is False, ``__hash__`` will be left untouched meaning the
1405
- ``__hash__`` method of the base class will be used (if base class is
1406
- ``object``, this means it will fall back to id-based hashing.).
1407
-
1408
- Although not recommended, you can decide for yourself and force *attrs*
1409
- to create one (e.g. if the class is immutable even though you didn't
1410
- freeze it programmatically) by passing ``True`` or not. Both of these
1411
- cases are rather special and should be used carefully.
1412
-
1413
- .. seealso::
1414
-
1415
- - Our documentation on `hashing`,
1416
- - Python's documentation on `object.__hash__`,
1417
- - and the `GitHub issue that led to the default \
1418
- behavior <https://github.com/python-attrs/attrs/issues/136>`_ for
1419
- more details.
1420
-
1421
- :param bool | None hash: Alias for *unsafe_hash*. *unsafe_hash* takes
1422
- precedence.
1423
- :param bool init: Create a ``__init__`` method that initializes the *attrs*
1424
- attributes. Leading underscores are stripped for the argument name. If
1425
- a ``__attrs_pre_init__`` method exists on the class, it will be called
1426
- before the class is initialized. If a ``__attrs_post_init__`` method
1427
- exists on the class, it will be called after the class is fully
1428
- initialized.
1429
-
1430
- If ``init`` is ``False``, an ``__attrs_init__`` method will be injected
1431
- instead. This allows you to define a custom ``__init__`` method that
1432
- can do pre-init work such as ``super().__init__()``, and then call
1433
- ``__attrs_init__()`` and ``__attrs_post_init__()``.
1434
-
1435
- .. seealso:: `init`
1436
- :param bool slots: Create a :term:`slotted class <slotted classes>` that's
1437
- more memory-efficient. Slotted classes are generally superior to the
1438
- default dict classes, but have some gotchas you should know about, so
1439
- we encourage you to read the :term:`glossary entry <slotted classes>`.
1440
- :param bool frozen: Make instances immutable after initialization. If
1441
- someone attempts to modify a frozen instance,
1442
- `attrs.exceptions.FrozenInstanceError` is raised.
1443
-
1444
- .. note::
1445
-
1446
- 1. This is achieved by installing a custom ``__setattr__`` method
1447
- on your class, so you can't implement your own.
1448
-
1449
- 2. True immutability is impossible in Python.
1450
-
1451
- 3. This *does* have a minor a runtime performance `impact
1452
- <how-frozen>` when initializing new instances. In other words:
1453
- ``__init__`` is slightly slower with ``frozen=True``.
1454
-
1455
- 4. If a class is frozen, you cannot modify ``self`` in
1456
- ``__attrs_post_init__`` or a self-written ``__init__``. You can
1457
- circumvent that limitation by using ``object.__setattr__(self,
1458
- "attribute_name", value)``.
1459
-
1460
- 5. Subclasses of a frozen class are frozen too.
1461
-
1462
- :param bool weakref_slot: Make instances weak-referenceable. This has no
1463
- effect unless ``slots`` is also enabled.
1464
- :param bool auto_attribs: If ``True``, collect :pep:`526`-annotated
1465
- attributes from the class body.
1466
-
1467
- In this case, you **must** annotate every field. If *attrs* encounters
1468
- a field that is set to an `attr.ib` but lacks a type annotation, an
1469
- `attr.exceptions.UnannotatedAttributeError` is raised. Use
1470
- ``field_name: typing.Any = attr.ib(...)`` if you don't want to set a
1471
- type.
1472
-
1473
- If you assign a value to those attributes (e.g. ``x: int = 42``), that
1474
- value becomes the default value like if it were passed using
1475
- ``attr.ib(default=42)``. Passing an instance of `attrs.Factory` also
1476
- works as expected in most cases (see warning below).
1477
-
1478
- Attributes annotated as `typing.ClassVar`, and attributes that are
1479
- neither annotated nor set to an `attr.ib` are **ignored**.
1480
-
1481
- .. warning::
1482
- For features that use the attribute name to create decorators (e.g.
1483
- :ref:`validators <validators>`), you still *must* assign `attr.ib`
1484
- to them. Otherwise Python will either not find the name or try to
1485
- use the default value to call e.g. ``validator`` on it.
1486
-
1487
- These errors can be quite confusing and probably the most common bug
1488
- report on our bug tracker.
1489
-
1490
- :param bool kw_only: Make all attributes keyword-only in the generated
1491
- ``__init__`` (if ``init`` is ``False``, this parameter is ignored).
1492
- :param bool cache_hash: Ensure that the object's hash code is computed only
1493
- once and stored on the object. If this is set to ``True``, hashing
1494
- must be either explicitly or implicitly enabled for this class. If the
1495
- hash code is cached, avoid any reassignments of fields involved in hash
1496
- code computation or mutations of the objects those fields point to
1497
- after object creation. If such changes occur, the behavior of the
1498
- object's hash code is undefined.
1499
- :param bool auto_exc: If the class subclasses `BaseException` (which
1500
- implicitly includes any subclass of any exception), the following
1501
- happens to behave like a well-behaved Python exceptions class:
1502
-
1503
- - the values for *eq*, *order*, and *hash* are ignored and the
1504
- instances compare and hash by the instance's ids (N.B. *attrs* will
1505
- *not* remove existing implementations of ``__hash__`` or the equality
1506
- methods. It just won't add own ones.),
1507
- - all attributes that are either passed into ``__init__`` or have a
1508
- default value are additionally available as a tuple in the ``args``
1509
- attribute,
1510
- - the value of *str* is ignored leaving ``__str__`` to base classes.
1511
- :param bool collect_by_mro: Setting this to `True` fixes the way *attrs*
1512
- collects attributes from base classes. The default behavior is
1513
- incorrect in certain cases of multiple inheritance. It should be on by
1514
- default but is kept off for backward-compatibility.
1515
-
1516
- .. seealso::
1517
- Issue `#428 <https://github.com/python-attrs/attrs/issues/428>`_
1518
-
1519
- :param bool | None getstate_setstate:
1520
- .. note::
1521
- This is usually only interesting for slotted classes and you should
1522
- probably just set *auto_detect* to `True`.
1523
-
1524
- If `True`, ``__getstate__`` and ``__setstate__`` are generated and
1525
- attached to the class. This is necessary for slotted classes to be
1526
- pickleable. If left `None`, it's `True` by default for slotted classes
1527
- and ``False`` for dict classes.
1528
-
1529
- If *auto_detect* is `True`, and *getstate_setstate* is left `None`, and
1530
- **either** ``__getstate__`` or ``__setstate__`` is detected directly on
1531
- the class (i.e. not inherited), it is set to `False` (this is usually
1532
- what you want).
1533
-
1534
- :param on_setattr: A callable that is run whenever the user attempts to set
1535
- an attribute (either by assignment like ``i.x = 42`` or by using
1536
- `setattr` like ``setattr(i, "x", 42)``). It receives the same arguments
1537
- as validators: the instance, the attribute that is being modified, and
1538
- the new value.
1539
-
1540
- If no exception is raised, the attribute is set to the return value of
1541
- the callable.
1542
-
1543
- If a list of callables is passed, they're automatically wrapped in an
1544
- `attrs.setters.pipe`.
1545
- :type on_setattr: `callable`, or a list of callables, or `None`, or
1546
- `attrs.setters.NO_OP`
1547
-
1548
- :param callable | None field_transformer:
1549
- A function that is called with the original class object and all fields
1550
- right before *attrs* finalizes the class. You can use this, e.g., to
1551
- automatically add converters or validators to fields based on their
1552
- types.
1553
-
1554
- .. seealso:: `transform-fields`
1555
-
1556
- :param bool match_args:
1557
- If `True` (default), set ``__match_args__`` on the class to support
1558
- :pep:`634` (Structural Pattern Matching). It is a tuple of all
1559
- non-keyword-only ``__init__`` parameter names on Python 3.10 and later.
1560
- Ignored on older Python versions.
1334
+ Consider using `attrs.define` / `attrs.frozen` in new code (``attr.s`` will
1335
+ *never* go away, though).
1336
+
1337
+ Args:
1338
+ repr_ns (str):
1339
+ When using nested classes, there was no way in Python 2 to
1340
+ automatically detect that. This argument allows to set a custom
1341
+ name for a more meaningful ``repr`` output. This argument is
1342
+ pointless in Python 3 and is therefore deprecated.
1343
+
1344
+ .. caution::
1345
+ Refer to `attrs.define` for the rest of the parameters, but note that they
1346
+ can have different defaults.
1347
+
1348
+ Notably, leaving *on_setattr* as `None` will **not** add any hooks.
1561
1349
 
1562
1350
  .. versionadded:: 16.0.0 *slots*
1563
1351
  .. versionadded:: 16.1.0 *frozen*
1564
1352
  .. versionadded:: 16.3.0 *str*
1565
1353
  .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
1566
1354
  .. versionchanged:: 17.1.0
1567
- *hash* supports ``None`` as value which is also the default now.
1355
+ *hash* supports `None` as value which is also the default now.
1568
1356
  .. versionadded:: 17.3.0 *auto_attribs*
1569
1357
  .. versionchanged:: 18.1.0
1570
1358
  If *these* is passed, no attributes are deleted from the class body.
@@ -1595,10 +1383,29 @@ def attrs(
1595
1383
  .. versionadded:: 21.3.0 *match_args*
1596
1384
  .. versionadded:: 22.2.0
1597
1385
  *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
1598
- """
1386
+ .. deprecated:: 24.1.0 *repr_ns*
1387
+ .. versionchanged:: 24.1.0
1388
+ Instances are not compared as tuples of attributes anymore, but using a
1389
+ big ``and`` condition. This is faster and has more correct behavior for
1390
+ uncomparable values like `math.nan`.
1391
+ .. versionadded:: 24.1.0
1392
+ If a class has an *inherited* classmethod called
1393
+ ``__attrs_init_subclass__``, it is executed after the class is created.
1394
+ .. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*.
1395
+ """
1396
+ if repr_ns is not None:
1397
+ import warnings
1398
+
1399
+ warnings.warn(
1400
+ DeprecationWarning(
1401
+ "The `repr_ns` argument is deprecated and will be removed in or after August 2025."
1402
+ ),
1403
+ stacklevel=2,
1404
+ )
1405
+
1599
1406
  eq_, order_ = _determine_attrs_eq_order(cmp, eq, order, None)
1600
1407
 
1601
- # unsafe_hash takes precedence due to PEP 681.
1408
+ # unsafe_hash takes precedence due to PEP 681.
1602
1409
  if unsafe_hash is not None:
1603
1410
  hash = unsafe_hash
1604
1411
 
@@ -1638,10 +1445,12 @@ def attrs(
1638
1445
  has_own_setattr,
1639
1446
  field_transformer,
1640
1447
  )
1448
+
1641
1449
  if _determine_whether_to_implement(
1642
1450
  cls, repr, auto_detect, ("__repr__",)
1643
1451
  ):
1644
1452
  builder.add_repr(repr_ns)
1453
+
1645
1454
  if str is True:
1646
1455
  builder.add_str()
1647
1456
 
@@ -1655,7 +1464,8 @@ def attrs(
1655
1464
  ):
1656
1465
  builder.add_order()
1657
1466
 
1658
- builder.add_setattr()
1467
+ if not frozen:
1468
+ builder.add_setattr()
1659
1469
 
1660
1470
  nonlocal hash
1661
1471
  if (
@@ -1698,8 +1508,11 @@ def attrs(
1698
1508
  msg = "Invalid value for cache_hash. To use hash caching, init must be True."
1699
1509
  raise TypeError(msg)
1700
1510
 
1511
+ if PY_3_13_PLUS and not _has_own_attribute(cls, "__replace__"):
1512
+ builder.add_replace()
1513
+
1701
1514
  if (
1702
- PY310
1515
+ PY_3_10_PLUS
1703
1516
  and match_args
1704
1517
  and not _has_own_attribute(cls, "__match_args__")
1705
1518
  ):
@@ -1708,7 +1521,7 @@ def attrs(
1708
1521
  return builder.build_class()
1709
1522
 
1710
1523
  # maybe_cls's type depends on the usage of the decorator. It's a class
1711
- # if it's used as `@attrs` but ``None`` if used as `@attrs()`.
1524
+ # if it's used as `@attrs` but `None` if used as `@attrs()`.
1712
1525
  if maybe_cls is None:
1713
1526
  return wrap
1714
1527
 
@@ -1730,7 +1543,7 @@ def _has_frozen_base_class(cls):
1730
1543
  return cls.__setattr__ is _frozen_setattrs
1731
1544
 
1732
1545
 
1733
- def _generate_unique_filename(cls, func_name):
1546
+ def _generate_unique_filename(cls: type, func_name: str) -> str:
1734
1547
  """
1735
1548
  Create a "filename" suitable for a function being generated.
1736
1549
  """
@@ -1740,15 +1553,16 @@ def _generate_unique_filename(cls, func_name):
1740
1553
  )
1741
1554
 
1742
1555
 
1743
- def _make_hash(cls, attrs, frozen, cache_hash):
1556
+ def _make_hash_script(
1557
+ cls: type, attrs: list[Attribute], frozen: bool, cache_hash: bool
1558
+ ) -> tuple[str, dict]:
1744
1559
  attrs = tuple(
1745
1560
  a for a in attrs if a.hash is True or (a.hash is None and a.eq is True)
1746
1561
  )
1747
1562
 
1748
1563
  tab = " "
1749
1564
 
1750
- unique_filename = _generate_unique_filename(cls, "hash")
1751
- type_hash = hash(unique_filename)
1565
+ type_hash = hash(_generate_unique_filename(cls, "hash"))
1752
1566
  # If eq is custom generated, we need to include the functions in globs
1753
1567
  globs = {}
1754
1568
 
@@ -1793,89 +1607,85 @@ def _make_hash(cls, attrs, frozen, cache_hash):
1793
1607
  method_lines.append(indent + " " + closing_braces)
1794
1608
 
1795
1609
  if cache_hash:
1796
- method_lines.append(tab + f"if self.{_hash_cache_field} is None:")
1610
+ method_lines.append(tab + f"if self.{_HASH_CACHE_FIELD} is None:")
1797
1611
  if frozen:
1798
1612
  append_hash_computation_lines(
1799
- f"object.__setattr__(self, '{_hash_cache_field}', ", tab * 2
1613
+ f"object.__setattr__(self, '{_HASH_CACHE_FIELD}', ", tab * 2
1800
1614
  )
1801
1615
  method_lines.append(tab * 2 + ")") # close __setattr__
1802
1616
  else:
1803
1617
  append_hash_computation_lines(
1804
- f"self.{_hash_cache_field} = ", tab * 2
1618
+ f"self.{_HASH_CACHE_FIELD} = ", tab * 2
1805
1619
  )
1806
- method_lines.append(tab + f"return self.{_hash_cache_field}")
1620
+ method_lines.append(tab + f"return self.{_HASH_CACHE_FIELD}")
1807
1621
  else:
1808
1622
  append_hash_computation_lines("return ", tab)
1809
1623
 
1810
1624
  script = "\n".join(method_lines)
1811
- return _make_method("__hash__", script, unique_filename, globs)
1625
+ return script, globs
1812
1626
 
1813
1627
 
1814
- def _add_hash(cls, attrs):
1628
+ def _add_hash(cls: type, attrs: list[Attribute]):
1815
1629
  """
1816
1630
  Add a hash method to *cls*.
1817
1631
  """
1818
- cls.__hash__ = _make_hash(cls, attrs, frozen=False, cache_hash=False)
1632
+ script, globs = _make_hash_script(
1633
+ cls, attrs, frozen=False, cache_hash=False
1634
+ )
1635
+ _compile_and_eval(
1636
+ script, globs, filename=_generate_unique_filename(cls, "__hash__")
1637
+ )
1638
+ cls.__hash__ = globs["__hash__"]
1819
1639
  return cls
1820
1640
 
1821
1641
 
1822
- def _make_ne():
1642
+ def __ne__(self, other):
1823
1643
  """
1824
- Create __ne__ method.
1644
+ Check equality and either forward a NotImplemented or
1645
+ return the result negated.
1825
1646
  """
1647
+ result = self.__eq__(other)
1648
+ if result is NotImplemented:
1649
+ return NotImplemented
1826
1650
 
1827
- def __ne__(self, other):
1828
- """
1829
- Check equality and either forward a NotImplemented or
1830
- return the result negated.
1831
- """
1832
- result = self.__eq__(other)
1833
- if result is NotImplemented:
1834
- return NotImplemented
1835
-
1836
- return not result
1837
-
1838
- return __ne__
1651
+ return not result
1839
1652
 
1840
1653
 
1841
- def _make_eq(cls, attrs):
1654
+ def _make_eq_script(attrs: list) -> tuple[str, dict]:
1842
1655
  """
1843
1656
  Create __eq__ method for *cls* with *attrs*.
1844
1657
  """
1845
1658
  attrs = [a for a in attrs if a.eq]
1846
1659
 
1847
- unique_filename = _generate_unique_filename(cls, "eq")
1848
1660
  lines = [
1849
1661
  "def __eq__(self, other):",
1850
1662
  " if other.__class__ is not self.__class__:",
1851
1663
  " return NotImplemented",
1852
1664
  ]
1853
1665
 
1854
- # We can't just do a big self.x = other.x and... clause due to
1855
- # irregularities like nan == nan is false but (nan,) == (nan,) is true.
1856
1666
  globs = {}
1857
1667
  if attrs:
1858
1668
  lines.append(" return (")
1859
- others = [" ) == ("]
1860
1669
  for a in attrs:
1861
1670
  if a.eq_key:
1862
1671
  cmp_name = f"_{a.name}_key"
1863
1672
  # Add the key function to the global namespace
1864
1673
  # of the evaluated function.
1865
1674
  globs[cmp_name] = a.eq_key
1866
- lines.append(f" {cmp_name}(self.{a.name}),")
1867
- others.append(f" {cmp_name}(other.{a.name}),")
1675
+ lines.append(
1676
+ f" {cmp_name}(self.{a.name}) == {cmp_name}(other.{a.name})"
1677
+ )
1868
1678
  else:
1869
- lines.append(f" self.{a.name},")
1870
- others.append(f" other.{a.name},")
1871
-
1872
- lines += [*others, " )"]
1679
+ lines.append(f" self.{a.name} == other.{a.name}")
1680
+ if a is not attrs[-1]:
1681
+ lines[-1] = f"{lines[-1]} and"
1682
+ lines.append(" )")
1873
1683
  else:
1874
1684
  lines.append(" return True")
1875
1685
 
1876
1686
  script = "\n".join(lines)
1877
1687
 
1878
- return _make_method("__eq__", script, unique_filename, globs)
1688
+ return script, globs
1879
1689
 
1880
1690
 
1881
1691
  def _make_order(cls, attrs):
@@ -1941,14 +1751,20 @@ def _add_eq(cls, attrs=None):
1941
1751
  if attrs is None:
1942
1752
  attrs = cls.__attrs_attrs__
1943
1753
 
1944
- cls.__eq__ = _make_eq(cls, attrs)
1945
- cls.__ne__ = _make_ne()
1754
+ script, globs = _make_eq_script(attrs)
1755
+ _compile_and_eval(
1756
+ script, globs, filename=_generate_unique_filename(cls, "__eq__")
1757
+ )
1758
+ cls.__eq__ = globs["__eq__"]
1759
+ cls.__ne__ = __ne__
1946
1760
 
1947
1761
  return cls
1948
1762
 
1949
1763
 
1950
- def _make_repr(attrs, ns, cls):
1951
- unique_filename = _generate_unique_filename(cls, "repr")
1764
+ def _make_repr_script(attrs, ns) -> tuple[str, dict]:
1765
+ """
1766
+ Create the source and globs for a __repr__ and return it.
1767
+ """
1952
1768
  # Figure out which attributes to include, and which function to use to
1953
1769
  # format them. The a.repr value can be either bool or a custom
1954
1770
  # callable.
@@ -1999,9 +1815,7 @@ def _make_repr(attrs, ns, cls):
1999
1815
  " already_repring.remove(id(self))",
2000
1816
  ]
2001
1817
 
2002
- return _make_method(
2003
- "__repr__", "\n".join(lines), unique_filename, globs=globs
2004
- )
1818
+ return "\n".join(lines), globs
2005
1819
 
2006
1820
 
2007
1821
  def _add_repr(cls, ns=None, attrs=None):
@@ -2011,7 +1825,11 @@ def _add_repr(cls, ns=None, attrs=None):
2011
1825
  if attrs is None:
2012
1826
  attrs = cls.__attrs_attrs__
2013
1827
 
2014
- cls.__repr__ = _make_repr(attrs, ns, cls)
1828
+ script, globs = _make_repr_script(attrs, ns)
1829
+ _compile_and_eval(
1830
+ script, globs, filename=_generate_unique_filename(cls, "__repr__")
1831
+ )
1832
+ cls.__repr__ = globs["__repr__"]
2015
1833
  return cls
2016
1834
 
2017
1835
 
@@ -2022,13 +1840,17 @@ def fields(cls):
2022
1840
  The tuple also allows accessing the fields by their names (see below for
2023
1841
  examples).
2024
1842
 
2025
- :param type cls: Class to introspect.
1843
+ Args:
1844
+ cls (type): Class to introspect.
2026
1845
 
2027
- :raise TypeError: If *cls* is not a class.
2028
- :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
2029
- class.
1846
+ Raises:
1847
+ TypeError: If *cls* is not a class.
2030
1848
 
2031
- :rtype: tuple (with name accessors) of `attrs.Attribute`
1849
+ attrs.exceptions.NotAnAttrsClassError:
1850
+ If *cls* is not an *attrs* class.
1851
+
1852
+ Returns:
1853
+ tuple (with name accessors) of `attrs.Attribute`
2032
1854
 
2033
1855
  .. versionchanged:: 16.2.0 Returned tuple allows accessing the fields
2034
1856
  by name.
@@ -2059,16 +1881,20 @@ def fields(cls):
2059
1881
 
2060
1882
  def fields_dict(cls):
2061
1883
  """
2062
- Return an ordered dictionary of *attrs* attributes for a class, whose
2063
- keys are the attribute names.
1884
+ Return an ordered dictionary of *attrs* attributes for a class, whose keys
1885
+ are the attribute names.
1886
+
1887
+ Args:
1888
+ cls (type): Class to introspect.
2064
1889
 
2065
- :param type cls: Class to introspect.
1890
+ Raises:
1891
+ TypeError: If *cls* is not a class.
2066
1892
 
2067
- :raise TypeError: If *cls* is not a class.
2068
- :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
2069
- class.
1893
+ attrs.exceptions.NotAnAttrsClassError:
1894
+ If *cls* is not an *attrs* class.
2070
1895
 
2071
- :rtype: dict
1896
+ Returns:
1897
+ dict[str, attrs.Attribute]: Dict of attribute name to definition
2072
1898
 
2073
1899
  .. versionadded:: 18.1.0
2074
1900
  """
@@ -2088,7 +1914,8 @@ def validate(inst):
2088
1914
 
2089
1915
  Leaves all exceptions through.
2090
1916
 
2091
- :param inst: Instance of a class with *attrs* attributes.
1917
+ Args:
1918
+ inst: Instance of a class with *attrs* attributes.
2092
1919
  """
2093
1920
  if _config._run_validators is False:
2094
1921
  return
@@ -2099,18 +1926,15 @@ def validate(inst):
2099
1926
  v(inst, a, getattr(inst, a.name))
2100
1927
 
2101
1928
 
2102
- def _is_slot_cls(cls):
2103
- return "__slots__" in cls.__dict__
2104
-
2105
-
2106
1929
  def _is_slot_attr(a_name, base_attr_map):
2107
1930
  """
2108
1931
  Check if the attribute name comes from a slot class.
2109
1932
  """
2110
- return a_name in base_attr_map and _is_slot_cls(base_attr_map[a_name])
1933
+ cls = base_attr_map.get(a_name)
1934
+ return cls and "__slots__" in cls.__dict__
2111
1935
 
2112
1936
 
2113
- def _make_init(
1937
+ def _make_init_script(
2114
1938
  cls,
2115
1939
  attrs,
2116
1940
  pre_init,
@@ -2123,7 +1947,7 @@ def _make_init(
2123
1947
  is_exc,
2124
1948
  cls_on_setattr,
2125
1949
  attrs_init,
2126
- ):
1950
+ ) -> tuple[str, dict, dict]:
2127
1951
  has_cls_on_setattr = (
2128
1952
  cls_on_setattr is not None and cls_on_setattr is not setters.NO_OP
2129
1953
  )
@@ -2151,8 +1975,6 @@ def _make_init(
2151
1975
  elif has_cls_on_setattr and a.on_setattr is not setters.NO_OP:
2152
1976
  needs_cached_setattr = True
2153
1977
 
2154
- unique_filename = _generate_unique_filename(cls, "init")
2155
-
2156
1978
  script, globs, annotations = _attrs_to_init_script(
2157
1979
  filtered_attrs,
2158
1980
  frozen,
@@ -2165,7 +1987,7 @@ def _make_init(
2165
1987
  is_exc,
2166
1988
  needs_cached_setattr,
2167
1989
  has_cls_on_setattr,
2168
- attrs_init,
1990
+ "__attrs_init__" if attrs_init else "__init__",
2169
1991
  )
2170
1992
  if cls.__module__ in sys.modules:
2171
1993
  # This makes typing.get_type_hints(CLS.__init__) resolve string types.
@@ -2176,39 +1998,29 @@ def _make_init(
2176
1998
  if needs_cached_setattr:
2177
1999
  # Save the lookup overhead in __init__ if we need to circumvent
2178
2000
  # setattr hooks.
2179
- globs["_cached_setattr_get"] = _obj_setattr.__get__
2001
+ globs["_cached_setattr_get"] = _OBJ_SETATTR.__get__
2180
2002
 
2181
- init = _make_method(
2182
- "__attrs_init__" if attrs_init else "__init__",
2183
- script,
2184
- unique_filename,
2185
- globs,
2186
- )
2187
- init.__annotations__ = annotations
2188
-
2189
- return init
2003
+ return script, globs, annotations
2190
2004
 
2191
2005
 
2192
- def _setattr(attr_name, value_var, has_on_setattr):
2006
+ def _setattr(attr_name: str, value_var: str, has_on_setattr: bool) -> str:
2193
2007
  """
2194
2008
  Use the cached object.setattr to set *attr_name* to *value_var*.
2195
2009
  """
2196
2010
  return f"_setattr('{attr_name}', {value_var})"
2197
2011
 
2198
2012
 
2199
- def _setattr_with_converter(attr_name, value_var, has_on_setattr):
2013
+ def _setattr_with_converter(
2014
+ attr_name: str, value_var: str, has_on_setattr: bool, converter: Converter
2015
+ ) -> str:
2200
2016
  """
2201
2017
  Use the cached object.setattr to set *attr_name* to *value_var*, but run
2202
2018
  its converter first.
2203
2019
  """
2204
- return "_setattr('%s', %s(%s))" % (
2205
- attr_name,
2206
- _init_converter_pat % (attr_name,),
2207
- value_var,
2208
- )
2020
+ return f"_setattr('{attr_name}', {converter._fmt_converter_call(attr_name, value_var)})"
2209
2021
 
2210
2022
 
2211
- def _assign(attr_name, value, has_on_setattr):
2023
+ def _assign(attr_name: str, value: str, has_on_setattr: bool) -> str:
2212
2024
  """
2213
2025
  Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise
2214
2026
  relegate to _setattr.
@@ -2219,90 +2031,100 @@ def _assign(attr_name, value, has_on_setattr):
2219
2031
  return f"self.{attr_name} = {value}"
2220
2032
 
2221
2033
 
2222
- def _assign_with_converter(attr_name, value_var, has_on_setattr):
2034
+ def _assign_with_converter(
2035
+ attr_name: str, value_var: str, has_on_setattr: bool, converter: Converter
2036
+ ) -> str:
2223
2037
  """
2224
2038
  Unless *attr_name* has an on_setattr hook, use normal assignment after
2225
2039
  conversion. Otherwise relegate to _setattr_with_converter.
2226
2040
  """
2227
2041
  if has_on_setattr:
2228
- return _setattr_with_converter(attr_name, value_var, True)
2042
+ return _setattr_with_converter(attr_name, value_var, True, converter)
2229
2043
 
2230
- return "self.%s = %s(%s)" % (
2231
- attr_name,
2232
- _init_converter_pat % (attr_name,),
2233
- value_var,
2234
- )
2044
+ return f"self.{attr_name} = {converter._fmt_converter_call(attr_name, value_var)}"
2235
2045
 
2236
2046
 
2237
- def _attrs_to_init_script(
2238
- attrs,
2239
- frozen,
2240
- slots,
2241
- pre_init,
2242
- pre_init_has_args,
2243
- post_init,
2244
- cache_hash,
2245
- base_attr_map,
2246
- is_exc,
2247
- needs_cached_setattr,
2248
- has_cls_on_setattr,
2249
- attrs_init,
2047
+ def _determine_setters(
2048
+ frozen: bool, slots: bool, base_attr_map: dict[str, type]
2250
2049
  ):
2251
2050
  """
2252
- Return a script of an initializer for *attrs* and a dict of globals.
2051
+ Determine the correct setter functions based on whether a class is frozen
2052
+ and/or slotted.
2053
+ """
2054
+ if frozen is True:
2055
+ if slots is True:
2056
+ return (), _setattr, _setattr_with_converter
2057
+
2058
+ # Dict frozen classes assign directly to __dict__.
2059
+ # But only if the attribute doesn't come from an ancestor slot
2060
+ # class.
2061
+ # Note _inst_dict will be used again below if cache_hash is True
2062
+
2063
+ def fmt_setter(
2064
+ attr_name: str, value_var: str, has_on_setattr: bool
2065
+ ) -> str:
2066
+ if _is_slot_attr(attr_name, base_attr_map):
2067
+ return _setattr(attr_name, value_var, has_on_setattr)
2068
+
2069
+ return f"_inst_dict['{attr_name}'] = {value_var}"
2070
+
2071
+ def fmt_setter_with_converter(
2072
+ attr_name: str,
2073
+ value_var: str,
2074
+ has_on_setattr: bool,
2075
+ converter: Converter,
2076
+ ) -> str:
2077
+ if has_on_setattr or _is_slot_attr(attr_name, base_attr_map):
2078
+ return _setattr_with_converter(
2079
+ attr_name, value_var, has_on_setattr, converter
2080
+ )
2253
2081
 
2254
- The globals are expected by the generated script.
2082
+ return f"_inst_dict['{attr_name}'] = {converter._fmt_converter_call(attr_name, value_var)}"
2255
2083
 
2256
- If *frozen* is True, we cannot set the attributes directly so we use
2257
- a cached ``object.__setattr__``.
2258
- """
2259
- lines = []
2260
- if pre_init:
2261
- lines.append("self.__attrs_pre_init__()")
2084
+ return (
2085
+ ("_inst_dict = self.__dict__",),
2086
+ fmt_setter,
2087
+ fmt_setter_with_converter,
2088
+ )
2089
+
2090
+ # Not frozen -- we can just assign directly.
2091
+ return (), _assign, _assign_with_converter
2092
+
2093
+
2094
+ def _attrs_to_init_script(
2095
+ attrs: list[Attribute],
2096
+ is_frozen: bool,
2097
+ is_slotted: bool,
2098
+ call_pre_init: bool,
2099
+ pre_init_has_args: bool,
2100
+ call_post_init: bool,
2101
+ does_cache_hash: bool,
2102
+ base_attr_map: dict[str, type],
2103
+ is_exc: bool,
2104
+ needs_cached_setattr: bool,
2105
+ has_cls_on_setattr: bool,
2106
+ method_name: str,
2107
+ ) -> tuple[str, dict, dict]:
2108
+ """
2109
+ Return a script of an initializer for *attrs*, a dict of globals, and
2110
+ annotations for the initializer.
2111
+
2112
+ The globals are required by the generated script.
2113
+ """
2114
+ lines = ["self.__attrs_pre_init__()"] if call_pre_init else []
2262
2115
 
2263
2116
  if needs_cached_setattr:
2264
2117
  lines.append(
2265
2118
  # Circumvent the __setattr__ descriptor to save one lookup per
2266
- # assignment.
2267
- # Note _setattr will be used again below if cache_hash is True
2119
+ # assignment. Note _setattr will be used again below if
2120
+ # does_cache_hash is True.
2268
2121
  "_setattr = _cached_setattr_get(self)"
2269
2122
  )
2270
2123
 
2271
- if frozen is True:
2272
- if slots is True:
2273
- fmt_setter = _setattr
2274
- fmt_setter_with_converter = _setattr_with_converter
2275
- else:
2276
- # Dict frozen classes assign directly to __dict__.
2277
- # But only if the attribute doesn't come from an ancestor slot
2278
- # class.
2279
- # Note _inst_dict will be used again below if cache_hash is True
2280
- lines.append("_inst_dict = self.__dict__")
2281
-
2282
- def fmt_setter(attr_name, value_var, has_on_setattr):
2283
- if _is_slot_attr(attr_name, base_attr_map):
2284
- return _setattr(attr_name, value_var, has_on_setattr)
2285
-
2286
- return f"_inst_dict['{attr_name}'] = {value_var}"
2287
-
2288
- def fmt_setter_with_converter(
2289
- attr_name, value_var, has_on_setattr
2290
- ):
2291
- if has_on_setattr or _is_slot_attr(attr_name, base_attr_map):
2292
- return _setattr_with_converter(
2293
- attr_name, value_var, has_on_setattr
2294
- )
2295
-
2296
- return "_inst_dict['%s'] = %s(%s)" % (
2297
- attr_name,
2298
- _init_converter_pat % (attr_name,),
2299
- value_var,
2300
- )
2301
-
2302
- else:
2303
- # Not frozen.
2304
- fmt_setter = _assign
2305
- fmt_setter_with_converter = _assign_with_converter
2124
+ extra_lines, fmt_setter, fmt_setter_with_converter = _determine_setters(
2125
+ is_frozen, is_slotted, base_attr_map
2126
+ )
2127
+ lines.extend(extra_lines)
2306
2128
 
2307
2129
  args = []
2308
2130
  kw_only_args = []
@@ -2328,19 +2150,26 @@ def _attrs_to_init_script(
2328
2150
  has_factory = isinstance(a.default, Factory)
2329
2151
  maybe_self = "self" if has_factory and a.default.takes_self else ""
2330
2152
 
2153
+ if a.converter is not None and not isinstance(a.converter, Converter):
2154
+ converter = Converter(a.converter)
2155
+ else:
2156
+ converter = a.converter
2157
+
2331
2158
  if a.init is False:
2332
2159
  if has_factory:
2333
- init_factory_name = _init_factory_pat % (a.name,)
2334
- if a.converter is not None:
2160
+ init_factory_name = _INIT_FACTORY_PAT % (a.name,)
2161
+ if converter is not None:
2335
2162
  lines.append(
2336
2163
  fmt_setter_with_converter(
2337
2164
  attr_name,
2338
2165
  init_factory_name + f"({maybe_self})",
2339
2166
  has_on_setattr,
2167
+ converter,
2340
2168
  )
2341
2169
  )
2342
- conv_name = _init_converter_pat % (a.name,)
2343
- names_for_globals[conv_name] = a.converter
2170
+ names_for_globals[converter._get_global_name(a.name)] = (
2171
+ converter.converter
2172
+ )
2344
2173
  else:
2345
2174
  lines.append(
2346
2175
  fmt_setter(
@@ -2350,16 +2179,18 @@ def _attrs_to_init_script(
2350
2179
  )
2351
2180
  )
2352
2181
  names_for_globals[init_factory_name] = a.default.factory
2353
- elif a.converter is not None:
2182
+ elif converter is not None:
2354
2183
  lines.append(
2355
2184
  fmt_setter_with_converter(
2356
2185
  attr_name,
2357
2186
  f"attr_dict['{attr_name}'].default",
2358
2187
  has_on_setattr,
2188
+ converter,
2359
2189
  )
2360
2190
  )
2361
- conv_name = _init_converter_pat % (a.name,)
2362
- names_for_globals[conv_name] = a.converter
2191
+ names_for_globals[converter._get_global_name(a.name)] = (
2192
+ converter.converter
2193
+ )
2363
2194
  else:
2364
2195
  lines.append(
2365
2196
  fmt_setter(
@@ -2375,15 +2206,15 @@ def _attrs_to_init_script(
2375
2206
  else:
2376
2207
  args.append(arg)
2377
2208
 
2378
- if a.converter is not None:
2209
+ if converter is not None:
2379
2210
  lines.append(
2380
2211
  fmt_setter_with_converter(
2381
- attr_name, arg_name, has_on_setattr
2212
+ attr_name, arg_name, has_on_setattr, converter
2382
2213
  )
2383
2214
  )
2384
- names_for_globals[
2385
- _init_converter_pat % (a.name,)
2386
- ] = a.converter
2215
+ names_for_globals[converter._get_global_name(a.name)] = (
2216
+ converter.converter
2217
+ )
2387
2218
  else:
2388
2219
  lines.append(fmt_setter(attr_name, arg_name, has_on_setattr))
2389
2220
 
@@ -2395,12 +2226,12 @@ def _attrs_to_init_script(
2395
2226
  args.append(arg)
2396
2227
  lines.append(f"if {arg_name} is not NOTHING:")
2397
2228
 
2398
- init_factory_name = _init_factory_pat % (a.name,)
2399
- if a.converter is not None:
2229
+ init_factory_name = _INIT_FACTORY_PAT % (a.name,)
2230
+ if converter is not None:
2400
2231
  lines.append(
2401
2232
  " "
2402
2233
  + fmt_setter_with_converter(
2403
- attr_name, arg_name, has_on_setattr
2234
+ attr_name, arg_name, has_on_setattr, converter
2404
2235
  )
2405
2236
  )
2406
2237
  lines.append("else:")
@@ -2410,11 +2241,12 @@ def _attrs_to_init_script(
2410
2241
  attr_name,
2411
2242
  init_factory_name + "(" + maybe_self + ")",
2412
2243
  has_on_setattr,
2244
+ converter,
2413
2245
  )
2414
2246
  )
2415
- names_for_globals[
2416
- _init_converter_pat % (a.name,)
2417
- ] = a.converter
2247
+ names_for_globals[converter._get_global_name(a.name)] = (
2248
+ converter.converter
2249
+ )
2418
2250
  else:
2419
2251
  lines.append(
2420
2252
  " " + fmt_setter(attr_name, arg_name, has_on_setattr)
@@ -2435,26 +2267,24 @@ def _attrs_to_init_script(
2435
2267
  else:
2436
2268
  args.append(arg_name)
2437
2269
 
2438
- if a.converter is not None:
2270
+ if converter is not None:
2439
2271
  lines.append(
2440
2272
  fmt_setter_with_converter(
2441
- attr_name, arg_name, has_on_setattr
2273
+ attr_name, arg_name, has_on_setattr, converter
2442
2274
  )
2443
2275
  )
2444
- names_for_globals[
2445
- _init_converter_pat % (a.name,)
2446
- ] = a.converter
2276
+ names_for_globals[converter._get_global_name(a.name)] = (
2277
+ converter.converter
2278
+ )
2447
2279
  else:
2448
2280
  lines.append(fmt_setter(attr_name, arg_name, has_on_setattr))
2449
2281
 
2450
2282
  if a.init is True:
2451
- if a.type is not None and a.converter is None:
2283
+ if a.type is not None and converter is None:
2452
2284
  annotations[arg_name] = a.type
2453
- elif a.converter is not None:
2454
- # Try to get the type from the converter.
2455
- t = _AnnotationExtractor(a.converter).get_first_param_type()
2456
- if t:
2457
- annotations[arg_name] = t
2285
+ elif converter is not None and converter._first_param_type:
2286
+ # Use the type from the converter if present.
2287
+ annotations[arg_name] = converter._first_param_type
2458
2288
 
2459
2289
  if attrs_to_validate: # we can skip this if there are no validators.
2460
2290
  names_for_globals["_config"] = _config
@@ -2466,25 +2296,23 @@ def _attrs_to_init_script(
2466
2296
  names_for_globals[val_name] = a.validator
2467
2297
  names_for_globals[attr_name] = a
2468
2298
 
2469
- if post_init:
2299
+ if call_post_init:
2470
2300
  lines.append("self.__attrs_post_init__()")
2471
2301
 
2472
- # because this is set only after __attrs_post_init__ is called, a crash
2302
+ # Because this is set only after __attrs_post_init__ is called, a crash
2473
2303
  # will result if post-init tries to access the hash code. This seemed
2474
- # preferable to setting this beforehand, in which case alteration to
2475
- # field values during post-init combined with post-init accessing the
2476
- # hash code would result in silent bugs.
2477
- if cache_hash:
2478
- if frozen:
2479
- if slots: # noqa: SIM108
2480
- # if frozen and slots, then _setattr defined above
2481
- init_hash_cache = "_setattr('%s', %s)"
2304
+ # preferable to setting this beforehand, in which case alteration to field
2305
+ # values during post-init combined with post-init accessing the hash code
2306
+ # would result in silent bugs.
2307
+ if does_cache_hash:
2308
+ if is_frozen:
2309
+ if is_slotted:
2310
+ init_hash_cache = f"_setattr('{_HASH_CACHE_FIELD}', None)"
2482
2311
  else:
2483
- # if frozen and not slots, then _inst_dict defined above
2484
- init_hash_cache = "_inst_dict['%s'] = %s"
2312
+ init_hash_cache = f"_inst_dict['{_HASH_CACHE_FIELD}'] = None"
2485
2313
  else:
2486
- init_hash_cache = "self.%s = %s"
2487
- lines.append(init_hash_cache % (_hash_cache_field, "None"))
2314
+ init_hash_cache = f"self.{_HASH_CACHE_FIELD} = None"
2315
+ lines.append(init_hash_cache)
2488
2316
 
2489
2317
  # For exceptions we rely on BaseException.__init__ for proper
2490
2318
  # initialization.
@@ -2496,29 +2324,28 @@ def _attrs_to_init_script(
2496
2324
  args = ", ".join(args)
2497
2325
  pre_init_args = args
2498
2326
  if kw_only_args:
2499
- args += "%s*, %s" % (
2500
- ", " if args else "", # leading comma
2501
- ", ".join(kw_only_args), # kw_only args
2502
- )
2327
+ # leading comma & kw_only args
2328
+ args += f"{', ' if args else ''}*, {', '.join(kw_only_args)}"
2503
2329
  pre_init_kw_only_args = ", ".join(
2504
- ["%s=%s" % (kw_arg, kw_arg) for kw_arg in kw_only_args]
2330
+ [
2331
+ f"{kw_arg_name}={kw_arg_name}"
2332
+ # We need to remove the defaults from the kw_only_args.
2333
+ for kw_arg_name in (kwa.split("=")[0] for kwa in kw_only_args)
2334
+ ]
2505
2335
  )
2506
- pre_init_args += (
2507
- ", " if pre_init_args else ""
2508
- ) # handle only kwargs and no regular args
2336
+ pre_init_args += ", " if pre_init_args else ""
2509
2337
  pre_init_args += pre_init_kw_only_args
2510
2338
 
2511
- if pre_init and pre_init_has_args:
2512
- # If pre init method has arguments, pass same arguments as `__init__`
2513
- lines[0] = "self.__attrs_pre_init__(%s)" % pre_init_args
2339
+ if call_pre_init and pre_init_has_args:
2340
+ # If pre init method has arguments, pass same arguments as `__init__`.
2341
+ lines[0] = f"self.__attrs_pre_init__({pre_init_args})"
2514
2342
 
2343
+ # Python <3.12 doesn't allow backslashes in f-strings.
2344
+ NL = "\n "
2515
2345
  return (
2516
- "def %s(self, %s):\n %s\n"
2517
- % (
2518
- ("__attrs_init__" if attrs_init else "__init__"),
2519
- args,
2520
- "\n ".join(lines) if lines else "pass",
2521
- ),
2346
+ f"""def {method_name}(self, {args}):
2347
+ {NL.join(lines) if lines else "pass"}
2348
+ """,
2522
2349
  names_for_globals,
2523
2350
  annotations,
2524
2351
  )
@@ -2543,20 +2370,19 @@ class Attribute:
2543
2370
 
2544
2371
  You should never instantiate this class yourself.
2545
2372
 
2546
- The class has *all* arguments of `attr.ib` (except for ``factory``
2547
- which is only syntactic sugar for ``default=Factory(...)`` plus the
2548
- following:
2373
+ The class has *all* arguments of `attr.ib` (except for ``factory`` which is
2374
+ only syntactic sugar for ``default=Factory(...)`` plus the following:
2549
2375
 
2550
2376
  - ``name`` (`str`): The name of the attribute.
2551
2377
  - ``alias`` (`str`): The __init__ parameter name of the attribute, after
2552
2378
  any explicit overrides and default private-attribute-name handling.
2553
2379
  - ``inherited`` (`bool`): Whether or not that attribute has been inherited
2554
2380
  from a base class.
2555
- - ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The callables
2556
- that are used for comparing and ordering objects by this attribute,
2557
- respectively. These are set by passing a callable to `attr.ib`'s ``eq``,
2558
- ``order``, or ``cmp`` arguments. See also :ref:`comparison customization
2559
- <custom-comparison>`.
2381
+ - ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The
2382
+ callables that are used for comparing and ordering objects by this
2383
+ attribute, respectively. These are set by passing a callable to
2384
+ `attr.ib`'s ``eq``, ``order``, or ``cmp`` arguments. See also
2385
+ :ref:`comparison customization <custom-comparison>`.
2560
2386
 
2561
2387
  Instances of this class are frequently used for introspection purposes
2562
2388
  like:
@@ -2579,7 +2405,9 @@ class Attribute:
2579
2405
  For the full version history of the fields, see `attr.ib`.
2580
2406
  """
2581
2407
 
2582
- __slots__ = (
2408
+ # These slots must NOT be reordered because we use them later for
2409
+ # instantiation.
2410
+ __slots__ = ( # noqa: RUF023
2583
2411
  "name",
2584
2412
  "default",
2585
2413
  "validator",
@@ -2625,7 +2453,7 @@ class Attribute:
2625
2453
  )
2626
2454
 
2627
2455
  # Cache this descriptor here to speed things up later.
2628
- bound_setattr = _obj_setattr.__get__(self)
2456
+ bound_setattr = _OBJ_SETATTR.__get__(self)
2629
2457
 
2630
2458
  # Despite the big red warning, people *do* instantiate `Attribute`
2631
2459
  # themselves.
@@ -2645,7 +2473,7 @@ class Attribute:
2645
2473
  (
2646
2474
  types.MappingProxyType(dict(metadata)) # Shallow copy
2647
2475
  if metadata
2648
- else _empty_metadata_singleton
2476
+ else _EMPTY_METADATA_SINGLETON
2649
2477
  ),
2650
2478
  )
2651
2479
  bound_setattr("type", type)
@@ -2655,36 +2483,35 @@ class Attribute:
2655
2483
  bound_setattr("alias", alias)
2656
2484
 
2657
2485
  def __setattr__(self, name, value):
2658
- raise FrozenInstanceError()
2486
+ raise FrozenInstanceError
2659
2487
 
2660
2488
  @classmethod
2661
- def from_counting_attr(cls, name, ca, type=None):
2489
+ def from_counting_attr(cls, name: str, ca: _CountingAttr, type=None):
2662
2490
  # type holds the annotated value. deal with conflicts:
2663
2491
  if type is None:
2664
2492
  type = ca.type
2665
2493
  elif ca.type is not None:
2666
- msg = "Type annotation and type argument cannot both be present"
2494
+ msg = f"Type annotation and type argument cannot both be present for '{name}'."
2667
2495
  raise ValueError(msg)
2668
- inst_dict = {
2669
- k: getattr(ca, k)
2670
- for k in Attribute.__slots__
2671
- if k
2672
- not in (
2673
- "name",
2674
- "validator",
2675
- "default",
2676
- "type",
2677
- "inherited",
2678
- ) # exclude methods and deprecated alias
2679
- }
2680
2496
  return cls(
2681
- name=name,
2682
- validator=ca._validator,
2683
- default=ca._default,
2684
- type=type,
2685
- cmp=None,
2686
- inherited=False,
2687
- **inst_dict,
2497
+ name,
2498
+ ca._default,
2499
+ ca._validator,
2500
+ ca.repr,
2501
+ None,
2502
+ ca.hash,
2503
+ ca.init,
2504
+ False,
2505
+ ca.metadata,
2506
+ type,
2507
+ ca.converter,
2508
+ ca.kw_only,
2509
+ ca.eq,
2510
+ ca.eq_key,
2511
+ ca.order,
2512
+ ca.order_key,
2513
+ ca.on_setattr,
2514
+ ca.alias,
2688
2515
  )
2689
2516
 
2690
2517
  # Don't use attrs.evolve since fields(Attribute) doesn't work
@@ -2693,7 +2520,7 @@ class Attribute:
2693
2520
  Copy *self* and apply *changes*.
2694
2521
 
2695
2522
  This works similarly to `attrs.evolve` but that function does not work
2696
- with `Attribute`.
2523
+ with :class:`attrs.Attribute`.
2697
2524
 
2698
2525
  It is mainly meant to be used for `transform-fields`.
2699
2526
 
@@ -2722,16 +2549,18 @@ class Attribute:
2722
2549
  self._setattrs(zip(self.__slots__, state))
2723
2550
 
2724
2551
  def _setattrs(self, name_values_pairs):
2725
- bound_setattr = _obj_setattr.__get__(self)
2552
+ bound_setattr = _OBJ_SETATTR.__get__(self)
2726
2553
  for name, value in name_values_pairs:
2727
2554
  if name != "metadata":
2728
2555
  bound_setattr(name, value)
2729
2556
  else:
2730
2557
  bound_setattr(
2731
2558
  name,
2732
- types.MappingProxyType(dict(value))
2733
- if value
2734
- else _empty_metadata_singleton,
2559
+ (
2560
+ types.MappingProxyType(dict(value))
2561
+ if value
2562
+ else _EMPTY_METADATA_SINGLETON
2563
+ ),
2735
2564
  )
2736
2565
 
2737
2566
 
@@ -2771,22 +2600,22 @@ class _CountingAttr:
2771
2600
  """
2772
2601
 
2773
2602
  __slots__ = (
2774
- "counter",
2775
2603
  "_default",
2776
- "repr",
2604
+ "_validator",
2605
+ "alias",
2606
+ "converter",
2607
+ "counter",
2777
2608
  "eq",
2778
2609
  "eq_key",
2779
- "order",
2780
- "order_key",
2781
2610
  "hash",
2782
2611
  "init",
2783
- "metadata",
2784
- "_validator",
2785
- "converter",
2786
- "type",
2787
2612
  "kw_only",
2613
+ "metadata",
2788
2614
  "on_setattr",
2789
- "alias",
2615
+ "order",
2616
+ "order_key",
2617
+ "repr",
2618
+ "type",
2790
2619
  )
2791
2620
  __attrs_attrs__ = (
2792
2621
  *tuple(
@@ -2896,12 +2725,13 @@ class _CountingAttr:
2896
2725
 
2897
2726
  Returns *meth* unchanged.
2898
2727
 
2899
- :raises DefaultAlreadySetError: If default has been set before.
2728
+ Raises:
2729
+ DefaultAlreadySetError: If default has been set before.
2900
2730
 
2901
2731
  .. versionadded:: 17.1.0
2902
2732
  """
2903
2733
  if self._default is not NOTHING:
2904
- raise DefaultAlreadySetError()
2734
+ raise DefaultAlreadySetError
2905
2735
 
2906
2736
  self._default = Factory(meth, takes_self=True)
2907
2737
 
@@ -2918,10 +2748,14 @@ class Factory:
2918
2748
  If passed as the default value to `attrs.field`, the factory is used to
2919
2749
  generate a new value.
2920
2750
 
2921
- :param callable factory: A callable that takes either none or exactly one
2922
- mandatory positional argument depending on *takes_self*.
2923
- :param bool takes_self: Pass the partially initialized instance that is
2924
- being initialized as a positional argument.
2751
+ Args:
2752
+ factory (typing.Callable):
2753
+ A callable that takes either none or exactly one mandatory
2754
+ positional argument depending on *takes_self*.
2755
+
2756
+ takes_self (bool):
2757
+ Pass the partially initialized instance that is being initialized
2758
+ as a positional argument.
2925
2759
 
2926
2760
  .. versionadded:: 17.1.0 *takes_self*
2927
2761
  """
@@ -2965,35 +2799,177 @@ _f = [
2965
2799
  Factory = _add_hash(_add_eq(_add_repr(Factory, attrs=_f), attrs=_f), attrs=_f)
2966
2800
 
2967
2801
 
2802
+ class Converter:
2803
+ """
2804
+ Stores a converter callable.
2805
+
2806
+ Allows for the wrapped converter to take additional arguments. The
2807
+ arguments are passed in the order they are documented.
2808
+
2809
+ Args:
2810
+ converter (Callable): A callable that converts the passed value.
2811
+
2812
+ takes_self (bool):
2813
+ Pass the partially initialized instance that is being initialized
2814
+ as a positional argument. (default: `False`)
2815
+
2816
+ takes_field (bool):
2817
+ Pass the field definition (an :class:`Attribute`) into the
2818
+ converter as a positional argument. (default: `False`)
2819
+
2820
+ .. versionadded:: 24.1.0
2821
+ """
2822
+
2823
+ __slots__ = (
2824
+ "__call__",
2825
+ "_first_param_type",
2826
+ "_global_name",
2827
+ "converter",
2828
+ "takes_field",
2829
+ "takes_self",
2830
+ )
2831
+
2832
+ def __init__(self, converter, *, takes_self=False, takes_field=False):
2833
+ self.converter = converter
2834
+ self.takes_self = takes_self
2835
+ self.takes_field = takes_field
2836
+
2837
+ ex = _AnnotationExtractor(converter)
2838
+ self._first_param_type = ex.get_first_param_type()
2839
+
2840
+ if not (self.takes_self or self.takes_field):
2841
+ self.__call__ = lambda value, _, __: self.converter(value)
2842
+ elif self.takes_self and not self.takes_field:
2843
+ self.__call__ = lambda value, instance, __: self.converter(
2844
+ value, instance
2845
+ )
2846
+ elif not self.takes_self and self.takes_field:
2847
+ self.__call__ = lambda value, __, field: self.converter(
2848
+ value, field
2849
+ )
2850
+ else:
2851
+ self.__call__ = lambda value, instance, field: self.converter(
2852
+ value, instance, field
2853
+ )
2854
+
2855
+ rt = ex.get_return_type()
2856
+ if rt is not None:
2857
+ self.__call__.__annotations__["return"] = rt
2858
+
2859
+ @staticmethod
2860
+ def _get_global_name(attr_name: str) -> str:
2861
+ """
2862
+ Return the name that a converter for an attribute name *attr_name*
2863
+ would have.
2864
+ """
2865
+ return f"__attr_converter_{attr_name}"
2866
+
2867
+ def _fmt_converter_call(self, attr_name: str, value_var: str) -> str:
2868
+ """
2869
+ Return a string that calls the converter for an attribute name
2870
+ *attr_name* and the value in variable named *value_var* according to
2871
+ `self.takes_self` and `self.takes_field`.
2872
+ """
2873
+ if not (self.takes_self or self.takes_field):
2874
+ return f"{self._get_global_name(attr_name)}({value_var})"
2875
+
2876
+ if self.takes_self and self.takes_field:
2877
+ return f"{self._get_global_name(attr_name)}({value_var}, self, attr_dict['{attr_name}'])"
2878
+
2879
+ if self.takes_self:
2880
+ return f"{self._get_global_name(attr_name)}({value_var}, self)"
2881
+
2882
+ return f"{self._get_global_name(attr_name)}({value_var}, attr_dict['{attr_name}'])"
2883
+
2884
+ def __getstate__(self):
2885
+ """
2886
+ Return a dict containing only converter and takes_self -- the rest gets
2887
+ computed when loading.
2888
+ """
2889
+ return {
2890
+ "converter": self.converter,
2891
+ "takes_self": self.takes_self,
2892
+ "takes_field": self.takes_field,
2893
+ }
2894
+
2895
+ def __setstate__(self, state):
2896
+ """
2897
+ Load instance from state.
2898
+ """
2899
+ self.__init__(**state)
2900
+
2901
+
2902
+ _f = [
2903
+ Attribute(
2904
+ name=name,
2905
+ default=NOTHING,
2906
+ validator=None,
2907
+ repr=True,
2908
+ cmp=None,
2909
+ eq=True,
2910
+ order=False,
2911
+ hash=True,
2912
+ init=True,
2913
+ inherited=False,
2914
+ )
2915
+ for name in ("converter", "takes_self", "takes_field")
2916
+ ]
2917
+
2918
+ Converter = _add_hash(
2919
+ _add_eq(_add_repr(Converter, attrs=_f), attrs=_f), attrs=_f
2920
+ )
2921
+
2922
+
2968
2923
  def make_class(
2969
2924
  name, attrs, bases=(object,), class_body=None, **attributes_arguments
2970
2925
  ):
2971
2926
  r"""
2972
2927
  A quick way to create a new class called *name* with *attrs*.
2973
2928
 
2974
- :param str name: The name for the new class.
2929
+ .. note::
2930
+
2931
+ ``make_class()`` is a thin wrapper around `attr.s`, not `attrs.define`
2932
+ which means that it doesn't come with some of the improved defaults.
2933
+
2934
+ For example, if you want the same ``on_setattr`` behavior as in
2935
+ `attrs.define`, you have to pass the hooks yourself: ``make_class(...,
2936
+ on_setattr=setters.pipe(setters.convert, setters.validate)``
2975
2937
 
2976
- :param attrs: A list of names or a dictionary of mappings of names to
2977
- `attr.ib`\ s / `attrs.field`\ s.
2938
+ .. warning::
2939
+
2940
+ It is *your* duty to ensure that the class name and the attribute names
2941
+ are valid identifiers. ``make_class()`` will *not* validate them for
2942
+ you.
2943
+
2944
+ Args:
2945
+ name (str): The name for the new class.
2978
2946
 
2979
- The order is deduced from the order of the names or attributes inside
2980
- *attrs*. Otherwise the order of the definition of the attributes is
2981
- used.
2982
- :type attrs: `list` or `dict`
2947
+ attrs (list | dict):
2948
+ A list of names or a dictionary of mappings of names to `attr.ib`\
2949
+ s / `attrs.field`\ s.
2983
2950
 
2984
- :param tuple bases: Classes that the new class will subclass.
2951
+ The order is deduced from the order of the names or attributes
2952
+ inside *attrs*. Otherwise the order of the definition of the
2953
+ attributes is used.
2985
2954
 
2986
- :param dict class_body: An optional dictionary of class attributes for the new class.
2955
+ bases (tuple[type, ...]): Classes that the new class will subclass.
2987
2956
 
2988
- :param attributes_arguments: Passed unmodified to `attr.s`.
2957
+ class_body (dict):
2958
+ An optional dictionary of class attributes for the new class.
2989
2959
 
2990
- :return: A new class with *attrs*.
2991
- :rtype: type
2960
+ attributes_arguments: Passed unmodified to `attr.s`.
2961
+
2962
+ Returns:
2963
+ type: A new class with *attrs*.
2992
2964
 
2993
2965
  .. versionadded:: 17.1.0 *bases*
2994
2966
  .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
2995
2967
  .. versionchanged:: 23.2.0 *class_body*
2968
+ .. versionchanged:: 25.2.0 Class names can now be unicode.
2996
2969
  """
2970
+ # Class identifiers are converted into the normal form NFKC while parsing
2971
+ name = unicodedata.normalize("NFKC", name)
2972
+
2997
2973
  if isinstance(attrs, dict):
2998
2974
  cls_dict = attrs
2999
2975
  elif isinstance(attrs, (list, tuple)):
@@ -3039,14 +3015,19 @@ def make_class(
3039
3015
  True,
3040
3016
  )
3041
3017
 
3042
- return _attrs(these=cls_dict, **attributes_arguments)(type_)
3018
+ cls = _attrs(these=cls_dict, **attributes_arguments)(type_)
3019
+ # Only add type annotations now or "_attrs()" will complain:
3020
+ cls.__annotations__ = {
3021
+ k: v.type for k, v in cls_dict.items() if v.type is not None
3022
+ }
3023
+ return cls
3043
3024
 
3044
3025
 
3045
3026
  # These are required by within this module so we define them here and merely
3046
3027
  # import into .validators / .converters.
3047
3028
 
3048
3029
 
3049
- @attrs(slots=True, hash=True)
3030
+ @attrs(slots=True, unsafe_hash=True)
3050
3031
  class _AndValidator:
3051
3032
  """
3052
3033
  Compose many validators to a single one.
@@ -3065,7 +3046,9 @@ def and_(*validators):
3065
3046
 
3066
3047
  When called on a value, it runs all wrapped validators.
3067
3048
 
3068
- :param callables validators: Arbitrary number of validators.
3049
+ Args:
3050
+ validators (~collections.abc.Iterable[typing.Callable]):
3051
+ Arbitrary number of validators.
3069
3052
 
3070
3053
  .. versionadded:: 17.1.0
3071
3054
  """
@@ -3087,33 +3070,54 @@ def pipe(*converters):
3087
3070
  When called on a value, it runs all wrapped converters, returning the
3088
3071
  *last* value.
3089
3072
 
3090
- Type annotations will be inferred from the wrapped converters', if
3091
- they have any.
3073
+ Type annotations will be inferred from the wrapped converters', if they
3074
+ have any.
3092
3075
 
3093
- :param callables converters: Arbitrary number of converters.
3076
+ converters (~collections.abc.Iterable[typing.Callable]):
3077
+ Arbitrary number of converters.
3094
3078
 
3095
3079
  .. versionadded:: 20.1.0
3096
3080
  """
3097
3081
 
3098
- def pipe_converter(val):
3099
- for converter in converters:
3100
- val = converter(val)
3082
+ return_instance = any(isinstance(c, Converter) for c in converters)
3083
+
3084
+ if return_instance:
3085
+
3086
+ def pipe_converter(val, inst, field):
3087
+ for c in converters:
3088
+ val = (
3089
+ c(val, inst, field) if isinstance(c, Converter) else c(val)
3090
+ )
3091
+
3092
+ return val
3093
+
3094
+ else:
3101
3095
 
3102
- return val
3096
+ def pipe_converter(val):
3097
+ for c in converters:
3098
+ val = c(val)
3099
+
3100
+ return val
3103
3101
 
3104
3102
  if not converters:
3105
3103
  # If the converter list is empty, pipe_converter is the identity.
3106
- A = typing.TypeVar("A")
3107
- pipe_converter.__annotations__ = {"val": A, "return": A}
3104
+ A = TypeVar("A")
3105
+ pipe_converter.__annotations__.update({"val": A, "return": A})
3108
3106
  else:
3109
3107
  # Get parameter type from first converter.
3110
3108
  t = _AnnotationExtractor(converters[0]).get_first_param_type()
3111
3109
  if t:
3112
3110
  pipe_converter.__annotations__["val"] = t
3113
3111
 
3112
+ last = converters[-1]
3113
+ if not PY_3_11_PLUS and isinstance(last, Converter):
3114
+ last = last.__call__
3115
+
3114
3116
  # Get return type from last converter.
3115
- rt = _AnnotationExtractor(converters[-1]).get_return_type()
3117
+ rt = _AnnotationExtractor(last).get_return_type()
3116
3118
  if rt:
3117
3119
  pipe_converter.__annotations__["return"] = rt
3118
3120
 
3121
+ if return_instance:
3122
+ return Converter(pipe_converter, takes_self=True, takes_field=True)
3119
3123
  return pipe_converter