jaclang 0.7.34__py3-none-any.whl → 0.8.1__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 (1503) hide show
  1. jaclang/__init__.py +7 -414
  2. jaclang/cli/cli.md +5 -5
  3. jaclang/cli/cli.py +316 -217
  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 +65 -106
  9. jaclang/compiler/larkparse/jac_parser.py +3444 -0
  10. jaclang/compiler/parser.py +1137 -1517
  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 +159 -114
  16. jaclang/compiler/passes/main/def_use_pass.py +66 -274
  17. jaclang/compiler/passes/main/import_pass.py +178 -363
  18. jaclang/compiler/passes/main/inheritance_pass.py +109 -107
  19. jaclang/compiler/passes/main/pyast_gen_pass.py +1242 -1735
  20. jaclang/compiler/passes/main/pyast_load_pass.py +579 -819
  21. jaclang/compiler/passes/main/pybc_gen_pass.py +38 -35
  22. jaclang/compiler/passes/main/pyjac_ast_link_pass.py +50 -163
  23. jaclang/compiler/passes/main/sym_tab_build_pass.py +114 -1203
  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 +19 -0
  66. jaclang/compiler/passes/main/tests/fixtures/symtab_link_tests/main.jac +7 -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 +101 -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 +1287 -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 +200 -0
  107. jaclang/compiler/tests/fixtures/codegentext.jac +31 -0
  108. jaclang/compiler/tests/fixtures/fam.jac +12 -12
  109. jaclang/compiler/tests/fixtures/hello_world.jac +1 -1
  110. jaclang/compiler/tests/fixtures/pkg_import_lib/__init__.jac +1 -0
  111. jaclang/compiler/tests/fixtures/pkg_import_lib/sub/__init__.jac +1 -0
  112. jaclang/compiler/tests/fixtures/pkg_import_lib/sub/helper.jac +3 -0
  113. jaclang/compiler/tests/fixtures/pkg_import_lib/tools.jac +3 -0
  114. jaclang/compiler/tests/fixtures/pkg_import_lib_py/__init__.py +11 -0
  115. jaclang/compiler/tests/fixtures/pkg_import_lib_py/sub/__init__.py +7 -0
  116. jaclang/compiler/tests/fixtures/pkg_import_lib_py/sub/helper.jac +3 -0
  117. jaclang/compiler/tests/fixtures/pkg_import_lib_py/tools.jac +3 -0
  118. jaclang/compiler/tests/fixtures/pkg_import_main.jac +10 -0
  119. jaclang/compiler/tests/fixtures/pkg_import_main_py.jac +11 -0
  120. jaclang/compiler/tests/fixtures/staticcheck.jac +2 -2
  121. jaclang/compiler/tests/test_importer.py +41 -16
  122. jaclang/compiler/tests/test_parser.py +39 -17
  123. jaclang/compiler/{absyntree.py → unitree.py} +1521 -1261
  124. jaclang/langserve/engine.jac +498 -0
  125. jaclang/langserve/sem_manager.jac +309 -0
  126. jaclang/langserve/server.jac +186 -0
  127. jaclang/langserve/tests/fixtures/base_module_structure.jac +7 -7
  128. jaclang/langserve/tests/fixtures/circle.jac +6 -6
  129. jaclang/langserve/tests/fixtures/circle_err.jac +6 -6
  130. jaclang/langserve/tests/fixtures/circle_pure.impl.jac +5 -5
  131. jaclang/langserve/tests/fixtures/circle_pure.jac +7 -7
  132. jaclang/langserve/tests/fixtures/circle_pure_err.impl.jac +2 -2
  133. jaclang/langserve/tests/fixtures/circle_pure_err.jac +7 -7
  134. jaclang/langserve/tests/fixtures/import_include_statements.jac +6 -6
  135. jaclang/langserve/tests/fixtures/rename.jac +6 -6
  136. jaclang/langserve/tests/server_test/test_lang_serve.py +261 -0
  137. jaclang/langserve/tests/server_test/utils.py +118 -0
  138. jaclang/langserve/tests/session.jac +294 -0
  139. jaclang/langserve/tests/test_sem_tokens.py +4 -4
  140. jaclang/langserve/tests/test_server.py +53 -30
  141. jaclang/langserve/utils.jac +459 -0
  142. jaclang/runtimelib/{architype.py → archetype.py} +86 -62
  143. jaclang/runtimelib/builtin.py +95 -0
  144. jaclang/runtimelib/constructs.py +11 -13
  145. jaclang/runtimelib/importer.py +83 -53
  146. jaclang/runtimelib/machine.py +1592 -144
  147. jaclang/runtimelib/memory.py +6 -6
  148. jaclang/{plugin → runtimelib}/tests/fixtures/graph_purger.jac +1 -1
  149. jaclang/{plugin → runtimelib}/tests/fixtures/impl_match.jac +2 -2
  150. jaclang/runtimelib/tests/fixtures/impl_match_impl.jac +3 -0
  151. jaclang/{plugin → runtimelib}/tests/fixtures/other_root_access.jac +7 -7
  152. jaclang/{plugin → runtimelib}/tests/fixtures/savable_object.jac +3 -5
  153. jaclang/{plugin → runtimelib}/tests/fixtures/simple_node_connection.jac +6 -6
  154. jaclang/{plugin → runtimelib}/tests/fixtures/simple_persistent.jac +1 -1
  155. jaclang/{plugin → runtimelib}/tests/fixtures/traversing_save.jac +7 -5
  156. jaclang/runtimelib/tests/test_features.py +72 -0
  157. jaclang/{plugin → runtimelib}/tests/test_jaseci.py +6 -5
  158. jaclang/runtimelib/utils.py +34 -66
  159. jaclang/settings.py +1 -6
  160. jaclang/tests/fixtures/{abc.jac → abc_check.jac} +6 -6
  161. jaclang/tests/fixtures/arch_rel_import_creation.jac +4 -4
  162. jaclang/tests/fixtures/async_ability.jac +18 -0
  163. jaclang/tests/fixtures/async_walker.jac +23 -0
  164. jaclang/tests/fixtures/backward_edge_visit.jac +31 -0
  165. jaclang/tests/fixtures/baddy.jac +1 -1
  166. jaclang/tests/fixtures/base_class1.jac +2 -2
  167. jaclang/tests/fixtures/base_class2.jac +2 -2
  168. jaclang/tests/fixtures/base_class_complex_expr.jac +3 -3
  169. jaclang/tests/fixtures/builtin_printgraph.jac +85 -0
  170. jaclang/tests/fixtures/builtin_printgraph_json.jac +21 -0
  171. jaclang/tests/fixtures/builtin_printgraph_mermaid.jac +16 -0
  172. jaclang/tests/fixtures/byllmissue.jac +1 -1
  173. jaclang/tests/fixtures/chandra_bugs.jac +1 -1
  174. jaclang/tests/fixtures/chandra_bugs2.jac +21 -14
  175. jaclang/tests/fixtures/cls_method.jac +6 -6
  176. jaclang/tests/fixtures/concurrency.jac +39 -0
  177. jaclang/tests/fixtures/connect_traverse_syntax.jac +18 -0
  178. jaclang/tests/fixtures/create_dynamic_archetype.jac +35 -0
  179. jaclang/tests/fixtures/decl_defn_param_name.jac +4 -4
  180. jaclang/tests/fixtures/deep/deeper/__init__.jac +1 -0
  181. jaclang/tests/fixtures/deep/deeper/deep_outer_import.jac +2 -3
  182. jaclang/tests/fixtures/deep/deeper/deep_outer_import2.jac +3 -3
  183. jaclang/tests/fixtures/deep/deeper/snd_lev.jac +2 -2
  184. jaclang/tests/fixtures/deep/mycode.jac +1 -1
  185. jaclang/tests/fixtures/deep/one_lev.jac +3 -4
  186. jaclang/tests/fixtures/deep/one_lev_dup.jac +2 -2
  187. jaclang/tests/fixtures/deep_convert.jac +1 -1
  188. jaclang/tests/fixtures/deep_import.jac +2 -2
  189. jaclang/tests/fixtures/deep_import_interp.jac +8 -0
  190. jaclang/tests/fixtures/deep_import_mods.jac +3 -3
  191. jaclang/tests/fixtures/deferred_field.jac +1 -1
  192. jaclang/tests/fixtures/del_clean.jac +7 -0
  193. jaclang/tests/fixtures/disconn.jac +2 -2
  194. jaclang/tests/fixtures/dynamic_archetype.jac +34 -0
  195. jaclang/tests/fixtures/edge_ability.jac +49 -0
  196. jaclang/tests/fixtures/edge_node_walk.jac +12 -12
  197. jaclang/tests/fixtures/edge_ops.jac +7 -7
  198. jaclang/tests/fixtures/edges_walk.jac +10 -10
  199. jaclang/tests/fixtures/edgetypeissue.jac +1 -1
  200. jaclang/tests/fixtures/enum_inside_archtype.jac +4 -4
  201. jaclang/tests/fixtures/err.impl.jac +1 -1
  202. jaclang/tests/fixtures/err.jac +2 -2
  203. jaclang/tests/fixtures/err_runtime.jac +2 -2
  204. jaclang/tests/fixtures/foo.jac +7 -7
  205. jaclang/tests/fixtures/game1.jac +4 -4
  206. jaclang/tests/fixtures/gendot_bubble_sort.jac +4 -4
  207. jaclang/tests/fixtures/glob_multivar_statement.jac +1 -1
  208. jaclang/tests/fixtures/guess_game.jac +6 -6
  209. jaclang/tests/fixtures/has_goodness.jac +1 -1
  210. jaclang/tests/fixtures/hash_init_check.jac +3 -3
  211. jaclang/tests/fixtures/hello.jac +1 -1
  212. jaclang/tests/fixtures/here_usage_error.jac +21 -0
  213. jaclang/tests/fixtures/here_visitor_usage.jac +21 -0
  214. jaclang/tests/fixtures/ignore.jac +3 -3
  215. jaclang/tests/fixtures/ignore_dup.jac +3 -3
  216. jaclang/tests/fixtures/impl_match_confused.impl.jac +1 -1
  217. jaclang/tests/fixtures/import.jac +9 -9
  218. jaclang/tests/fixtures/import_all.jac +1 -1
  219. jaclang/tests/fixtures/index_slice.jac +1 -1
  220. jaclang/tests/fixtures/inherit_check.jac +3 -3
  221. jaclang/tests/fixtures/jac_from_py.py +4 -0
  222. jaclang/tests/fixtures/jacsamp.jac +1 -1
  223. jaclang/tests/fixtures/jactest_main.jac +1 -1
  224. jaclang/tests/fixtures/jp_importer.jac +7 -8
  225. jaclang/tests/fixtures/jp_importer_auto.jac +3 -3
  226. jaclang/tests/fixtures/lambda.jac +2 -2
  227. jaclang/tests/fixtures/needs_import.jac +6 -6
  228. jaclang/tests/fixtures/needs_import_1.jac +1 -1
  229. jaclang/tests/fixtures/needs_import_2.jac +1 -1
  230. jaclang/tests/fixtures/needs_import_3.jac +1 -1
  231. jaclang/tests/fixtures/needs_import_dup.jac +6 -6
  232. jaclang/tests/fixtures/node_del.jac +54 -0
  233. jaclang/tests/fixtures/nosigself.jac +3 -3
  234. jaclang/tests/fixtures/py2jac.py +30 -0
  235. jaclang/tests/fixtures/py_bool_expr.py +7 -0
  236. jaclang/tests/fixtures/py_namedexpr.py +7 -0
  237. jaclang/tests/fixtures/pyfunc_3.py +0 -2
  238. jaclang/tests/fixtures/random_check.jac +5 -5
  239. jaclang/tests/fixtures/simple_archs.jac +2 -2
  240. jaclang/tests/fixtures/simple_walk.jac +52 -0
  241. jaclang/tests/fixtures/slice_vals.jac +3 -3
  242. jaclang/tests/fixtures/sub_abil_sep.jac +3 -3
  243. jaclang/tests/fixtures/sub_abil_sep_multilev.jac +3 -3
  244. jaclang/tests/fixtures/trailing_comma.jac +4 -4
  245. jaclang/tests/fixtures/type_info.jac +5 -5
  246. jaclang/{compiler/passes/main/tests → tests}/fixtures/uninitialized_hasvars.jac +1 -1
  247. jaclang/tests/fixtures/visit_order.jac +4 -4
  248. jaclang/tests/fixtures/visit_traversal.jac +47 -0
  249. jaclang/tests/fixtures/walker_override.jac +2 -2
  250. jaclang/tests/fixtures/walker_update.jac +5 -5
  251. jaclang/tests/fixtures/with_context.jac +4 -4
  252. jaclang/tests/test_bugs.py +2 -2
  253. jaclang/tests/test_cli.py +127 -227
  254. jaclang/tests/test_language.py +542 -474
  255. jaclang/tests/test_man_code.py +2 -2
  256. jaclang/tests/test_reference.py +4 -4
  257. jaclang/tests/test_settings.py +16 -16
  258. jaclang/tests/test_typecheck.py +555 -0
  259. jaclang/utils/__init__.py +4 -0
  260. jaclang/utils/helpers.py +24 -31
  261. jaclang/utils/lang_tools.py +84 -75
  262. jaclang/utils/module_resolver.py +69 -0
  263. jaclang/utils/test.py +8 -5
  264. jaclang/utils/tests/test_lang_tools.py +40 -14
  265. jaclang/utils/treeprinter.py +178 -42
  266. jaclang/vendor/__init__.py +1 -2
  267. jaclang/vendor/attr/__init__.py +14 -44
  268. jaclang/vendor/attr/__init__.pyi +155 -321
  269. jaclang/vendor/attr/_cmp.py +25 -15
  270. jaclang/vendor/attr/_cmp.pyi +7 -7
  271. jaclang/vendor/attr/_compat.py +15 -8
  272. jaclang/vendor/attr/_config.py +1 -1
  273. jaclang/vendor/attr/_funcs.py +148 -163
  274. jaclang/vendor/attr/_make.py +859 -855
  275. jaclang/vendor/attr/_next_gen.py +426 -32
  276. jaclang/vendor/attr/converters.py +67 -49
  277. jaclang/vendor/attr/converters.pyi +13 -7
  278. jaclang/vendor/attr/filters.py +17 -11
  279. jaclang/vendor/attr/filters.pyi +3 -3
  280. jaclang/vendor/attr/setters.py +11 -5
  281. jaclang/vendor/attr/setters.pyi +2 -1
  282. jaclang/vendor/attr/validators.py +191 -162
  283. jaclang/vendor/attr/validators.pyi +25 -27
  284. jaclang/vendor/attrs/__init__.py +9 -5
  285. jaclang/vendor/attrs/__init__.pyi +225 -29
  286. jaclang/vendor/attrs-25.3.0.dist-info/INSTALLER +1 -0
  287. jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/METADATA +83 -53
  288. jaclang/vendor/attrs-25.3.0.dist-info/RECORD +56 -0
  289. jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/WHEEL +1 -1
  290. jaclang/vendor/bin/dmypy +8 -0
  291. jaclang/vendor/bin/mypy +8 -0
  292. jaclang/vendor/bin/mypyc +8 -0
  293. jaclang/vendor/bin/stubgen +8 -0
  294. jaclang/vendor/bin/stubtest +8 -0
  295. jaclang/vendor/cattr/gen.py +2 -2
  296. jaclang/vendor/cattr/preconf/bson.py +1 -0
  297. jaclang/vendor/cattr/preconf/json.py +1 -0
  298. jaclang/vendor/cattr/preconf/msgpack.py +1 -0
  299. jaclang/vendor/cattr/preconf/orjson.py +1 -0
  300. jaclang/vendor/cattr/preconf/pyyaml.py +1 -0
  301. jaclang/vendor/cattr/preconf/tomlkit.py +1 -0
  302. jaclang/vendor/cattr/preconf/ujson.py +1 -0
  303. jaclang/vendor/cattrs/__init__.py +21 -21
  304. jaclang/vendor/cattrs/_compat.py +176 -62
  305. jaclang/vendor/cattrs/_generics.py +5 -3
  306. jaclang/vendor/cattrs/cols.py +289 -0
  307. jaclang/vendor/cattrs/converters.py +505 -187
  308. jaclang/vendor/cattrs/disambiguators.py +118 -45
  309. jaclang/vendor/cattrs/dispatch.py +66 -36
  310. jaclang/vendor/cattrs/fns.py +6 -1
  311. jaclang/vendor/cattrs/gen/__init__.py +365 -202
  312. jaclang/vendor/cattrs/gen/_generics.py +41 -5
  313. jaclang/vendor/cattrs/gen/_lc.py +3 -2
  314. jaclang/vendor/cattrs/gen/_shared.py +39 -32
  315. jaclang/vendor/cattrs/gen/typeddicts.py +75 -88
  316. jaclang/vendor/cattrs/preconf/__init__.py +20 -0
  317. jaclang/vendor/cattrs/preconf/bson.py +7 -8
  318. jaclang/vendor/cattrs/preconf/cbor2.py +3 -0
  319. jaclang/vendor/cattrs/preconf/json.py +8 -4
  320. jaclang/vendor/cattrs/preconf/msgpack.py +3 -0
  321. jaclang/vendor/cattrs/preconf/msgspec.py +185 -0
  322. jaclang/vendor/cattrs/preconf/orjson.py +20 -7
  323. jaclang/vendor/cattrs/preconf/pyyaml.py +15 -3
  324. jaclang/vendor/cattrs/preconf/tomlkit.py +3 -1
  325. jaclang/vendor/cattrs/preconf/ujson.py +3 -0
  326. jaclang/vendor/cattrs/strategies/__init__.py +1 -0
  327. jaclang/vendor/cattrs/strategies/_class_methods.py +1 -1
  328. jaclang/vendor/cattrs/strategies/_subclasses.py +43 -29
  329. jaclang/vendor/cattrs/strategies/_unions.py +47 -24
  330. jaclang/vendor/cattrs/v.py +1 -0
  331. jaclang/vendor/cattrs-24.1.3.dist-info/INSTALLER +1 -0
  332. jaclang/vendor/cattrs-24.1.3.dist-info/METADATA +161 -0
  333. jaclang/vendor/cattrs-24.1.3.dist-info/RECORD +96 -0
  334. jaclang/vendor/{cattrs-23.2.3.dist-info → cattrs-24.1.3.dist-info}/WHEEL +1 -1
  335. jaclang/vendor/lark/__init__.py +38 -38
  336. jaclang/vendor/lark/__pyinstaller/__init__.py +6 -6
  337. jaclang/vendor/lark/__pyinstaller/hook-lark.py +14 -14
  338. jaclang/vendor/lark/ast_utils.py +59 -59
  339. jaclang/vendor/lark/common.py +86 -89
  340. jaclang/vendor/lark/exceptions.py +292 -292
  341. jaclang/vendor/lark/grammar.py +130 -130
  342. jaclang/vendor/lark/grammars/common.lark +59 -59
  343. jaclang/vendor/lark/grammars/lark.lark +62 -62
  344. jaclang/vendor/lark/grammars/python.lark +302 -302
  345. jaclang/vendor/lark/grammars/unicode.lark +7 -7
  346. jaclang/vendor/lark/indenter.py +143 -112
  347. jaclang/vendor/lark/lark.py +658 -661
  348. jaclang/vendor/lark/lexer.py +678 -678
  349. jaclang/vendor/lark/load_grammar.py +1428 -1428
  350. jaclang/vendor/lark/parse_tree_builder.py +391 -391
  351. jaclang/vendor/lark/parser_frontends.py +257 -257
  352. jaclang/vendor/lark/parsers/cyk.py +340 -340
  353. jaclang/vendor/lark/parsers/earley.py +317 -308
  354. jaclang/vendor/lark/parsers/earley_common.py +42 -42
  355. jaclang/vendor/lark/parsers/earley_forest.py +802 -810
  356. jaclang/vendor/lark/parsers/grammar_analysis.py +203 -203
  357. jaclang/vendor/lark/parsers/lalr_analysis.py +332 -332
  358. jaclang/vendor/lark/parsers/lalr_interactive_parser.py +158 -157
  359. jaclang/vendor/lark/parsers/lalr_parser.py +122 -122
  360. jaclang/vendor/lark/parsers/lalr_parser_state.py +110 -110
  361. jaclang/vendor/lark/parsers/xearley.py +165 -165
  362. jaclang/vendor/lark/reconstruct.py +107 -107
  363. jaclang/vendor/lark/tools/__init__.py +70 -71
  364. jaclang/vendor/lark/tools/nearley.py +202 -202
  365. jaclang/vendor/lark/tools/serialize.py +32 -32
  366. jaclang/vendor/lark/tools/standalone.py +196 -196
  367. jaclang/vendor/lark/tree.py +267 -272
  368. jaclang/vendor/lark/tree_matcher.py +186 -186
  369. jaclang/vendor/lark/utils.py +346 -361
  370. jaclang/vendor/lark/visitors.py +596 -593
  371. jaclang/vendor/lark-1.2.2.dist-info/INSTALLER +1 -0
  372. jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/METADATA +48 -47
  373. jaclang/vendor/lark-1.2.2.dist-info/RECORD +83 -0
  374. jaclang/vendor/{mypy_extensions-1.0.0.dist-info → lark-1.2.2.dist-info}/WHEEL +1 -1
  375. jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info/licenses}/LICENSE +18 -18
  376. jaclang/vendor/lsprotocol-2023.0.1.dist-info/INSTALLER +1 -0
  377. jaclang/vendor/lsprotocol-2023.0.1.dist-info/METADATA +2 -1
  378. jaclang/vendor/lsprotocol-2023.0.1.dist-info/RECORD +17 -10
  379. jaclang/vendor/lsprotocol-2023.0.1.dist-info/WHEEL +1 -1
  380. jaclang/vendor/pluggy/_version.py +7 -2
  381. jaclang/vendor/pluggy-1.5.0.dist-info/INSTALLER +1 -0
  382. jaclang/vendor/pluggy-1.5.0.dist-info/METADATA +6 -5
  383. jaclang/vendor/pluggy-1.5.0.dist-info/RECORD +24 -14
  384. jaclang/vendor/pluggy-1.5.0.dist-info/WHEEL +1 -1
  385. jaclang/vendor/pygls-1.3.1.dist-info/INSTALLER +1 -0
  386. jaclang/vendor/pygls-1.3.1.dist-info/METADATA +2 -2
  387. jaclang/vendor/pygls-1.3.1.dist-info/RECORD +45 -24
  388. jaclang/vendor/pygls-1.3.1.dist-info/WHEEL +1 -1
  389. {jaclang-0.7.34.dist-info → jaclang-0.8.1.dist-info}/METADATA +2 -1
  390. jaclang-0.8.1.dist-info/RECORD +568 -0
  391. {jaclang-0.7.34.dist-info → jaclang-0.8.1.dist-info}/WHEEL +1 -1
  392. jaclang/compiler/.gitignore +0 -1
  393. jaclang/compiler/compile.py +0 -119
  394. jaclang/compiler/passes/main/access_modifier_pass.py +0 -130
  395. jaclang/compiler/passes/main/fuse_typeinfo_pass.py +0 -656
  396. jaclang/compiler/passes/main/py_collect_dep_pass.py +0 -78
  397. jaclang/compiler/passes/main/pyout_pass.py +0 -86
  398. jaclang/compiler/passes/main/registry_pass.py +0 -156
  399. jaclang/compiler/passes/main/schedules.py +0 -47
  400. jaclang/compiler/passes/main/sub_node_tab_pass.py +0 -36
  401. jaclang/compiler/passes/main/tests/fixtures/registry.jac +0 -36
  402. jaclang/compiler/passes/main/tests/test_decl_def_match_pass.py +0 -114
  403. jaclang/compiler/passes/main/tests/test_registry_pass.py +0 -31
  404. jaclang/compiler/passes/main/tests/test_type_check_pass.py +0 -91
  405. jaclang/compiler/passes/main/tests/test_typeinfo_pass.py +0 -29
  406. jaclang/compiler/passes/main/type_check_pass.py +0 -128
  407. jaclang/compiler/passes/tool/schedules.py +0 -18
  408. jaclang/compiler/passes/tool/tests/fixtures/genai/essay_review.jac +0 -36
  409. jaclang/compiler/passes/tool/tests/fixtures/genai/expert_answer.jac +0 -17
  410. jaclang/compiler/passes/tool/tests/fixtures/genai/joke_gen.jac +0 -32
  411. jaclang/compiler/passes/tool/tests/fixtures/genai/odd_word_out.jac +0 -27
  412. jaclang/compiler/passes/tool/tests/fixtures/genai/personality_finder.jac +0 -35
  413. jaclang/compiler/passes/tool/tests/fixtures/genai/text_to_type.jac +0 -25
  414. jaclang/compiler/passes/tool/tests/fixtures/genai/translator.jac +0 -13
  415. jaclang/compiler/passes/tool/tests/fixtures/genai/wikipedia.jac +0 -63
  416. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/architype_test.jac +0 -13
  417. jaclang/compiler/passes/utils/mypy_ast_build.py +0 -940
  418. jaclang/compiler/py_info.py +0 -22
  419. jaclang/compiler/semtable.py +0 -159
  420. jaclang/compiler/symtable.py +0 -297
  421. jaclang/langserve/engine.py +0 -541
  422. jaclang/langserve/sem_manager.py +0 -379
  423. jaclang/langserve/server.py +0 -176
  424. jaclang/langserve/tests/session.py +0 -255
  425. jaclang/langserve/utils.py +0 -458
  426. jaclang/plugin/__init__.py +0 -7
  427. jaclang/plugin/builtin.py +0 -57
  428. jaclang/plugin/default.py +0 -1443
  429. jaclang/plugin/feature.py +0 -574
  430. jaclang/plugin/plugin.md +0 -471
  431. jaclang/plugin/spec.py +0 -536
  432. jaclang/plugin/tests/fixtures/impl_match_impl.jac +0 -3
  433. jaclang/plugin/tests/test_features.py +0 -56
  434. jaclang/runtimelib/context.py +0 -191
  435. jaclang/tests/fixtures/builtin_dotgen.jac +0 -42
  436. jaclang/tests/fixtures/create_dynamic_architype.jac +0 -35
  437. jaclang/tests/fixtures/dynamic_architype.jac +0 -34
  438. jaclang/tests/fixtures/impl_grab.impl.jac +0 -5
  439. jaclang/tests/fixtures/mtest.impl.jac +0 -6
  440. jaclang/tests/fixtures/registry.jac +0 -58
  441. jaclang/tests/fixtures/semstr.jac +0 -30
  442. jaclang/tests/main.jac +0 -2
  443. jaclang/utils/profiler.py +0 -62
  444. jaclang/vendor/attrs-23.2.0.dist-info/RECORD +0 -35
  445. jaclang/vendor/cattrs-23.2.3.dist-info/METADATA +0 -221
  446. jaclang/vendor/cattrs-23.2.3.dist-info/RECORD +0 -48
  447. jaclang/vendor/lark-1.1.9.dist-info/RECORD +0 -46
  448. jaclang/vendor/lark-1.1.9.dist-info/WHEEL +0 -5
  449. jaclang/vendor/mypy/__init__.py +0 -1
  450. jaclang/vendor/mypy/__main__.py +0 -37
  451. jaclang/vendor/mypy/api.py +0 -94
  452. jaclang/vendor/mypy/applytype.py +0 -172
  453. jaclang/vendor/mypy/argmap.py +0 -268
  454. jaclang/vendor/mypy/binder.py +0 -538
  455. jaclang/vendor/mypy/bogus_type.py +0 -27
  456. jaclang/vendor/mypy/build.py +0 -3562
  457. jaclang/vendor/mypy/checker.py +0 -8445
  458. jaclang/vendor/mypy/checkexpr.py +0 -6623
  459. jaclang/vendor/mypy/checkmember.py +0 -1363
  460. jaclang/vendor/mypy/checkpattern.py +0 -801
  461. jaclang/vendor/mypy/checkstrformat.py +0 -1109
  462. jaclang/vendor/mypy/config_parser.py +0 -670
  463. jaclang/vendor/mypy/constant_fold.py +0 -187
  464. jaclang/vendor/mypy/constraints.py +0 -1636
  465. jaclang/vendor/mypy/copytype.py +0 -133
  466. jaclang/vendor/mypy/defaults.py +0 -46
  467. jaclang/vendor/mypy/dmypy/__main__.py +0 -6
  468. jaclang/vendor/mypy/dmypy/client.py +0 -749
  469. jaclang/vendor/mypy/dmypy_os.py +0 -42
  470. jaclang/vendor/mypy/dmypy_server.py +0 -1107
  471. jaclang/vendor/mypy/dmypy_util.py +0 -117
  472. jaclang/vendor/mypy/erasetype.py +0 -278
  473. jaclang/vendor/mypy/errorcodes.py +0 -291
  474. jaclang/vendor/mypy/errors.py +0 -1280
  475. jaclang/vendor/mypy/evalexpr.py +0 -205
  476. jaclang/vendor/mypy/expandtype.py +0 -524
  477. jaclang/vendor/mypy/exprtotype.py +0 -209
  478. jaclang/vendor/mypy/fastparse.py +0 -2147
  479. jaclang/vendor/mypy/find_sources.py +0 -243
  480. jaclang/vendor/mypy/fixup.py +0 -428
  481. jaclang/vendor/mypy/freetree.py +0 -23
  482. jaclang/vendor/mypy/fscache.py +0 -309
  483. jaclang/vendor/mypy/fswatcher.py +0 -106
  484. jaclang/vendor/mypy/gclogger.py +0 -47
  485. jaclang/vendor/mypy/git.py +0 -34
  486. jaclang/vendor/mypy/graph_utils.py +0 -112
  487. jaclang/vendor/mypy/indirection.py +0 -121
  488. jaclang/vendor/mypy/infer.py +0 -75
  489. jaclang/vendor/mypy/inspections.py +0 -627
  490. jaclang/vendor/mypy/ipc.py +0 -310
  491. jaclang/vendor/mypy/join.py +0 -871
  492. jaclang/vendor/mypy/literals.py +0 -306
  493. jaclang/vendor/mypy/lookup.py +0 -61
  494. jaclang/vendor/mypy/main.py +0 -1574
  495. jaclang/vendor/mypy/maptype.py +0 -106
  496. jaclang/vendor/mypy/meet.py +0 -1140
  497. jaclang/vendor/mypy/memprofile.py +0 -121
  498. jaclang/vendor/mypy/message_registry.py +0 -329
  499. jaclang/vendor/mypy/messages.py +0 -3186
  500. jaclang/vendor/mypy/metastore.py +0 -225
  501. jaclang/vendor/mypy/mixedtraverser.py +0 -112
  502. jaclang/vendor/mypy/modulefinder.py +0 -875
  503. jaclang/vendor/mypy/moduleinspect.py +0 -184
  504. jaclang/vendor/mypy/mro.py +0 -62
  505. jaclang/vendor/mypy/nodes.py +0 -4115
  506. jaclang/vendor/mypy/operators.py +0 -126
  507. jaclang/vendor/mypy/options.py +0 -556
  508. jaclang/vendor/mypy/parse.py +0 -30
  509. jaclang/vendor/mypy/partially_defined.py +0 -675
  510. jaclang/vendor/mypy/patterns.py +0 -150
  511. jaclang/vendor/mypy/plugin.py +0 -901
  512. jaclang/vendor/mypy/plugins/attrs.py +0 -1166
  513. jaclang/vendor/mypy/plugins/common.py +0 -440
  514. jaclang/vendor/mypy/plugins/ctypes.py +0 -245
  515. jaclang/vendor/mypy/plugins/dataclasses.py +0 -1108
  516. jaclang/vendor/mypy/plugins/default.py +0 -531
  517. jaclang/vendor/mypy/plugins/enums.py +0 -259
  518. jaclang/vendor/mypy/plugins/functools.py +0 -104
  519. jaclang/vendor/mypy/plugins/proper_plugin.py +0 -175
  520. jaclang/vendor/mypy/plugins/singledispatch.py +0 -224
  521. jaclang/vendor/mypy/py.typed +0 -1
  522. jaclang/vendor/mypy/pyinfo.py +0 -78
  523. jaclang/vendor/mypy/reachability.py +0 -362
  524. jaclang/vendor/mypy/refinfo.py +0 -92
  525. jaclang/vendor/mypy/renaming.py +0 -568
  526. jaclang/vendor/mypy/report.py +0 -924
  527. jaclang/vendor/mypy/scope.py +0 -125
  528. jaclang/vendor/mypy/semanal.py +0 -7187
  529. jaclang/vendor/mypy/semanal_classprop.py +0 -187
  530. jaclang/vendor/mypy/semanal_enum.py +0 -253
  531. jaclang/vendor/mypy/semanal_infer.py +0 -128
  532. jaclang/vendor/mypy/semanal_main.py +0 -511
  533. jaclang/vendor/mypy/semanal_namedtuple.py +0 -670
  534. jaclang/vendor/mypy/semanal_newtype.py +0 -273
  535. jaclang/vendor/mypy/semanal_pass1.py +0 -156
  536. jaclang/vendor/mypy/semanal_shared.py +0 -490
  537. jaclang/vendor/mypy/semanal_typeargs.py +0 -265
  538. jaclang/vendor/mypy/semanal_typeddict.py +0 -575
  539. jaclang/vendor/mypy/server/astdiff.py +0 -518
  540. jaclang/vendor/mypy/server/astmerge.py +0 -562
  541. jaclang/vendor/mypy/server/aststrip.py +0 -281
  542. jaclang/vendor/mypy/server/deps.py +0 -1137
  543. jaclang/vendor/mypy/server/mergecheck.py +0 -83
  544. jaclang/vendor/mypy/server/objgraph.py +0 -101
  545. jaclang/vendor/mypy/server/subexpr.py +0 -198
  546. jaclang/vendor/mypy/server/target.py +0 -11
  547. jaclang/vendor/mypy/server/trigger.py +0 -26
  548. jaclang/vendor/mypy/server/update.py +0 -1339
  549. jaclang/vendor/mypy/sharedparse.py +0 -112
  550. jaclang/vendor/mypy/solve.py +0 -562
  551. jaclang/vendor/mypy/split_namespace.py +0 -35
  552. jaclang/vendor/mypy/state.py +0 -28
  553. jaclang/vendor/mypy/stats.py +0 -489
  554. jaclang/vendor/mypy/strconv.py +0 -641
  555. jaclang/vendor/mypy/stubdoc.py +0 -491
  556. jaclang/vendor/mypy/stubgen.py +0 -1886
  557. jaclang/vendor/mypy/stubgenc.py +0 -993
  558. jaclang/vendor/mypy/stubinfo.py +0 -173
  559. jaclang/vendor/mypy/stubtest.py +0 -2079
  560. jaclang/vendor/mypy/stubutil.py +0 -834
  561. jaclang/vendor/mypy/subtypes.py +0 -1980
  562. jaclang/vendor/mypy/suggestions.py +0 -1046
  563. jaclang/vendor/mypy/test/config.py +0 -28
  564. jaclang/vendor/mypy/test/data.py +0 -821
  565. jaclang/vendor/mypy/test/helpers.py +0 -476
  566. jaclang/vendor/mypy/test/meta/_pytest.py +0 -72
  567. jaclang/vendor/mypy/test/meta/test_diff_helper.py +0 -47
  568. jaclang/vendor/mypy/test/meta/test_parse_data.py +0 -73
  569. jaclang/vendor/mypy/test/meta/test_update_data.py +0 -135
  570. jaclang/vendor/mypy/test/test_find_sources.py +0 -376
  571. jaclang/vendor/mypy/test/test_ref_info.py +0 -45
  572. jaclang/vendor/mypy/test/testapi.py +0 -45
  573. jaclang/vendor/mypy/test/testargs.py +0 -77
  574. jaclang/vendor/mypy/test/testcheck.py +0 -322
  575. jaclang/vendor/mypy/test/testcmdline.py +0 -152
  576. jaclang/vendor/mypy/test/testconstraints.py +0 -134
  577. jaclang/vendor/mypy/test/testdaemon.py +0 -132
  578. jaclang/vendor/mypy/test/testdeps.py +0 -77
  579. jaclang/vendor/mypy/test/testdiff.py +0 -67
  580. jaclang/vendor/mypy/test/testerrorstream.py +0 -46
  581. jaclang/vendor/mypy/test/testfinegrained.py +0 -438
  582. jaclang/vendor/mypy/test/testfinegrainedcache.py +0 -18
  583. jaclang/vendor/mypy/test/testformatter.py +0 -85
  584. jaclang/vendor/mypy/test/testfscache.py +0 -101
  585. jaclang/vendor/mypy/test/testgraph.py +0 -83
  586. jaclang/vendor/mypy/test/testinfer.py +0 -373
  587. jaclang/vendor/mypy/test/testipc.py +0 -119
  588. jaclang/vendor/mypy/test/testmerge.py +0 -238
  589. jaclang/vendor/mypy/test/testmodulefinder.py +0 -278
  590. jaclang/vendor/mypy/test/testmypyc.py +0 -14
  591. jaclang/vendor/mypy/test/testparse.py +0 -107
  592. jaclang/vendor/mypy/test/testpep561.py +0 -211
  593. jaclang/vendor/mypy/test/testpythoneval.py +0 -117
  594. jaclang/vendor/mypy/test/testreports.py +0 -55
  595. jaclang/vendor/mypy/test/testsemanal.py +0 -209
  596. jaclang/vendor/mypy/test/testsolve.py +0 -285
  597. jaclang/vendor/mypy/test/teststubgen.py +0 -1412
  598. jaclang/vendor/mypy/test/teststubinfo.py +0 -12
  599. jaclang/vendor/mypy/test/teststubtest.py +0 -2492
  600. jaclang/vendor/mypy/test/testsubtypes.py +0 -303
  601. jaclang/vendor/mypy/test/testtransform.py +0 -64
  602. jaclang/vendor/mypy/test/testtypegen.py +0 -83
  603. jaclang/vendor/mypy/test/testtypes.py +0 -1551
  604. jaclang/vendor/mypy/test/testutil.py +0 -111
  605. jaclang/vendor/mypy/test/typefixture.py +0 -415
  606. jaclang/vendor/mypy/test/update_data.py +0 -87
  607. jaclang/vendor/mypy/test/visitors.py +0 -63
  608. jaclang/vendor/mypy/traverser.py +0 -961
  609. jaclang/vendor/mypy/treetransform.py +0 -800
  610. jaclang/vendor/mypy/tvar_scope.py +0 -169
  611. jaclang/vendor/mypy/type_visitor.py +0 -564
  612. jaclang/vendor/mypy/typeanal.py +0 -2596
  613. jaclang/vendor/mypy/typeops.py +0 -1082
  614. jaclang/vendor/mypy/types.py +0 -3708
  615. jaclang/vendor/mypy/types_utils.py +0 -166
  616. jaclang/vendor/mypy/typeshed/LICENSE +0 -237
  617. jaclang/vendor/mypy/typeshed/stdlib/VERSIONS +0 -309
  618. jaclang/vendor/mypy/typeshed/stdlib/__future__.pyi +0 -36
  619. jaclang/vendor/mypy/typeshed/stdlib/__main__.pyi +0 -3
  620. jaclang/vendor/mypy/typeshed/stdlib/_ast.pyi +0 -591
  621. jaclang/vendor/mypy/typeshed/stdlib/_bisect.pyi +0 -84
  622. jaclang/vendor/mypy/typeshed/stdlib/_bootlocale.pyi +0 -1
  623. jaclang/vendor/mypy/typeshed/stdlib/_codecs.pyi +0 -133
  624. jaclang/vendor/mypy/typeshed/stdlib/_collections_abc.pyi +0 -94
  625. jaclang/vendor/mypy/typeshed/stdlib/_compat_pickle.pyi +0 -8
  626. jaclang/vendor/mypy/typeshed/stdlib/_compression.pyi +0 -25
  627. jaclang/vendor/mypy/typeshed/stdlib/_csv.pyi +0 -90
  628. jaclang/vendor/mypy/typeshed/stdlib/_ctypes.pyi +0 -207
  629. jaclang/vendor/mypy/typeshed/stdlib/_curses.pyi +0 -566
  630. jaclang/vendor/mypy/typeshed/stdlib/_decimal.pyi +0 -281
  631. jaclang/vendor/mypy/typeshed/stdlib/_dummy_thread.pyi +0 -33
  632. jaclang/vendor/mypy/typeshed/stdlib/_dummy_threading.pyi +0 -164
  633. jaclang/vendor/mypy/typeshed/stdlib/_heapq.pyi +0 -11
  634. jaclang/vendor/mypy/typeshed/stdlib/_imp.pyi +0 -28
  635. jaclang/vendor/mypy/typeshed/stdlib/_json.pyi +0 -49
  636. jaclang/vendor/mypy/typeshed/stdlib/_locale.pyi +0 -100
  637. jaclang/vendor/mypy/typeshed/stdlib/_lsprof.pyi +0 -35
  638. jaclang/vendor/mypy/typeshed/stdlib/_markupbase.pyi +0 -16
  639. jaclang/vendor/mypy/typeshed/stdlib/_msi.pyi +0 -92
  640. jaclang/vendor/mypy/typeshed/stdlib/_operator.pyi +0 -147
  641. jaclang/vendor/mypy/typeshed/stdlib/_osx_support.pyi +0 -34
  642. jaclang/vendor/mypy/typeshed/stdlib/_posixsubprocess.pyi +0 -33
  643. jaclang/vendor/mypy/typeshed/stdlib/_py_abc.pyi +0 -14
  644. jaclang/vendor/mypy/typeshed/stdlib/_pydecimal.pyi +0 -43
  645. jaclang/vendor/mypy/typeshed/stdlib/_random.pyi +0 -12
  646. jaclang/vendor/mypy/typeshed/stdlib/_sitebuiltins.pyi +0 -16
  647. jaclang/vendor/mypy/typeshed/stdlib/_socket.pyi +0 -803
  648. jaclang/vendor/mypy/typeshed/stdlib/_stat.pyi +0 -103
  649. jaclang/vendor/mypy/typeshed/stdlib/_thread.pyi +0 -59
  650. jaclang/vendor/mypy/typeshed/stdlib/_threading_local.pyi +0 -17
  651. jaclang/vendor/mypy/typeshed/stdlib/_tkinter.pyi +0 -121
  652. jaclang/vendor/mypy/typeshed/stdlib/_tracemalloc.pyi +0 -17
  653. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/__init__.pyi +0 -347
  654. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/dbapi.pyi +0 -37
  655. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/wsgi.pyi +0 -44
  656. jaclang/vendor/mypy/typeshed/stdlib/_typeshed/xml.pyi +0 -9
  657. jaclang/vendor/mypy/typeshed/stdlib/_warnings.pyi +0 -55
  658. jaclang/vendor/mypy/typeshed/stdlib/_weakref.pyi +0 -41
  659. jaclang/vendor/mypy/typeshed/stdlib/_weakrefset.pyi +0 -51
  660. jaclang/vendor/mypy/typeshed/stdlib/_winapi.pyi +0 -255
  661. jaclang/vendor/mypy/typeshed/stdlib/abc.pyi +0 -51
  662. jaclang/vendor/mypy/typeshed/stdlib/aifc.pyi +0 -91
  663. jaclang/vendor/mypy/typeshed/stdlib/antigravity.pyi +0 -3
  664. jaclang/vendor/mypy/typeshed/stdlib/argparse.pyi +0 -595
  665. jaclang/vendor/mypy/typeshed/stdlib/array.pyi +0 -92
  666. jaclang/vendor/mypy/typeshed/stdlib/ast.pyi +0 -277
  667. jaclang/vendor/mypy/typeshed/stdlib/asynchat.pyi +0 -21
  668. jaclang/vendor/mypy/typeshed/stdlib/asyncio/__init__.pyi +0 -41
  669. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_events.pyi +0 -440
  670. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_futures.pyi +0 -19
  671. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +0 -63
  672. jaclang/vendor/mypy/typeshed/stdlib/asyncio/base_tasks.pyi +0 -9
  673. jaclang/vendor/mypy/typeshed/stdlib/asyncio/constants.pyi +0 -20
  674. jaclang/vendor/mypy/typeshed/stdlib/asyncio/coroutines.pyi +0 -26
  675. jaclang/vendor/mypy/typeshed/stdlib/asyncio/events.pyi +0 -580
  676. jaclang/vendor/mypy/typeshed/stdlib/asyncio/exceptions.pyi +0 -43
  677. jaclang/vendor/mypy/typeshed/stdlib/asyncio/format_helpers.pyi +0 -20
  678. jaclang/vendor/mypy/typeshed/stdlib/asyncio/futures.pyi +0 -57
  679. jaclang/vendor/mypy/typeshed/stdlib/asyncio/locks.pyi +0 -121
  680. jaclang/vendor/mypy/typeshed/stdlib/asyncio/log.pyi +0 -3
  681. jaclang/vendor/mypy/typeshed/stdlib/asyncio/mixins.pyi +0 -9
  682. jaclang/vendor/mypy/typeshed/stdlib/asyncio/proactor_events.pyi +0 -64
  683. jaclang/vendor/mypy/typeshed/stdlib/asyncio/protocols.pyi +0 -34
  684. jaclang/vendor/mypy/typeshed/stdlib/asyncio/queues.pyi +0 -47
  685. jaclang/vendor/mypy/typeshed/stdlib/asyncio/runners.pyi +0 -32
  686. jaclang/vendor/mypy/typeshed/stdlib/asyncio/selector_events.pyi +0 -8
  687. jaclang/vendor/mypy/typeshed/stdlib/asyncio/sslproto.pyi +0 -165
  688. jaclang/vendor/mypy/typeshed/stdlib/asyncio/staggered.pyi +0 -10
  689. jaclang/vendor/mypy/typeshed/stdlib/asyncio/streams.pyi +0 -153
  690. jaclang/vendor/mypy/typeshed/stdlib/asyncio/subprocess.pyi +0 -229
  691. jaclang/vendor/mypy/typeshed/stdlib/asyncio/taskgroups.pyi +0 -25
  692. jaclang/vendor/mypy/typeshed/stdlib/asyncio/tasks.pyi +0 -497
  693. jaclang/vendor/mypy/typeshed/stdlib/asyncio/threads.pyi +0 -9
  694. jaclang/vendor/mypy/typeshed/stdlib/asyncio/timeouts.pyi +0 -19
  695. jaclang/vendor/mypy/typeshed/stdlib/asyncio/transports.pyi +0 -47
  696. jaclang/vendor/mypy/typeshed/stdlib/asyncio/trsock.pyi +0 -94
  697. jaclang/vendor/mypy/typeshed/stdlib/asyncio/unix_events.pyi +0 -196
  698. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_events.pyi +0 -85
  699. jaclang/vendor/mypy/typeshed/stdlib/asyncio/windows_utils.pyi +0 -49
  700. jaclang/vendor/mypy/typeshed/stdlib/asyncore.pyi +0 -90
  701. jaclang/vendor/mypy/typeshed/stdlib/atexit.pyi +0 -12
  702. jaclang/vendor/mypy/typeshed/stdlib/audioop.pyi +0 -43
  703. jaclang/vendor/mypy/typeshed/stdlib/base64.pyi +0 -59
  704. jaclang/vendor/mypy/typeshed/stdlib/bdb.pyi +0 -102
  705. jaclang/vendor/mypy/typeshed/stdlib/binascii.pyi +0 -36
  706. jaclang/vendor/mypy/typeshed/stdlib/binhex.pyi +0 -45
  707. jaclang/vendor/mypy/typeshed/stdlib/bisect.pyi +0 -4
  708. jaclang/vendor/mypy/typeshed/stdlib/builtins.pyi +0 -1936
  709. jaclang/vendor/mypy/typeshed/stdlib/bz2.pyi +0 -146
  710. jaclang/vendor/mypy/typeshed/stdlib/cProfile.pyi +0 -31
  711. jaclang/vendor/mypy/typeshed/stdlib/calendar.pyi +0 -208
  712. jaclang/vendor/mypy/typeshed/stdlib/cgi.pyi +0 -118
  713. jaclang/vendor/mypy/typeshed/stdlib/cgitb.pyi +0 -32
  714. jaclang/vendor/mypy/typeshed/stdlib/chunk.pyi +0 -20
  715. jaclang/vendor/mypy/typeshed/stdlib/cmath.pyi +0 -36
  716. jaclang/vendor/mypy/typeshed/stdlib/cmd.pyi +0 -45
  717. jaclang/vendor/mypy/typeshed/stdlib/code.pyi +0 -33
  718. jaclang/vendor/mypy/typeshed/stdlib/codecs.pyi +0 -285
  719. jaclang/vendor/mypy/typeshed/stdlib/codeop.pyi +0 -13
  720. jaclang/vendor/mypy/typeshed/stdlib/collections/__init__.pyi +0 -485
  721. jaclang/vendor/mypy/typeshed/stdlib/collections/abc.pyi +0 -2
  722. jaclang/vendor/mypy/typeshed/stdlib/colorsys.pyi +0 -13
  723. jaclang/vendor/mypy/typeshed/stdlib/compileall.pyi +0 -111
  724. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +0 -32
  725. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/_base.pyi +0 -126
  726. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/process.pyi +0 -233
  727. jaclang/vendor/mypy/typeshed/stdlib/concurrent/futures/thread.pyi +0 -80
  728. jaclang/vendor/mypy/typeshed/stdlib/configparser.pyi +0 -313
  729. jaclang/vendor/mypy/typeshed/stdlib/contextlib.pyi +0 -208
  730. jaclang/vendor/mypy/typeshed/stdlib/contextvars.pyi +0 -63
  731. jaclang/vendor/mypy/typeshed/stdlib/copy.pyi +0 -16
  732. jaclang/vendor/mypy/typeshed/stdlib/copyreg.pyi +0 -21
  733. jaclang/vendor/mypy/typeshed/stdlib/crypt.pyi +0 -12
  734. jaclang/vendor/mypy/typeshed/stdlib/csv.pyi +0 -147
  735. jaclang/vendor/mypy/typeshed/stdlib/ctypes/__init__.pyi +0 -187
  736. jaclang/vendor/mypy/typeshed/stdlib/ctypes/_endian.pyi +0 -19
  737. jaclang/vendor/mypy/typeshed/stdlib/ctypes/util.pyi +0 -6
  738. jaclang/vendor/mypy/typeshed/stdlib/ctypes/wintypes.pyi +0 -298
  739. jaclang/vendor/mypy/typeshed/stdlib/curses/__init__.pyi +0 -22
  740. jaclang/vendor/mypy/typeshed/stdlib/curses/ascii.pyi +0 -62
  741. jaclang/vendor/mypy/typeshed/stdlib/curses/has_key.pyi +0 -1
  742. jaclang/vendor/mypy/typeshed/stdlib/curses/panel.pyi +0 -22
  743. jaclang/vendor/mypy/typeshed/stdlib/curses/textpad.pyi +0 -11
  744. jaclang/vendor/mypy/typeshed/stdlib/dataclasses.pyi +0 -315
  745. jaclang/vendor/mypy/typeshed/stdlib/datetime.pyi +0 -295
  746. jaclang/vendor/mypy/typeshed/stdlib/dbm/__init__.pyi +0 -95
  747. jaclang/vendor/mypy/typeshed/stdlib/dbm/dumb.pyi +0 -31
  748. jaclang/vendor/mypy/typeshed/stdlib/dbm/gnu.pyi +0 -41
  749. jaclang/vendor/mypy/typeshed/stdlib/dbm/ndbm.pyi +0 -37
  750. jaclang/vendor/mypy/typeshed/stdlib/decimal.pyi +0 -2
  751. jaclang/vendor/mypy/typeshed/stdlib/difflib.pyi +0 -140
  752. jaclang/vendor/mypy/typeshed/stdlib/dis.pyi +0 -144
  753. jaclang/vendor/mypy/typeshed/stdlib/distutils/__init__.pyi +0 -5
  754. jaclang/vendor/mypy/typeshed/stdlib/distutils/archive_util.pyi +0 -20
  755. jaclang/vendor/mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +0 -3
  756. jaclang/vendor/mypy/typeshed/stdlib/distutils/ccompiler.pyi +0 -152
  757. jaclang/vendor/mypy/typeshed/stdlib/distutils/cmd.pyi +0 -66
  758. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist.pyi +0 -25
  759. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +0 -21
  760. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +0 -45
  761. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +0 -52
  762. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/bdist_wininst.pyi +0 -16
  763. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build.pyi +0 -31
  764. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_clib.pyi +0 -27
  765. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_ext.pyi +0 -50
  766. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_py.pyi +0 -44
  767. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +0 -24
  768. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/check.pyi +0 -39
  769. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/clean.pyi +0 -17
  770. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/config.pyi +0 -83
  771. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install.pyi +0 -63
  772. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_data.pyi +0 -19
  773. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +0 -18
  774. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_headers.pyi +0 -16
  775. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_lib.pyi +0 -25
  776. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +0 -18
  777. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/register.pyi +0 -18
  778. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/sdist.pyi +0 -42
  779. jaclang/vendor/mypy/typeshed/stdlib/distutils/command/upload.pyi +0 -17
  780. jaclang/vendor/mypy/typeshed/stdlib/distutils/config.pyi +0 -17
  781. jaclang/vendor/mypy/typeshed/stdlib/distutils/core.pyi +0 -57
  782. jaclang/vendor/mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +0 -20
  783. jaclang/vendor/mypy/typeshed/stdlib/distutils/debug.pyi +0 -1
  784. jaclang/vendor/mypy/typeshed/stdlib/distutils/dep_util.pyi +0 -3
  785. jaclang/vendor/mypy/typeshed/stdlib/distutils/dir_util.pyi +0 -13
  786. jaclang/vendor/mypy/typeshed/stdlib/distutils/dist.pyi +0 -146
  787. jaclang/vendor/mypy/typeshed/stdlib/distutils/errors.pyi +0 -19
  788. jaclang/vendor/mypy/typeshed/stdlib/distutils/extension.pyi +0 -36
  789. jaclang/vendor/mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +0 -34
  790. jaclang/vendor/mypy/typeshed/stdlib/distutils/file_util.pyi +0 -14
  791. jaclang/vendor/mypy/typeshed/stdlib/distutils/filelist.pyi +0 -50
  792. jaclang/vendor/mypy/typeshed/stdlib/distutils/log.pyi +0 -25
  793. jaclang/vendor/mypy/typeshed/stdlib/distutils/msvccompiler.pyi +0 -3
  794. jaclang/vendor/mypy/typeshed/stdlib/distutils/spawn.pyi +0 -2
  795. jaclang/vendor/mypy/typeshed/stdlib/distutils/sysconfig.pyi +0 -31
  796. jaclang/vendor/mypy/typeshed/stdlib/distutils/text_file.pyi +0 -21
  797. jaclang/vendor/mypy/typeshed/stdlib/distutils/unixccompiler.pyi +0 -3
  798. jaclang/vendor/mypy/typeshed/stdlib/distutils/util.pyi +0 -46
  799. jaclang/vendor/mypy/typeshed/stdlib/distutils/version.pyi +0 -36
  800. jaclang/vendor/mypy/typeshed/stdlib/doctest.pyi +0 -248
  801. jaclang/vendor/mypy/typeshed/stdlib/dummy_threading.pyi +0 -2
  802. jaclang/vendor/mypy/typeshed/stdlib/email/__init__.pyi +0 -29
  803. jaclang/vendor/mypy/typeshed/stdlib/email/_header_value_parser.pyi +0 -392
  804. jaclang/vendor/mypy/typeshed/stdlib/email/_policybase.pyi +0 -51
  805. jaclang/vendor/mypy/typeshed/stdlib/email/base64mime.pyi +0 -13
  806. jaclang/vendor/mypy/typeshed/stdlib/email/charset.pyi +0 -34
  807. jaclang/vendor/mypy/typeshed/stdlib/email/contentmanager.pyi +0 -11
  808. jaclang/vendor/mypy/typeshed/stdlib/email/encoders.pyi +0 -8
  809. jaclang/vendor/mypy/typeshed/stdlib/email/errors.pyi +0 -39
  810. jaclang/vendor/mypy/typeshed/stdlib/email/feedparser.pyi +0 -23
  811. jaclang/vendor/mypy/typeshed/stdlib/email/generator.pyi +0 -40
  812. jaclang/vendor/mypy/typeshed/stdlib/email/header.pyi +0 -31
  813. jaclang/vendor/mypy/typeshed/stdlib/email/headerregistry.pyi +0 -178
  814. jaclang/vendor/mypy/typeshed/stdlib/email/iterators.pyi +0 -12
  815. jaclang/vendor/mypy/typeshed/stdlib/email/message.pyi +0 -165
  816. jaclang/vendor/mypy/typeshed/stdlib/email/mime/application.pyi +0 -17
  817. jaclang/vendor/mypy/typeshed/stdlib/email/mime/audio.pyi +0 -17
  818. jaclang/vendor/mypy/typeshed/stdlib/email/mime/base.pyi +0 -8
  819. jaclang/vendor/mypy/typeshed/stdlib/email/mime/image.pyi +0 -17
  820. jaclang/vendor/mypy/typeshed/stdlib/email/mime/message.pyi +0 -8
  821. jaclang/vendor/mypy/typeshed/stdlib/email/mime/multipart.pyi +0 -18
  822. jaclang/vendor/mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +0 -5
  823. jaclang/vendor/mypy/typeshed/stdlib/email/mime/text.pyi +0 -9
  824. jaclang/vendor/mypy/typeshed/stdlib/email/parser.pyi +0 -26
  825. jaclang/vendor/mypy/typeshed/stdlib/email/policy.pyi +0 -38
  826. jaclang/vendor/mypy/typeshed/stdlib/email/quoprimime.pyi +0 -28
  827. jaclang/vendor/mypy/typeshed/stdlib/email/utils.pyi +0 -70
  828. jaclang/vendor/mypy/typeshed/stdlib/encodings/__init__.pyi +0 -10
  829. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8.pyi +0 -21
  830. jaclang/vendor/mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +0 -22
  831. jaclang/vendor/mypy/typeshed/stdlib/ensurepip/__init__.pyi +0 -12
  832. jaclang/vendor/mypy/typeshed/stdlib/enum.pyi +0 -320
  833. jaclang/vendor/mypy/typeshed/stdlib/errno.pyi +0 -222
  834. jaclang/vendor/mypy/typeshed/stdlib/faulthandler.pyi +0 -13
  835. jaclang/vendor/mypy/typeshed/stdlib/fcntl.pyi +0 -127
  836. jaclang/vendor/mypy/typeshed/stdlib/filecmp.pyi +0 -57
  837. jaclang/vendor/mypy/typeshed/stdlib/fileinput.pyi +0 -213
  838. jaclang/vendor/mypy/typeshed/stdlib/fnmatch.pyi +0 -9
  839. jaclang/vendor/mypy/typeshed/stdlib/formatter.pyi +0 -88
  840. jaclang/vendor/mypy/typeshed/stdlib/fractions.pyi +0 -150
  841. jaclang/vendor/mypy/typeshed/stdlib/ftplib.pyi +0 -178
  842. jaclang/vendor/mypy/typeshed/stdlib/functools.pyi +0 -213
  843. jaclang/vendor/mypy/typeshed/stdlib/gc.pyi +0 -37
  844. jaclang/vendor/mypy/typeshed/stdlib/genericpath.pyi +0 -52
  845. jaclang/vendor/mypy/typeshed/stdlib/getopt.pyi +0 -11
  846. jaclang/vendor/mypy/typeshed/stdlib/getpass.pyi +0 -8
  847. jaclang/vendor/mypy/typeshed/stdlib/gettext.pyi +0 -169
  848. jaclang/vendor/mypy/typeshed/stdlib/glob.pyi +0 -42
  849. jaclang/vendor/mypy/typeshed/stdlib/graphlib.pyi +0 -28
  850. jaclang/vendor/mypy/typeshed/stdlib/grp.pyi +0 -22
  851. jaclang/vendor/mypy/typeshed/stdlib/gzip.pyi +0 -160
  852. jaclang/vendor/mypy/typeshed/stdlib/hashlib.pyi +0 -167
  853. jaclang/vendor/mypy/typeshed/stdlib/heapq.pyi +0 -17
  854. jaclang/vendor/mypy/typeshed/stdlib/hmac.pyi +0 -38
  855. jaclang/vendor/mypy/typeshed/stdlib/html/__init__.pyi +0 -6
  856. jaclang/vendor/mypy/typeshed/stdlib/html/entities.pyi +0 -6
  857. jaclang/vendor/mypy/typeshed/stdlib/html/parser.pyi +0 -34
  858. jaclang/vendor/mypy/typeshed/stdlib/http/__init__.pyi +0 -105
  859. jaclang/vendor/mypy/typeshed/stdlib/http/client.pyi +0 -259
  860. jaclang/vendor/mypy/typeshed/stdlib/http/cookiejar.pyi +0 -159
  861. jaclang/vendor/mypy/typeshed/stdlib/http/cookies.pyi +0 -60
  862. jaclang/vendor/mypy/typeshed/stdlib/http/server.pyi +0 -83
  863. jaclang/vendor/mypy/typeshed/stdlib/imaplib.pyi +0 -168
  864. jaclang/vendor/mypy/typeshed/stdlib/imghdr.pyi +0 -17
  865. jaclang/vendor/mypy/typeshed/stdlib/imp.pyi +0 -62
  866. jaclang/vendor/mypy/typeshed/stdlib/importlib/__init__.pyi +0 -24
  867. jaclang/vendor/mypy/typeshed/stdlib/importlib/_abc.pyi +0 -15
  868. jaclang/vendor/mypy/typeshed/stdlib/importlib/abc.pyi +0 -172
  869. jaclang/vendor/mypy/typeshed/stdlib/importlib/machinery.pyi +0 -179
  870. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +0 -285
  871. jaclang/vendor/mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +0 -49
  872. jaclang/vendor/mypy/typeshed/stdlib/importlib/readers.pyi +0 -68
  873. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/__init__.pyi +0 -46
  874. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/abc.pyi +0 -12
  875. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/readers.pyi +0 -14
  876. jaclang/vendor/mypy/typeshed/stdlib/importlib/resources/simple.pyi +0 -56
  877. jaclang/vendor/mypy/typeshed/stdlib/importlib/simple.pyi +0 -11
  878. jaclang/vendor/mypy/typeshed/stdlib/importlib/util.pyi +0 -43
  879. jaclang/vendor/mypy/typeshed/stdlib/inspect.pyi +0 -632
  880. jaclang/vendor/mypy/typeshed/stdlib/io.pyi +0 -238
  881. jaclang/vendor/mypy/typeshed/stdlib/ipaddress.pyi +0 -208
  882. jaclang/vendor/mypy/typeshed/stdlib/itertools.pyi +0 -273
  883. jaclang/vendor/mypy/typeshed/stdlib/json/__init__.pyi +0 -61
  884. jaclang/vendor/mypy/typeshed/stdlib/json/decoder.pyi +0 -32
  885. jaclang/vendor/mypy/typeshed/stdlib/json/encoder.pyi +0 -40
  886. jaclang/vendor/mypy/typeshed/stdlib/json/tool.pyi +0 -1
  887. jaclang/vendor/mypy/typeshed/stdlib/keyword.pyi +0 -21
  888. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +0 -28
  889. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +0 -42
  890. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +0 -8
  891. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +0 -10
  892. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +0 -8
  893. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +0 -8
  894. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +0 -16
  895. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +0 -14
  896. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +0 -8
  897. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +0 -8
  898. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +0 -13
  899. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +0 -9
  900. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +0 -8
  901. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +0 -8
  902. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +0 -8
  903. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +0 -8
  904. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +0 -15
  905. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +0 -16
  906. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +0 -21
  907. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +0 -6
  908. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +0 -11
  909. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +0 -9
  910. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +0 -8
  911. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +0 -9
  912. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +0 -7
  913. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +0 -7
  914. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +0 -9
  915. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +0 -17
  916. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +0 -10
  917. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +0 -8
  918. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +0 -19
  919. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +0 -8
  920. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +0 -8
  921. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +0 -12
  922. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +0 -8
  923. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +0 -12
  924. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +0 -8
  925. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +0 -8
  926. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +0 -8
  927. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +0 -9
  928. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +0 -17
  929. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +0 -8
  930. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +0 -7
  931. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +0 -8
  932. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +0 -9
  933. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +0 -8
  934. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +0 -17
  935. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +0 -8
  936. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +0 -12
  937. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +0 -15
  938. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +0 -12
  939. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +0 -20
  940. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +0 -8
  941. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +0 -9
  942. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/main.pyi +0 -42
  943. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +0 -9
  944. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +0 -27
  945. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +0 -24
  946. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +0 -7
  947. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +0 -30
  948. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +0 -50
  949. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +0 -67
  950. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +0 -96
  951. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pygram.pyi +0 -114
  952. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/pytree.pyi +0 -117
  953. jaclang/vendor/mypy/typeshed/stdlib/lib2to3/refactor.pyi +0 -82
  954. jaclang/vendor/mypy/typeshed/stdlib/linecache.pyi +0 -23
  955. jaclang/vendor/mypy/typeshed/stdlib/locale.pyi +0 -152
  956. jaclang/vendor/mypy/typeshed/stdlib/logging/__init__.pyi +0 -658
  957. jaclang/vendor/mypy/typeshed/stdlib/logging/config.pyi +0 -134
  958. jaclang/vendor/mypy/typeshed/stdlib/logging/handlers.pyi +0 -275
  959. jaclang/vendor/mypy/typeshed/stdlib/lzma.pyi +0 -197
  960. jaclang/vendor/mypy/typeshed/stdlib/mailbox.pyi +0 -256
  961. jaclang/vendor/mypy/typeshed/stdlib/mailcap.pyi +0 -11
  962. jaclang/vendor/mypy/typeshed/stdlib/marshal.pyi +0 -33
  963. jaclang/vendor/mypy/typeshed/stdlib/math.pyi +0 -125
  964. jaclang/vendor/mypy/typeshed/stdlib/mimetypes.pyi +0 -46
  965. jaclang/vendor/mypy/typeshed/stdlib/mmap.pyi +0 -113
  966. jaclang/vendor/mypy/typeshed/stdlib/modulefinder.pyi +0 -66
  967. jaclang/vendor/mypy/typeshed/stdlib/msilib/__init__.pyi +0 -177
  968. jaclang/vendor/mypy/typeshed/stdlib/msilib/schema.pyi +0 -94
  969. jaclang/vendor/mypy/typeshed/stdlib/msilib/sequence.pyi +0 -13
  970. jaclang/vendor/mypy/typeshed/stdlib/msilib/text.pyi +0 -7
  971. jaclang/vendor/mypy/typeshed/stdlib/msvcrt.pyi +0 -32
  972. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/__init__.pyi +0 -90
  973. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/connection.pyi +0 -75
  974. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/context.pyi +0 -189
  975. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +0 -77
  976. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +0 -39
  977. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +0 -31
  978. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/heap.pyi +0 -36
  979. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/managers.pyi +0 -212
  980. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/pool.pyi +0 -103
  981. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +0 -23
  982. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +0 -16
  983. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +0 -20
  984. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +0 -30
  985. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/process.pyi +0 -39
  986. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/queues.pyi +0 -41
  987. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/reduction.pyi +0 -90
  988. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +0 -20
  989. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +0 -18
  990. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +0 -40
  991. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +0 -107
  992. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/spawn.pyi +0 -32
  993. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +0 -54
  994. jaclang/vendor/mypy/typeshed/stdlib/multiprocessing/util.pyi +0 -98
  995. jaclang/vendor/mypy/typeshed/stdlib/netrc.pyi +0 -23
  996. jaclang/vendor/mypy/typeshed/stdlib/nis.pyi +0 -9
  997. jaclang/vendor/mypy/typeshed/stdlib/nntplib.pyi +0 -125
  998. jaclang/vendor/mypy/typeshed/stdlib/nt.pyi +0 -111
  999. jaclang/vendor/mypy/typeshed/stdlib/ntpath.pyi +0 -119
  1000. jaclang/vendor/mypy/typeshed/stdlib/nturl2path.pyi +0 -2
  1001. jaclang/vendor/mypy/typeshed/stdlib/numbers.pyi +0 -209
  1002. jaclang/vendor/mypy/typeshed/stdlib/opcode.pyi +0 -59
  1003. jaclang/vendor/mypy/typeshed/stdlib/operator.pyi +0 -110
  1004. jaclang/vendor/mypy/typeshed/stdlib/optparse.pyi +0 -255
  1005. jaclang/vendor/mypy/typeshed/stdlib/os/__init__.pyi +0 -1157
  1006. jaclang/vendor/mypy/typeshed/stdlib/os/path.pyi +0 -8
  1007. jaclang/vendor/mypy/typeshed/stdlib/ossaudiodev.pyi +0 -131
  1008. jaclang/vendor/mypy/typeshed/stdlib/parser.pyi +0 -24
  1009. jaclang/vendor/mypy/typeshed/stdlib/pathlib.pyi +0 -232
  1010. jaclang/vendor/mypy/typeshed/stdlib/pdb.pyi +0 -181
  1011. jaclang/vendor/mypy/typeshed/stdlib/pickle.pyi +0 -271
  1012. jaclang/vendor/mypy/typeshed/stdlib/pickletools.pyi +0 -167
  1013. jaclang/vendor/mypy/typeshed/stdlib/pipes.pyi +0 -16
  1014. jaclang/vendor/mypy/typeshed/stdlib/pkgutil.pyi +0 -53
  1015. jaclang/vendor/mypy/typeshed/stdlib/platform.pyi +0 -42
  1016. jaclang/vendor/mypy/typeshed/stdlib/plistlib.pyi +0 -113
  1017. jaclang/vendor/mypy/typeshed/stdlib/poplib.pyi +0 -71
  1018. jaclang/vendor/mypy/typeshed/stdlib/posix.pyi +0 -361
  1019. jaclang/vendor/mypy/typeshed/stdlib/posixpath.pyi +0 -161
  1020. jaclang/vendor/mypy/typeshed/stdlib/pprint.pyi +0 -112
  1021. jaclang/vendor/mypy/typeshed/stdlib/profile.pyi +0 -31
  1022. jaclang/vendor/mypy/typeshed/stdlib/pstats.pyi +0 -80
  1023. jaclang/vendor/mypy/typeshed/stdlib/pty.pyi +0 -19
  1024. jaclang/vendor/mypy/typeshed/stdlib/pwd.pyi +0 -28
  1025. jaclang/vendor/mypy/typeshed/stdlib/py_compile.pyi +0 -34
  1026. jaclang/vendor/mypy/typeshed/stdlib/pyclbr.pyi +0 -74
  1027. jaclang/vendor/mypy/typeshed/stdlib/pydoc.pyi +0 -261
  1028. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  1029. jaclang/vendor/mypy/typeshed/stdlib/pydoc_data/topics.pyi +0 -1
  1030. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/__init__.pyi +0 -85
  1031. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/errors.pyi +0 -49
  1032. jaclang/vendor/mypy/typeshed/stdlib/pyexpat/model.pyi +0 -11
  1033. jaclang/vendor/mypy/typeshed/stdlib/queue.pyi +0 -66
  1034. jaclang/vendor/mypy/typeshed/stdlib/quopri.pyi +0 -11
  1035. jaclang/vendor/mypy/typeshed/stdlib/random.pyi +0 -138
  1036. jaclang/vendor/mypy/typeshed/stdlib/re.pyi +0 -290
  1037. jaclang/vendor/mypy/typeshed/stdlib/readline.pyi +0 -36
  1038. jaclang/vendor/mypy/typeshed/stdlib/reprlib.pyi +0 -65
  1039. jaclang/vendor/mypy/typeshed/stdlib/resource.pyi +0 -94
  1040. jaclang/vendor/mypy/typeshed/stdlib/rlcompleter.pyi +0 -9
  1041. jaclang/vendor/mypy/typeshed/stdlib/runpy.pyi +0 -24
  1042. jaclang/vendor/mypy/typeshed/stdlib/sched.pyi +0 -42
  1043. jaclang/vendor/mypy/typeshed/stdlib/secrets.pyi +0 -15
  1044. jaclang/vendor/mypy/typeshed/stdlib/select.pyi +0 -155
  1045. jaclang/vendor/mypy/typeshed/stdlib/selectors.pyi +0 -67
  1046. jaclang/vendor/mypy/typeshed/stdlib/shelve.pyi +0 -46
  1047. jaclang/vendor/mypy/typeshed/stdlib/shlex.pyi +0 -63
  1048. jaclang/vendor/mypy/typeshed/stdlib/shutil.pyi +0 -185
  1049. jaclang/vendor/mypy/typeshed/stdlib/signal.pyi +0 -188
  1050. jaclang/vendor/mypy/typeshed/stdlib/site.pyi +0 -27
  1051. jaclang/vendor/mypy/typeshed/stdlib/smtpd.pyi +0 -91
  1052. jaclang/vendor/mypy/typeshed/stdlib/smtplib.pyi +0 -204
  1053. jaclang/vendor/mypy/typeshed/stdlib/sndhdr.pyi +0 -14
  1054. jaclang/vendor/mypy/typeshed/stdlib/socket.pyi +0 -825
  1055. jaclang/vendor/mypy/typeshed/stdlib/socketserver.pyi +0 -168
  1056. jaclang/vendor/mypy/typeshed/stdlib/spwd.pyi +0 -41
  1057. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/__init__.pyi +0 -1
  1058. jaclang/vendor/mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +0 -551
  1059. jaclang/vendor/mypy/typeshed/stdlib/sre_compile.pyi +0 -11
  1060. jaclang/vendor/mypy/typeshed/stdlib/sre_constants.pyi +0 -130
  1061. jaclang/vendor/mypy/typeshed/stdlib/sre_parse.pyi +0 -104
  1062. jaclang/vendor/mypy/typeshed/stdlib/ssl.pyi +0 -537
  1063. jaclang/vendor/mypy/typeshed/stdlib/stat.pyi +0 -1
  1064. jaclang/vendor/mypy/typeshed/stdlib/statistics.pyi +0 -132
  1065. jaclang/vendor/mypy/typeshed/stdlib/string.pyi +0 -83
  1066. jaclang/vendor/mypy/typeshed/stdlib/stringprep.pyi +0 -27
  1067. jaclang/vendor/mypy/typeshed/stdlib/struct.pyi +0 -26
  1068. jaclang/vendor/mypy/typeshed/stdlib/subprocess.pyi +0 -2615
  1069. jaclang/vendor/mypy/typeshed/stdlib/sunau.pyi +0 -86
  1070. jaclang/vendor/mypy/typeshed/stdlib/symbol.pyi +0 -93
  1071. jaclang/vendor/mypy/typeshed/stdlib/symtable.pyi +0 -58
  1072. jaclang/vendor/mypy/typeshed/stdlib/sys/__init__.pyi +0 -373
  1073. jaclang/vendor/mypy/typeshed/stdlib/sys/_monitoring.pyi +0 -52
  1074. jaclang/vendor/mypy/typeshed/stdlib/sysconfig.pyi +0 -48
  1075. jaclang/vendor/mypy/typeshed/stdlib/syslog.pyi +0 -46
  1076. jaclang/vendor/mypy/typeshed/stdlib/tabnanny.pyi +0 -16
  1077. jaclang/vendor/mypy/typeshed/stdlib/tarfile.pyi +0 -441
  1078. jaclang/vendor/mypy/typeshed/stdlib/telnetlib.pyi +0 -122
  1079. jaclang/vendor/mypy/typeshed/stdlib/tempfile.pyi +0 -477
  1080. jaclang/vendor/mypy/typeshed/stdlib/termios.pyi +0 -267
  1081. jaclang/vendor/mypy/typeshed/stdlib/textwrap.pyi +0 -103
  1082. jaclang/vendor/mypy/typeshed/stdlib/this.pyi +0 -2
  1083. jaclang/vendor/mypy/typeshed/stdlib/threading.pyi +0 -187
  1084. jaclang/vendor/mypy/typeshed/stdlib/time.pyi +0 -108
  1085. jaclang/vendor/mypy/typeshed/stdlib/timeit.pyi +0 -32
  1086. jaclang/vendor/mypy/typeshed/stdlib/tkinter/__init__.pyi +0 -3654
  1087. jaclang/vendor/mypy/typeshed/stdlib/tkinter/colorchooser.pyi +0 -20
  1088. jaclang/vendor/mypy/typeshed/stdlib/tkinter/commondialog.pyi +0 -14
  1089. jaclang/vendor/mypy/typeshed/stdlib/tkinter/constants.pyi +0 -80
  1090. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dialog.pyi +0 -16
  1091. jaclang/vendor/mypy/typeshed/stdlib/tkinter/dnd.pyi +0 -20
  1092. jaclang/vendor/mypy/typeshed/stdlib/tkinter/filedialog.pyi +0 -151
  1093. jaclang/vendor/mypy/typeshed/stdlib/tkinter/font.pyi +0 -116
  1094. jaclang/vendor/mypy/typeshed/stdlib/tkinter/messagebox.pyi +0 -44
  1095. jaclang/vendor/mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +0 -9
  1096. jaclang/vendor/mypy/typeshed/stdlib/tkinter/simpledialog.pyi +0 -54
  1097. jaclang/vendor/mypy/typeshed/stdlib/tkinter/tix.pyi +0 -299
  1098. jaclang/vendor/mypy/typeshed/stdlib/tkinter/ttk.pyi +0 -1204
  1099. jaclang/vendor/mypy/typeshed/stdlib/token.pyi +0 -159
  1100. jaclang/vendor/mypy/typeshed/stdlib/tokenize.pyi +0 -177
  1101. jaclang/vendor/mypy/typeshed/stdlib/tomllib.pyi +0 -10
  1102. jaclang/vendor/mypy/typeshed/stdlib/trace.pyi +0 -79
  1103. jaclang/vendor/mypy/typeshed/stdlib/traceback.pyi +0 -262
  1104. jaclang/vendor/mypy/typeshed/stdlib/tracemalloc.pyi +0 -124
  1105. jaclang/vendor/mypy/typeshed/stdlib/tty.pyi +0 -30
  1106. jaclang/vendor/mypy/typeshed/stdlib/turtle.pyi +0 -713
  1107. jaclang/vendor/mypy/typeshed/stdlib/types.pyi +0 -614
  1108. jaclang/vendor/mypy/typeshed/stdlib/typing.pyi +0 -976
  1109. jaclang/vendor/mypy/typeshed/stdlib/typing_extensions.pyi +0 -509
  1110. jaclang/vendor/mypy/typeshed/stdlib/unicodedata.pyi +0 -73
  1111. jaclang/vendor/mypy/typeshed/stdlib/unittest/__init__.pyi +0 -67
  1112. jaclang/vendor/mypy/typeshed/stdlib/unittest/_log.pyi +0 -27
  1113. jaclang/vendor/mypy/typeshed/stdlib/unittest/async_case.pyi +0 -21
  1114. jaclang/vendor/mypy/typeshed/stdlib/unittest/case.pyi +0 -342
  1115. jaclang/vendor/mypy/typeshed/stdlib/unittest/loader.pyi +0 -51
  1116. jaclang/vendor/mypy/typeshed/stdlib/unittest/main.pyi +0 -69
  1117. jaclang/vendor/mypy/typeshed/stdlib/unittest/mock.pyi +0 -430
  1118. jaclang/vendor/mypy/typeshed/stdlib/unittest/result.pyi +0 -47
  1119. jaclang/vendor/mypy/typeshed/stdlib/unittest/runner.pyi +0 -72
  1120. jaclang/vendor/mypy/typeshed/stdlib/unittest/signals.pyi +0 -15
  1121. jaclang/vendor/mypy/typeshed/stdlib/unittest/suite.pyi +0 -22
  1122. jaclang/vendor/mypy/typeshed/stdlib/unittest/util.pyi +0 -23
  1123. jaclang/vendor/mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  1124. jaclang/vendor/mypy/typeshed/stdlib/urllib/error.pyi +0 -23
  1125. jaclang/vendor/mypy/typeshed/stdlib/urllib/parse.pyi +0 -210
  1126. jaclang/vendor/mypy/typeshed/stdlib/urllib/request.pyi +0 -400
  1127. jaclang/vendor/mypy/typeshed/stdlib/urllib/response.pyi +0 -43
  1128. jaclang/vendor/mypy/typeshed/stdlib/urllib/robotparser.pyi +0 -20
  1129. jaclang/vendor/mypy/typeshed/stdlib/uu.pyi +0 -13
  1130. jaclang/vendor/mypy/typeshed/stdlib/uuid.pyi +0 -100
  1131. jaclang/vendor/mypy/typeshed/stdlib/warnings.pyi +0 -112
  1132. jaclang/vendor/mypy/typeshed/stdlib/wave.pyi +0 -85
  1133. jaclang/vendor/mypy/typeshed/stdlib/weakref.pyi +0 -149
  1134. jaclang/vendor/mypy/typeshed/stdlib/webbrowser.pyi +0 -74
  1135. jaclang/vendor/mypy/typeshed/stdlib/winreg.pyi +0 -132
  1136. jaclang/vendor/mypy/typeshed/stdlib/winsound.pyi +0 -28
  1137. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  1138. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/handlers.pyi +0 -91
  1139. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/headers.pyi +0 -26
  1140. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/simple_server.pyi +0 -37
  1141. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/types.pyi +0 -32
  1142. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/util.pyi +0 -24
  1143. jaclang/vendor/mypy/typeshed/stdlib/wsgiref/validate.pyi +0 -50
  1144. jaclang/vendor/mypy/typeshed/stdlib/xdrlib.pyi +0 -57
  1145. jaclang/vendor/mypy/typeshed/stdlib/xml/__init__.pyi +0 -1
  1146. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +0 -19
  1147. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/__init__.pyi +0 -69
  1148. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/domreg.pyi +0 -8
  1149. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +0 -100
  1150. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minicompat.pyi +0 -22
  1151. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/minidom.pyi +0 -404
  1152. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/pulldom.pyi +0 -94
  1153. jaclang/vendor/mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +0 -108
  1154. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +0 -28
  1155. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +0 -34
  1156. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +0 -327
  1157. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  1158. jaclang/vendor/mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +0 -1
  1159. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/__init__.pyi +0 -1
  1160. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +0 -1
  1161. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +0 -1
  1162. jaclang/vendor/mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +0 -1
  1163. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/__init__.pyi +0 -25
  1164. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +0 -19
  1165. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/handler.pyi +0 -55
  1166. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/saxutils.pyi +0 -60
  1167. jaclang/vendor/mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +0 -87
  1168. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  1169. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/client.pyi +0 -296
  1170. jaclang/vendor/mypy/typeshed/stdlib/xmlrpc/server.pyi +0 -143
  1171. jaclang/vendor/mypy/typeshed/stdlib/xxlimited.pyi +0 -22
  1172. jaclang/vendor/mypy/typeshed/stdlib/zipapp.pyi +0 -20
  1173. jaclang/vendor/mypy/typeshed/stdlib/zipfile/__init__.pyi +0 -306
  1174. jaclang/vendor/mypy/typeshed/stdlib/zipfile/_path.pyi +0 -95
  1175. jaclang/vendor/mypy/typeshed/stdlib/zipimport.pyi +0 -32
  1176. jaclang/vendor/mypy/typeshed/stdlib/zlib.pyi +0 -56
  1177. jaclang/vendor/mypy/typeshed/stdlib/zoneinfo/__init__.pyi +0 -38
  1178. jaclang/vendor/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +0 -218
  1179. jaclang/vendor/mypy/typestate.py +0 -323
  1180. jaclang/vendor/mypy/typetraverser.py +0 -148
  1181. jaclang/vendor/mypy/typevars.py +0 -93
  1182. jaclang/vendor/mypy/typevartuples.py +0 -32
  1183. jaclang/vendor/mypy/util.py +0 -869
  1184. jaclang/vendor/mypy/version.py +0 -1
  1185. jaclang/vendor/mypy/visitor.py +0 -621
  1186. jaclang/vendor/mypy/xml/mypy-html.css +0 -104
  1187. jaclang/vendor/mypy/xml/mypy-html.xslt +0 -81
  1188. jaclang/vendor/mypy/xml/mypy-txt.xslt +0 -100
  1189. jaclang/vendor/mypy/xml/mypy.xsd +0 -50
  1190. jaclang/vendor/mypy-1.10.0.dist-info/LICENSE +0 -229
  1191. jaclang/vendor/mypy-1.10.0.dist-info/METADATA +0 -48
  1192. jaclang/vendor/mypy-1.10.0.dist-info/RECORD +0 -1241
  1193. jaclang/vendor/mypy-1.10.0.dist-info/WHEEL +0 -6
  1194. jaclang/vendor/mypy-1.10.0.dist-info/entry_points.txt +0 -6
  1195. jaclang/vendor/mypy-1.10.0.dist-info/top_level.txt +0 -3
  1196. jaclang/vendor/mypy_extensions-1.0.0.dist-info/LICENSE +0 -27
  1197. jaclang/vendor/mypy_extensions-1.0.0.dist-info/METADATA +0 -29
  1198. jaclang/vendor/mypy_extensions-1.0.0.dist-info/RECORD +0 -6
  1199. jaclang/vendor/mypy_extensions-1.0.0.dist-info/top_level.txt +0 -1
  1200. jaclang/vendor/mypy_extensions.py +0 -213
  1201. jaclang/vendor/mypyc/README.md +0 -133
  1202. jaclang/vendor/mypyc/__init__.py +0 -0
  1203. jaclang/vendor/mypyc/__main__.py +0 -57
  1204. jaclang/vendor/mypyc/analysis/__init__.py +0 -0
  1205. jaclang/vendor/mypyc/analysis/attrdefined.py +0 -436
  1206. jaclang/vendor/mypyc/analysis/blockfreq.py +0 -32
  1207. jaclang/vendor/mypyc/analysis/dataflow.py +0 -628
  1208. jaclang/vendor/mypyc/analysis/ircheck.py +0 -433
  1209. jaclang/vendor/mypyc/analysis/selfleaks.py +0 -211
  1210. jaclang/vendor/mypyc/build.py +0 -616
  1211. jaclang/vendor/mypyc/codegen/__init__.py +0 -0
  1212. jaclang/vendor/mypyc/codegen/cstring.py +0 -54
  1213. jaclang/vendor/mypyc/codegen/emit.py +0 -1193
  1214. jaclang/vendor/mypyc/codegen/emitclass.py +0 -1060
  1215. jaclang/vendor/mypyc/codegen/emitfunc.py +0 -852
  1216. jaclang/vendor/mypyc/codegen/emitmodule.py +0 -1136
  1217. jaclang/vendor/mypyc/codegen/emitwrapper.py +0 -979
  1218. jaclang/vendor/mypyc/codegen/literals.py +0 -302
  1219. jaclang/vendor/mypyc/common.py +0 -136
  1220. jaclang/vendor/mypyc/crash.py +0 -31
  1221. jaclang/vendor/mypyc/doc/Makefile +0 -20
  1222. jaclang/vendor/mypyc/doc/bool_operations.rst +0 -27
  1223. jaclang/vendor/mypyc/doc/compilation_units.rst +0 -20
  1224. jaclang/vendor/mypyc/doc/conf.py +0 -59
  1225. jaclang/vendor/mypyc/doc/cpython-timings.md +0 -25
  1226. jaclang/vendor/mypyc/doc/dev-intro.md +0 -548
  1227. jaclang/vendor/mypyc/doc/dict_operations.rst +0 -59
  1228. jaclang/vendor/mypyc/doc/differences_from_python.rst +0 -332
  1229. jaclang/vendor/mypyc/doc/float_operations.rst +0 -50
  1230. jaclang/vendor/mypyc/doc/future.md +0 -42
  1231. jaclang/vendor/mypyc/doc/getting_started.rst +0 -240
  1232. jaclang/vendor/mypyc/doc/index.rst +0 -61
  1233. jaclang/vendor/mypyc/doc/int_operations.rst +0 -162
  1234. jaclang/vendor/mypyc/doc/introduction.rst +0 -150
  1235. jaclang/vendor/mypyc/doc/list_operations.rst +0 -65
  1236. jaclang/vendor/mypyc/doc/make.bat +0 -35
  1237. jaclang/vendor/mypyc/doc/native_classes.rst +0 -206
  1238. jaclang/vendor/mypyc/doc/native_operations.rst +0 -55
  1239. jaclang/vendor/mypyc/doc/performance_tips_and_tricks.rst +0 -244
  1240. jaclang/vendor/mypyc/doc/set_operations.rst +0 -47
  1241. jaclang/vendor/mypyc/doc/str_operations.rst +0 -35
  1242. jaclang/vendor/mypyc/doc/tuple_operations.rst +0 -33
  1243. jaclang/vendor/mypyc/doc/using_type_annotations.rst +0 -398
  1244. jaclang/vendor/mypyc/errors.py +0 -29
  1245. jaclang/vendor/mypyc/external/googletest/LICENSE +0 -28
  1246. jaclang/vendor/mypyc/external/googletest/README.md +0 -280
  1247. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-death-test.h +0 -294
  1248. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-message.h +0 -250
  1249. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h +0 -1444
  1250. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-param-test.h.pump +0 -510
  1251. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-printers.h +0 -993
  1252. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-spi.h +0 -232
  1253. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-test-part.h +0 -179
  1254. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest-typed-test.h +0 -263
  1255. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest.h +0 -2236
  1256. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_pred_impl.h +0 -358
  1257. jaclang/vendor/mypyc/external/googletest/include/gtest/gtest_prod.h +0 -58
  1258. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
  1259. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  1260. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/custom/gtest.h +0 -41
  1261. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
  1262. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h +0 -206
  1263. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-internal.h +0 -1238
  1264. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  1265. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
  1266. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
  1267. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-param-util.h +0 -731
  1268. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
  1269. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-port.h +0 -2560
  1270. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-string.h +0 -167
  1271. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  1272. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  1273. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
  1274. jaclang/vendor/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
  1275. jaclang/vendor/mypyc/external/googletest/make/Makefile +0 -61
  1276. jaclang/vendor/mypyc/external/googletest/src/gtest-all.cc +0 -48
  1277. jaclang/vendor/mypyc/external/googletest/src/gtest-death-test.cc +0 -1342
  1278. jaclang/vendor/mypyc/external/googletest/src/gtest-filepath.cc +0 -387
  1279. jaclang/vendor/mypyc/external/googletest/src/gtest-internal-inl.h +0 -1183
  1280. jaclang/vendor/mypyc/external/googletest/src/gtest-port.cc +0 -1259
  1281. jaclang/vendor/mypyc/external/googletest/src/gtest-printers.cc +0 -373
  1282. jaclang/vendor/mypyc/external/googletest/src/gtest-test-part.cc +0 -110
  1283. jaclang/vendor/mypyc/external/googletest/src/gtest-typed-test.cc +0 -118
  1284. jaclang/vendor/mypyc/external/googletest/src/gtest.cc +0 -5388
  1285. jaclang/vendor/mypyc/external/googletest/src/gtest_main.cc +0 -38
  1286. jaclang/vendor/mypyc/ir/__init__.py +0 -0
  1287. jaclang/vendor/mypyc/ir/class_ir.py +0 -499
  1288. jaclang/vendor/mypyc/ir/func_ir.py +0 -370
  1289. jaclang/vendor/mypyc/ir/module_ir.py +0 -88
  1290. jaclang/vendor/mypyc/ir/ops.py +0 -1727
  1291. jaclang/vendor/mypyc/ir/pprint.py +0 -516
  1292. jaclang/vendor/mypyc/ir/rtypes.py +0 -1038
  1293. jaclang/vendor/mypyc/irbuild/__init__.py +0 -0
  1294. jaclang/vendor/mypyc/irbuild/ast_helpers.py +0 -123
  1295. jaclang/vendor/mypyc/irbuild/builder.py +0 -1394
  1296. jaclang/vendor/mypyc/irbuild/callable_class.py +0 -173
  1297. jaclang/vendor/mypyc/irbuild/classdef.py +0 -850
  1298. jaclang/vendor/mypyc/irbuild/constant_fold.py +0 -95
  1299. jaclang/vendor/mypyc/irbuild/context.py +0 -186
  1300. jaclang/vendor/mypyc/irbuild/env_class.py +0 -223
  1301. jaclang/vendor/mypyc/irbuild/expression.py +0 -1070
  1302. jaclang/vendor/mypyc/irbuild/for_helpers.py +0 -1075
  1303. jaclang/vendor/mypyc/irbuild/format_str_tokenizer.py +0 -250
  1304. jaclang/vendor/mypyc/irbuild/function.py +0 -1088
  1305. jaclang/vendor/mypyc/irbuild/generator.py +0 -346
  1306. jaclang/vendor/mypyc/irbuild/ll_builder.py +0 -2389
  1307. jaclang/vendor/mypyc/irbuild/main.py +0 -153
  1308. jaclang/vendor/mypyc/irbuild/mapper.py +0 -221
  1309. jaclang/vendor/mypyc/irbuild/match.py +0 -355
  1310. jaclang/vendor/mypyc/irbuild/nonlocalcontrol.py +0 -197
  1311. jaclang/vendor/mypyc/irbuild/prebuildvisitor.py +0 -203
  1312. jaclang/vendor/mypyc/irbuild/prepare.py +0 -609
  1313. jaclang/vendor/mypyc/irbuild/specialize.py +0 -822
  1314. jaclang/vendor/mypyc/irbuild/statement.py +0 -1017
  1315. jaclang/vendor/mypyc/irbuild/targets.py +0 -57
  1316. jaclang/vendor/mypyc/irbuild/util.py +0 -189
  1317. jaclang/vendor/mypyc/irbuild/visitor.py +0 -401
  1318. jaclang/vendor/mypyc/irbuild/vtable.py +0 -82
  1319. jaclang/vendor/mypyc/lib-rt/CPy.h +0 -638
  1320. jaclang/vendor/mypyc/lib-rt/bytes_ops.c +0 -143
  1321. jaclang/vendor/mypyc/lib-rt/dict_ops.c +0 -446
  1322. jaclang/vendor/mypyc/lib-rt/exc_ops.c +0 -259
  1323. jaclang/vendor/mypyc/lib-rt/float_ops.c +0 -192
  1324. jaclang/vendor/mypyc/lib-rt/generic_ops.c +0 -64
  1325. jaclang/vendor/mypyc/lib-rt/getargs.c +0 -450
  1326. jaclang/vendor/mypyc/lib-rt/getargsfast.c +0 -569
  1327. jaclang/vendor/mypyc/lib-rt/init.c +0 -13
  1328. jaclang/vendor/mypyc/lib-rt/int_ops.c +0 -803
  1329. jaclang/vendor/mypyc/lib-rt/list_ops.c +0 -335
  1330. jaclang/vendor/mypyc/lib-rt/misc_ops.c +0 -942
  1331. jaclang/vendor/mypyc/lib-rt/module_shim.tmpl +0 -18
  1332. jaclang/vendor/mypyc/lib-rt/mypyc_util.h +0 -118
  1333. jaclang/vendor/mypyc/lib-rt/pythoncapi_compat.h +0 -497
  1334. jaclang/vendor/mypyc/lib-rt/pythonsupport.h +0 -533
  1335. jaclang/vendor/mypyc/lib-rt/set_ops.c +0 -17
  1336. jaclang/vendor/mypyc/lib-rt/setup.py +0 -70
  1337. jaclang/vendor/mypyc/lib-rt/str_ops.c +0 -241
  1338. jaclang/vendor/mypyc/lib-rt/test_capi.cc +0 -585
  1339. jaclang/vendor/mypyc/lib-rt/tuple_ops.c +0 -61
  1340. jaclang/vendor/mypyc/lower/__init__.py +0 -0
  1341. jaclang/vendor/mypyc/lower/int_ops.py +0 -113
  1342. jaclang/vendor/mypyc/lower/list_ops.py +0 -45
  1343. jaclang/vendor/mypyc/lower/misc_ops.py +0 -12
  1344. jaclang/vendor/mypyc/lower/registry.py +0 -26
  1345. jaclang/vendor/mypyc/namegen.py +0 -115
  1346. jaclang/vendor/mypyc/options.py +0 -32
  1347. jaclang/vendor/mypyc/primitives/__init__.py +0 -0
  1348. jaclang/vendor/mypyc/primitives/bytes_ops.py +0 -101
  1349. jaclang/vendor/mypyc/primitives/dict_ops.py +0 -325
  1350. jaclang/vendor/mypyc/primitives/exc_ops.py +0 -101
  1351. jaclang/vendor/mypyc/primitives/float_ops.py +0 -168
  1352. jaclang/vendor/mypyc/primitives/generic_ops.py +0 -384
  1353. jaclang/vendor/mypyc/primitives/int_ops.py +0 -303
  1354. jaclang/vendor/mypyc/primitives/list_ops.py +0 -310
  1355. jaclang/vendor/mypyc/primitives/misc_ops.py +0 -267
  1356. jaclang/vendor/mypyc/primitives/registry.py +0 -360
  1357. jaclang/vendor/mypyc/primitives/set_ops.py +0 -121
  1358. jaclang/vendor/mypyc/primitives/str_ops.py +0 -229
  1359. jaclang/vendor/mypyc/primitives/tuple_ops.py +0 -83
  1360. jaclang/vendor/mypyc/rt_subtype.py +0 -77
  1361. jaclang/vendor/mypyc/sametype.py +0 -83
  1362. jaclang/vendor/mypyc/subtype.py +0 -88
  1363. jaclang/vendor/mypyc/test/__init__.py +0 -0
  1364. jaclang/vendor/mypyc/test/config.py +0 -13
  1365. jaclang/vendor/mypyc/test/test_alwaysdefined.py +0 -46
  1366. jaclang/vendor/mypyc/test/test_analysis.py +0 -77
  1367. jaclang/vendor/mypyc/test/test_cheader.py +0 -53
  1368. jaclang/vendor/mypyc/test/test_commandline.py +0 -82
  1369. jaclang/vendor/mypyc/test/test_emit.py +0 -69
  1370. jaclang/vendor/mypyc/test/test_emitclass.py +0 -35
  1371. jaclang/vendor/mypyc/test/test_emitfunc.py +0 -928
  1372. jaclang/vendor/mypyc/test/test_emitwrapper.py +0 -60
  1373. jaclang/vendor/mypyc/test/test_exceptions.py +0 -56
  1374. jaclang/vendor/mypyc/test/test_external.py +0 -49
  1375. jaclang/vendor/mypyc/test/test_irbuild.py +0 -87
  1376. jaclang/vendor/mypyc/test/test_ircheck.py +0 -199
  1377. jaclang/vendor/mypyc/test/test_literals.py +0 -90
  1378. jaclang/vendor/mypyc/test/test_lowering.py +0 -56
  1379. jaclang/vendor/mypyc/test/test_namegen.py +0 -48
  1380. jaclang/vendor/mypyc/test/test_optimizations.py +0 -68
  1381. jaclang/vendor/mypyc/test/test_pprint.py +0 -42
  1382. jaclang/vendor/mypyc/test/test_rarray.py +0 -48
  1383. jaclang/vendor/mypyc/test/test_refcount.py +0 -59
  1384. jaclang/vendor/mypyc/test/test_run.py +0 -426
  1385. jaclang/vendor/mypyc/test/test_serialization.py +0 -108
  1386. jaclang/vendor/mypyc/test/test_struct.py +0 -112
  1387. jaclang/vendor/mypyc/test/test_tuplename.py +0 -33
  1388. jaclang/vendor/mypyc/test/test_typeops.py +0 -97
  1389. jaclang/vendor/mypyc/test/testutil.py +0 -283
  1390. jaclang/vendor/mypyc/test-data/alwaysdefined.test +0 -732
  1391. jaclang/vendor/mypyc/test-data/analysis.test +0 -470
  1392. jaclang/vendor/mypyc/test-data/commandline.test +0 -245
  1393. jaclang/vendor/mypyc/test-data/driver/driver.py +0 -48
  1394. jaclang/vendor/mypyc/test-data/exceptions-freq.test +0 -125
  1395. jaclang/vendor/mypyc/test-data/exceptions.test +0 -699
  1396. jaclang/vendor/mypyc/test-data/fixtures/ir.py +0 -373
  1397. jaclang/vendor/mypyc/test-data/fixtures/testutil.py +0 -103
  1398. jaclang/vendor/mypyc/test-data/fixtures/typing-full.pyi +0 -169
  1399. jaclang/vendor/mypyc/test-data/irbuild-any.test +0 -236
  1400. jaclang/vendor/mypyc/test-data/irbuild-basic.test +0 -3399
  1401. jaclang/vendor/mypyc/test-data/irbuild-bool.test +0 -424
  1402. jaclang/vendor/mypyc/test-data/irbuild-bytes.test +0 -181
  1403. jaclang/vendor/mypyc/test-data/irbuild-classes.test +0 -1302
  1404. jaclang/vendor/mypyc/test-data/irbuild-constant-fold.test +0 -480
  1405. jaclang/vendor/mypyc/test-data/irbuild-dict.test +0 -584
  1406. jaclang/vendor/mypyc/test-data/irbuild-dunders.test +0 -215
  1407. jaclang/vendor/mypyc/test-data/irbuild-float.test +0 -497
  1408. jaclang/vendor/mypyc/test-data/irbuild-generics.test +0 -150
  1409. jaclang/vendor/mypyc/test-data/irbuild-glue-methods.test +0 -437
  1410. jaclang/vendor/mypyc/test-data/irbuild-i16.test +0 -526
  1411. jaclang/vendor/mypyc/test-data/irbuild-i32.test +0 -598
  1412. jaclang/vendor/mypyc/test-data/irbuild-i64.test +0 -2144
  1413. jaclang/vendor/mypyc/test-data/irbuild-int.test +0 -194
  1414. jaclang/vendor/mypyc/test-data/irbuild-isinstance.test +0 -109
  1415. jaclang/vendor/mypyc/test-data/irbuild-lists.test +0 -513
  1416. jaclang/vendor/mypyc/test-data/irbuild-match.test +0 -1717
  1417. jaclang/vendor/mypyc/test-data/irbuild-math.test +0 -64
  1418. jaclang/vendor/mypyc/test-data/irbuild-nested.test +0 -807
  1419. jaclang/vendor/mypyc/test-data/irbuild-optional.test +0 -536
  1420. jaclang/vendor/mypyc/test-data/irbuild-set.test +0 -806
  1421. jaclang/vendor/mypyc/test-data/irbuild-singledispatch.test +0 -257
  1422. jaclang/vendor/mypyc/test-data/irbuild-statements.test +0 -1060
  1423. jaclang/vendor/mypyc/test-data/irbuild-str.test +0 -312
  1424. jaclang/vendor/mypyc/test-data/irbuild-strip-asserts.test +0 -12
  1425. jaclang/vendor/mypyc/test-data/irbuild-try.test +0 -523
  1426. jaclang/vendor/mypyc/test-data/irbuild-tuple.test +0 -386
  1427. jaclang/vendor/mypyc/test-data/irbuild-u8.test +0 -543
  1428. jaclang/vendor/mypyc/test-data/irbuild-unreachable.test +0 -241
  1429. jaclang/vendor/mypyc/test-data/irbuild-vectorcall.test +0 -153
  1430. jaclang/vendor/mypyc/test-data/lowering-int.test +0 -377
  1431. jaclang/vendor/mypyc/test-data/lowering-list.test +0 -33
  1432. jaclang/vendor/mypyc/test-data/opt-copy-propagation.test +0 -400
  1433. jaclang/vendor/mypyc/test-data/opt-flag-elimination.test +0 -296
  1434. jaclang/vendor/mypyc/test-data/refcount.test +0 -1482
  1435. jaclang/vendor/mypyc/test-data/run-async.test +0 -173
  1436. jaclang/vendor/mypyc/test-data/run-attrs.test +0 -318
  1437. jaclang/vendor/mypyc/test-data/run-bench.test +0 -196
  1438. jaclang/vendor/mypyc/test-data/run-bools.test +0 -229
  1439. jaclang/vendor/mypyc/test-data/run-bytes.test +0 -302
  1440. jaclang/vendor/mypyc/test-data/run-classes.test +0 -2505
  1441. jaclang/vendor/mypyc/test-data/run-dicts.test +0 -334
  1442. jaclang/vendor/mypyc/test-data/run-dunders.test +0 -945
  1443. jaclang/vendor/mypyc/test-data/run-exceptions.test +0 -448
  1444. jaclang/vendor/mypyc/test-data/run-floats.test +0 -516
  1445. jaclang/vendor/mypyc/test-data/run-functions.test +0 -1310
  1446. jaclang/vendor/mypyc/test-data/run-generators.test +0 -682
  1447. jaclang/vendor/mypyc/test-data/run-i16.test +0 -338
  1448. jaclang/vendor/mypyc/test-data/run-i32.test +0 -336
  1449. jaclang/vendor/mypyc/test-data/run-i64.test +0 -1519
  1450. jaclang/vendor/mypyc/test-data/run-imports.test +0 -265
  1451. jaclang/vendor/mypyc/test-data/run-integers.test +0 -540
  1452. jaclang/vendor/mypyc/test-data/run-lists.test +0 -411
  1453. jaclang/vendor/mypyc/test-data/run-loops.test +0 -485
  1454. jaclang/vendor/mypyc/test-data/run-match.test +0 -283
  1455. jaclang/vendor/mypyc/test-data/run-math.test +0 -106
  1456. jaclang/vendor/mypyc/test-data/run-misc.test +0 -1170
  1457. jaclang/vendor/mypyc/test-data/run-multimodule.test +0 -887
  1458. jaclang/vendor/mypyc/test-data/run-mypy-sim.test +0 -138
  1459. jaclang/vendor/mypyc/test-data/run-primitives.test +0 -375
  1460. jaclang/vendor/mypyc/test-data/run-python37.test +0 -159
  1461. jaclang/vendor/mypyc/test-data/run-python38.test +0 -88
  1462. jaclang/vendor/mypyc/test-data/run-sets.test +0 -150
  1463. jaclang/vendor/mypyc/test-data/run-singledispatch.test +0 -698
  1464. jaclang/vendor/mypyc/test-data/run-strings.test +0 -641
  1465. jaclang/vendor/mypyc/test-data/run-traits.test +0 -411
  1466. jaclang/vendor/mypyc/test-data/run-tuples.test +0 -258
  1467. jaclang/vendor/mypyc/test-data/run-u8.test +0 -303
  1468. jaclang/vendor/mypyc/transform/__init__.py +0 -0
  1469. jaclang/vendor/mypyc/transform/copy_propagation.py +0 -94
  1470. jaclang/vendor/mypyc/transform/exceptions.py +0 -182
  1471. jaclang/vendor/mypyc/transform/flag_elimination.py +0 -108
  1472. jaclang/vendor/mypyc/transform/ir_transform.py +0 -368
  1473. jaclang/vendor/mypyc/transform/lower.py +0 -33
  1474. jaclang/vendor/mypyc/transform/refcount.py +0 -294
  1475. jaclang/vendor/mypyc/transform/uninit.py +0 -190
  1476. jaclang/vendor/typing_extensions-4.12.2.dist-info/LICENSE +0 -279
  1477. jaclang/vendor/typing_extensions-4.12.2.dist-info/METADATA +0 -67
  1478. jaclang/vendor/typing_extensions-4.12.2.dist-info/RECORD +0 -5
  1479. jaclang/vendor/typing_extensions-4.12.2.dist-info/WHEEL +0 -4
  1480. jaclang/vendor/typing_extensions.py +0 -3641
  1481. jaclang-0.7.34.dist-info/RECORD +0 -1563
  1482. /jaclang/{vendor/mypy/dmypy → compiler/larkparse}/__init__.py +0 -0
  1483. /jaclang/{tests → compiler/passes/main/tests}/fixtures/access_checker.jac +0 -0
  1484. /jaclang/langserve/{__init__.py → __init__.jac} +0 -0
  1485. /jaclang/{vendor/mypy/plugins/__init__.py → langserve/tests/fixtures/deep_check_crash.jac} +0 -0
  1486. /jaclang/{vendor/mypy/server/__init__.py → langserve/tests/server_test/code_test.py} +0 -0
  1487. /jaclang/{plugin → runtimelib}/tests/__init__.py +0 -0
  1488. /jaclang/{vendor/mypy/test → tests}/__init__.py +0 -0
  1489. /jaclang/{vendor/mypy/test/meta → tests/fixtures}/__init__.py +0 -0
  1490. /jaclang/tests/fixtures/{architype_def_bug.jac → archetype_def_bug.jac} +0 -0
  1491. /jaclang/vendor/{mypy/typeshed/stdlib/concurrent/__init__.pyi → attrs-25.3.0.dist-info/REQUESTED} +0 -0
  1492. /jaclang/vendor/{attrs-23.2.0.dist-info → attrs-25.3.0.dist-info}/licenses/LICENSE +0 -0
  1493. /jaclang/vendor/{mypy/typeshed/stdlib/distutils/command/__init__.pyi → cattrs-24.1.3.dist-info/REQUESTED} +0 -0
  1494. /jaclang/vendor/{cattrs-23.2.3.dist-info → cattrs-24.1.3.dist-info}/licenses/LICENSE +0 -0
  1495. /jaclang/vendor/{mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi → lark-1.2.2.dist-info/REQUESTED} +0 -0
  1496. /jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/entry_points.txt +0 -0
  1497. /jaclang/vendor/{lark-1.1.9.dist-info → lark-1.2.2.dist-info}/top_level.txt +0 -0
  1498. /jaclang/vendor/{mypy/typeshed/stdlib/email/mime/__init__.pyi → lsprotocol-2023.0.1.dist-info/REQUESTED} +0 -0
  1499. /jaclang/vendor/lsprotocol-2023.0.1.dist-info/{LICENSE → licenses/LICENSE} +0 -0
  1500. /jaclang/vendor/{mypy/typeshed/stdlib/lib2to3/__init__.pyi → pluggy-1.5.0.dist-info/REQUESTED} +0 -0
  1501. /jaclang/vendor/pluggy-1.5.0.dist-info/{LICENSE → licenses/LICENSE} +0 -0
  1502. /jaclang/vendor/{mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi → pygls-1.3.1.dist-info/REQUESTED} +0 -0
  1503. {jaclang-0.7.34.dist-info → jaclang-0.8.1.dist-info}/entry_points.txt +0 -0
@@ -1,92 +1,84 @@
1
- """Lark parser for Jac Lang."""
1
+ """Python AST to Jac AST Conversion Pass for the Jac compiler.
2
+
3
+ This pass transforms Python AST nodes into equivalent Jac AST nodes by:
4
+
5
+ 1. Converting Python modules, classes, functions, and expressions to their Jac equivalents
6
+ 2. Preserving source location information and symbol relationships
7
+ 3. Handling Python-specific constructs and adapting them to Jac's object model
8
+ 4. Supporting both standard Python modules and type stub (.pyi) files
9
+ 5. Creating appropriate symbol tables and scopes for the converted nodes
10
+
11
+ This pass is crucial for Python interoperability, allowing Python code to be imported
12
+ and used within Jac programs while maintaining type information and semantic relationships.
13
+ """
2
14
 
3
15
  from __future__ import annotations
4
16
 
5
17
  import ast as py_ast
6
18
  import os
7
- from typing import Optional, Sequence, TypeAlias, TypeVar
19
+ from typing import Optional, Sequence, TYPE_CHECKING, TypeAlias, TypeVar
8
20
 
9
- # from icecream import ic
10
-
11
- import jaclang.compiler.absyntree as ast
21
+ import jaclang.compiler.unitree as uni
12
22
  from jaclang.compiler.constant import Tokens as Tok
13
- from jaclang.compiler.passes.ir_pass import Pass
23
+ from jaclang.compiler.passes.uni_pass import Transform
14
24
  from jaclang.utils.helpers import pascal_to_snake
15
25
 
16
- T = TypeVar("T", bound=ast.AstNode)
26
+ if TYPE_CHECKING:
27
+ from jaclang.compiler.program import JacProgram
28
+
29
+ T = TypeVar("T", bound=uni.UniNode)
17
30
 
18
31
 
19
- class PyastBuildPass(Pass[ast.PythonModuleAst]):
32
+ class PyastBuildPass(Transform[uni.PythonModuleAst, uni.Module]):
20
33
  """Jac Parser."""
21
34
 
22
- def __init__(self, input_ir: ast.PythonModuleAst) -> None:
35
+ def __init__(self, ir_in: uni.PythonModuleAst, prog: JacProgram) -> None:
23
36
  """Initialize parser."""
24
- self.mod_path = input_ir.loc.mod_path
25
- self.orig_src = input_ir.loc.orig_src
26
- Pass.__init__(self, input_ir=input_ir, prior=None)
37
+ self.mod_path = ir_in.loc.mod_path
38
+ self.orig_src = ir_in.loc.orig_src
39
+ Transform.__init__(self, ir_in=ir_in, prog=prog)
27
40
 
28
41
  def nu(self, node: T) -> T:
29
42
  """Update node."""
30
43
  self.cur_node = node
31
44
  return node
32
45
 
33
- def pp(self, node: py_ast.AST) -> None:
34
- """Print python node."""
35
- # print(
36
- # f"{node.__class__.__name__} - {[(k, type(v)) for k, v in vars(node).items()]}"
37
- # )
38
-
39
- def convert(self, node: py_ast.AST) -> ast.AstNode:
46
+ def convert(self, node: py_ast.AST) -> uni.UniNode:
40
47
  """Get python node type."""
41
- # print(
42
- # f"working on {type(node).__name__} line {node.lineno if hasattr(node, 'lineno') else 0}"
43
- # )
44
48
  if hasattr(self, f"proc_{pascal_to_snake(type(node).__name__)}"):
45
49
  ret = getattr(self, f"proc_{pascal_to_snake(type(node).__name__)}")(node)
46
50
  else:
47
51
  raise self.ice(f"Unknown node type {type(node).__name__}")
48
- # print(f"finshed {type(node).__name__} ---------------------")
49
- # print("normalizing", ret.__class__.__name__)
50
- # ic("normalizing", ret.__class__.__name__)
51
- # print(ret.unparse())
52
- # ret.unparse()
53
52
  return ret
54
53
 
55
- def transform(self, ir: ast.PythonModuleAst) -> ast.Module:
54
+ def transform(self, ir_in: uni.PythonModuleAst) -> uni.Module:
56
55
  """Transform input IR."""
57
- self.ir: ast.Module = self.proc_module(ir.ast)
58
- return self.ir
56
+ self.ir_out: uni.Module = self.proc_module(ir_in.ast)
57
+ return self.ir_out
59
58
 
60
59
  def extract_with_entry(
61
- self, body: list[ast.AstNode], exclude_types: TypeAlias = T
62
- ) -> list[T | ast.ModuleCode]:
60
+ self, body: list[uni.UniNode], exclude_types: TypeAlias = T
61
+ ) -> list[T | uni.ModuleCode]:
63
62
  """Extract with entry from a body."""
64
63
 
65
- def gen_mod_code(with_entry_body: list[ast.CodeBlockStmt]) -> ast.ModuleCode:
66
- with_entry_subnodelist = ast.SubNodeList[ast.CodeBlockStmt](
67
- items=with_entry_body,
68
- delim=Tok.WS,
69
- kid=with_entry_body,
70
- left_enc=self.operator(Tok.LBRACE, "{"),
71
- right_enc=self.operator(Tok.RBRACE, "}"),
72
- )
73
- return ast.ModuleCode(
64
+ def gen_mod_code(with_entry_body: list[uni.CodeBlockStmt]) -> uni.ModuleCode:
65
+ return uni.ModuleCode(
74
66
  name=None,
75
- body=with_entry_subnodelist,
76
- kid=[with_entry_subnodelist],
67
+ body=with_entry_body,
68
+ kid=with_entry_body,
77
69
  doc=None,
78
70
  )
79
71
 
80
- extracted: list[T | ast.ModuleCode] = []
81
- with_entry_body: list[ast.CodeBlockStmt] = []
72
+ extracted: list[T | uni.ModuleCode] = []
73
+ with_entry_body: list[uni.CodeBlockStmt] = []
82
74
  for i in body:
83
75
  if isinstance(i, exclude_types):
84
76
  if len(with_entry_body):
85
77
  extracted.append(gen_mod_code(with_entry_body))
86
78
  with_entry_body = []
87
79
  extracted.append(i)
88
- elif isinstance(i, ast.CodeBlockStmt):
89
- if isinstance(i, ast.ExprStmt) and isinstance(i.expr, ast.String):
80
+ elif isinstance(i, uni.CodeBlockStmt):
81
+ if isinstance(i, uni.ExprStmt) and isinstance(i.expr, uni.String):
90
82
  self.convert_to_doc(i.expr)
91
83
  with_entry_body.append(i)
92
84
  else:
@@ -96,7 +88,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
96
88
  extracted.append(gen_mod_code(with_entry_body))
97
89
  return extracted
98
90
 
99
- def proc_module(self, node: py_ast.Module) -> ast.Module:
91
+ def proc_module(self, node: py_ast.Module) -> uni.Module:
100
92
  """Process python node.
101
93
 
102
94
  class Module(mod):
@@ -104,37 +96,36 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
104
96
  body: list[stmt]
105
97
  type_ignores: list[TypeIgnore]
106
98
  """
107
- elements: list[ast.AstNode] = [self.convert(i) for i in node.body]
99
+ elements: list[uni.UniNode] = [self.convert(i) for i in node.body]
108
100
  elements[0] = (
109
101
  elements[0].expr
110
- if isinstance(elements[0], ast.ExprStmt)
111
- and isinstance(elements[0].expr, ast.String)
102
+ if isinstance(elements[0], uni.ExprStmt)
103
+ and isinstance(elements[0].expr, uni.String)
112
104
  else elements[0]
113
105
  )
114
- doc_str_list = [elements[0]] if isinstance(elements[0], ast.String) else []
106
+ doc_str_list = [elements[0]] if isinstance(elements[0], uni.String) else []
115
107
  valid = (
116
108
  (doc_str_list)
117
- + self.extract_with_entry(elements[1:], (ast.ElementStmt, ast.EmptyToken))
109
+ + self.extract_with_entry(elements[1:], (uni.ElementStmt, uni.EmptyToken))
118
110
  if doc_str_list
119
- else self.extract_with_entry(elements[:], (ast.ElementStmt, ast.EmptyToken))
111
+ else self.extract_with_entry(elements[:], (uni.ElementStmt, uni.EmptyToken))
120
112
  )
121
- doc_str = elements[0] if isinstance(elements[0], ast.String) else None
113
+ doc_str = elements[0] if isinstance(elements[0], uni.String) else None
122
114
  self.convert_to_doc(doc_str) if doc_str else None
123
- ret = ast.Module(
115
+ ret = uni.Module(
124
116
  name=self.mod_path.split(os.path.sep)[-1].split(".")[0],
125
- source=ast.JacSource("", mod_path=self.mod_path),
117
+ source=uni.Source("", mod_path=self.mod_path),
126
118
  doc=doc_str,
127
- body=valid[1:] if valid and isinstance(valid[0], ast.String) else valid,
119
+ body=valid[1:] if valid and isinstance(valid[0], uni.String) else valid,
128
120
  terminals=[],
129
- is_imported=False,
130
121
  kid=valid,
131
122
  )
132
- ret.py_info.is_raised_from_py = True
123
+ ret.is_raised_from_py = True
133
124
  return self.nu(ret)
134
125
 
135
126
  def proc_function_def(
136
127
  self, node: py_ast.FunctionDef | py_ast.AsyncFunctionDef
137
- ) -> ast.Ability:
128
+ ) -> uni.Ability:
138
129
  """Process python node.
139
130
 
140
131
  class FunctionDef(stmt):
@@ -151,7 +142,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
151
142
  reserved_keywords = [v for _, v in TOKEN_MAP.items()]
152
143
 
153
144
  value = node.name if node.name not in reserved_keywords else f"<>{node.name}"
154
- name = ast.Name(
145
+ name = uni.Name(
155
146
  orig_src=self.orig_src,
156
147
  name=Tok.NAME,
157
148
  value=value,
@@ -163,61 +154,43 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
163
154
  pos_end=0,
164
155
  )
165
156
  body = [self.convert(i) for i in node.body]
166
- valid = [i for i in body if isinstance(i, (ast.CodeBlockStmt))]
157
+ valid = [i for i in body if isinstance(i, (uni.CodeBlockStmt))]
167
158
  if len(valid) != len(body):
168
159
  raise self.ice("Length mismatch in function body")
169
160
 
170
161
  if (
171
162
  len(valid)
172
- and isinstance(valid[0], ast.ExprStmt)
173
- and isinstance(valid[0].expr, ast.String)
163
+ and isinstance(valid[0], uni.ExprStmt)
164
+ and isinstance(valid[0].expr, uni.String)
174
165
  ):
175
166
  self.convert_to_doc(valid[0].expr)
176
- doc = valid[0]
177
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
178
- items=[doc] + valid[1:],
179
- delim=Tok.WS,
180
- kid=valid[1:] + [doc],
181
- left_enc=self.operator(Tok.LBRACE, "{"),
182
- right_enc=self.operator(Tok.RBRACE, "}"),
183
- )
167
+ doc = valid[0].expr
168
+ valid_body = valid[1:]
184
169
  else:
185
170
  doc = None
186
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
187
- items=valid,
188
- delim=Tok.WS,
189
- kid=valid,
190
- left_enc=self.operator(Tok.LBRACE, "{"),
191
- right_enc=self.operator(Tok.RBRACE, "}"),
192
- )
171
+ valid_body = valid
193
172
  decorators = [self.convert(i) for i in node.decorator_list]
194
- valid_dec = [i for i in decorators if isinstance(i, ast.Expr)]
173
+ valid_dec = [i for i in decorators if isinstance(i, uni.Expr)]
195
174
  if len(valid_dec) != len(decorators):
196
175
  raise self.ice("Length mismatch in decorators on function")
197
- valid_decorators = (
198
- ast.SubNodeList[ast.Expr](
199
- items=valid_dec, delim=Tok.DECOR_OP, kid=decorators
200
- )
201
- if len(valid_dec)
202
- else None
203
- )
176
+ valid_decorators = valid_dec if valid_dec else None
204
177
  res = self.convert(node.args)
205
- sig: Optional[ast.FuncSignature] = (
206
- res if isinstance(res, ast.FuncSignature) else None
178
+ sig: Optional[uni.FuncSignature] = (
179
+ res if isinstance(res, uni.FuncSignature) else None
207
180
  )
208
181
  ret_sig = self.convert(node.returns) if node.returns else None
209
- if isinstance(ret_sig, ast.Expr):
182
+ if isinstance(ret_sig, uni.Expr):
210
183
  if not sig:
211
- sig = ast.FuncSignature(params=None, return_type=ret_sig, kid=[ret_sig])
184
+ sig = uni.FuncSignature(params=[], return_type=ret_sig, kid=[ret_sig])
212
185
  else:
213
186
  sig.return_type = ret_sig
214
187
  sig.add_kids_right([sig.return_type])
215
188
  kid = ([doc] if doc else []) + (
216
- [name, sig, valid_body] if sig else [name, valid_body]
189
+ [name, sig, *valid_body] if sig else [name, *valid_body]
217
190
  )
218
191
  if not sig:
219
192
  raise self.ice("Function signature not found")
220
- ret = ast.Ability(
193
+ ret = uni.Ability(
221
194
  name_ref=name,
222
195
  is_async=False,
223
196
  is_static=False,
@@ -227,12 +200,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
227
200
  signature=sig,
228
201
  body=valid_body,
229
202
  decorators=valid_decorators,
230
- doc=None,
203
+ doc=doc,
231
204
  kid=kid,
232
205
  )
233
206
  return ret
234
207
 
235
- def proc_async_function_def(self, node: py_ast.AsyncFunctionDef) -> ast.Ability:
208
+ def proc_async_function_def(self, node: py_ast.AsyncFunctionDef) -> uni.Ability:
236
209
  """Process python node.
237
210
 
238
211
  class AsyncFunctionDef(stmt):
@@ -250,7 +223,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
250
223
  ability.is_async = True
251
224
  return ability
252
225
 
253
- def proc_class_def(self, node: py_ast.ClassDef) -> ast.Architype | ast.Enum:
226
+ def proc_class_def(self, node: py_ast.ClassDef) -> uni.Archetype | uni.Enum:
254
227
  """Process python node.
255
228
 
256
229
  class ClassDef(stmt):
@@ -264,7 +237,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
264
237
  if sys.version_info >= (3, 12):
265
238
  type_params: list[type_param]
266
239
  """
267
- name = ast.Name(
240
+ name = uni.Name(
268
241
  orig_src=self.orig_src,
269
242
  name=Tok.NAME,
270
243
  value=node.name,
@@ -275,7 +248,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
275
248
  pos_start=0,
276
249
  pos_end=0,
277
250
  )
278
- arch_type = ast.Token(
251
+ arch_type = uni.Token(
279
252
  orig_src=self.orig_src,
280
253
  name=Tok.KW_CLASS,
281
254
  value="class",
@@ -289,11 +262,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
289
262
  body = [self.convert(i) for i in node.body]
290
263
  for body_stmt in body:
291
264
  if (
292
- isinstance(body_stmt, ast.Ability)
293
- and isinstance(body_stmt.name_ref, ast.Name)
265
+ isinstance(body_stmt, uni.Ability)
266
+ and isinstance(body_stmt.name_ref, uni.Name)
294
267
  and body_stmt.name_ref.value == "__init__"
295
268
  ):
296
- tok = ast.Name(
269
+ tok = uni.Name(
297
270
  orig_src=self.orig_src,
298
271
  name=Tok.KW_INIT,
299
272
  value="init",
@@ -304,148 +277,64 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
304
277
  pos_start=0,
305
278
  pos_end=0,
306
279
  )
307
- body_stmt.name_ref = ast.SpecialVarRef(var=tok)
280
+ body_stmt.name_ref = uni.SpecialVarRef(var=tok)
308
281
  if (
309
- isinstance(body_stmt, ast.Ability)
282
+ isinstance(body_stmt, uni.Ability)
310
283
  and body_stmt.signature
311
- and isinstance(body_stmt.signature, ast.FuncSignature)
284
+ and isinstance(body_stmt.signature, uni.FuncSignature)
312
285
  and body_stmt.signature.params
313
286
  ):
314
- body_stmt.signature.params.items = [
315
- param
316
- for param in body_stmt.signature.params.items
317
- if param.name.value != "self"
318
- ]
287
+ for param in body_stmt.signature.params:
288
+ if param.name.value == "self":
289
+ param.type_tag = uni.SubTag[uni.Expr](name, kid=[name])
319
290
  doc = (
320
291
  body[0].expr
321
- if isinstance(body[0], ast.ExprStmt)
322
- and isinstance(body[0].expr, ast.String)
292
+ if isinstance(body[0], uni.ExprStmt)
293
+ and isinstance(body[0].expr, uni.String)
323
294
  else None
324
295
  )
325
296
  self.convert_to_doc(doc) if doc else None
326
297
  body = body[1:] if doc else body
327
- valid: list[ast.ArchBlockStmt] = (
328
- self.extract_with_entry(body, ast.ArchBlockStmt)
329
- if body and not (isinstance(body[0], ast.Semi) and len(body) == 1)
298
+ valid: list[uni.ArchBlockStmt] = (
299
+ self.extract_with_entry(body, uni.ArchBlockStmt)
300
+ if body and not (isinstance(body[0], uni.Semi) and len(body) == 1)
330
301
  else []
331
302
  )
332
- empty_block: Sequence[ast.AstNode] = [
303
+ empty_block: Sequence[uni.UniNode] = [
333
304
  self.operator(Tok.LBRACE, "{"),
334
305
  self.operator(Tok.RBRACE, "}"),
335
306
  ]
336
- valid_body = ast.SubNodeList[ast.ArchBlockStmt](
337
- items=valid,
338
- delim=Tok.WS,
339
- kid=(valid if valid else empty_block),
340
- left_enc=self.operator(Tok.LBRACE, "{"),
341
- right_enc=self.operator(Tok.RBRACE, "}"),
342
- )
307
+ valid_body = valid if valid else empty_block
343
308
  converted_base_classes = [self.convert(base) for base in node.bases]
344
- base_classes: list[ast.Expr] = [
345
- base for base in converted_base_classes if isinstance(base, ast.Expr)
309
+ base_classes: list[uni.Expr] = [
310
+ base for base in converted_base_classes if isinstance(base, uni.Expr)
346
311
  ]
347
- valid_bases = (
348
- ast.SubNodeList[ast.Expr](
349
- items=base_classes, delim=Tok.COMMA, kid=base_classes
350
- )
351
- if base_classes
352
- else None
353
- )
354
312
  converted_decorators_list = [self.convert(i) for i in node.decorator_list]
355
- decorators = [i for i in converted_decorators_list if isinstance(i, ast.Expr)]
356
- valid_decorators = (
357
- ast.SubNodeList[ast.Expr](
358
- items=decorators, delim=Tok.DECOR_OP, kid=decorators
359
- )
360
- if decorators
361
- else None
362
- )
363
- if (
364
- base_classes
365
- and isinstance(base_classes[0], ast.Name)
366
- and base_classes[0].value == "Enum"
367
- ):
368
- if len(base_classes) > 1:
369
- raise ValueError(
370
- "Python's Enum class cannot be used with multiple inheritance."
371
- )
372
- arch_type.name = Tok.KW_ENUM
373
- arch_type.value = "enum"
374
- valid_enum_body: list[ast.EnumBlockStmt] = []
375
- for class_body_stmt in node.body:
376
- converted_stmt = self.convert(class_body_stmt)
377
- if isinstance(converted_stmt, ast.EnumBlockStmt):
378
- if isinstance(converted_stmt, ast.Assignment):
379
- converted_stmt.is_enum_stmt = True
380
- valid_enum_body.append(converted_stmt)
381
- else:
382
- if isinstance(converted_stmt, ast.ExprStmt) and isinstance(
383
- converted_stmt.expr, ast.String
384
- ):
385
- continue
386
- pintok = ast.Token(
387
- orig_src=self.orig_src,
388
- name=Tok.PYNLINE,
389
- value=py_ast.unparse(class_body_stmt),
390
- line=node.lineno,
391
- end_line=node.end_lineno if node.end_lineno else node.lineno,
392
- col_start=node.col_offset,
393
- col_end=node.col_offset + len(py_ast.unparse(class_body_stmt)),
394
- pos_start=0,
395
- pos_end=0,
396
- )
397
- valid_enum_body.append(ast.PyInlineCode(code=pintok, kid=[pintok]))
398
-
399
- valid_enum_body2: list[ast.EnumBlockStmt] = [
400
- i for i in valid_enum_body if isinstance(i, ast.EnumBlockStmt)
401
- ]
402
- enum_body = (
403
- ast.SubNodeList[ast.EnumBlockStmt](
404
- items=valid_enum_body2, delim=Tok.COMMA, kid=valid_enum_body2
405
- )
406
- if valid_enum_body2
407
- else None
408
- )
409
- if doc:
410
- doc.line_no = name.line_no
411
- return ast.Enum(
412
- name=name,
413
- access=None,
414
- base_classes=None,
415
- body=enum_body,
416
- kid=(
417
- [doc, name, enum_body]
418
- if doc and enum_body
419
- else (
420
- [doc, name]
421
- if doc
422
- else [name, enum_body] if enum_body else [name]
423
- )
424
- ),
425
- doc=doc,
426
- decorators=valid_decorators,
427
- )
313
+ decorators = [i for i in converted_decorators_list if isinstance(i, uni.Expr)]
314
+ if len(decorators) != len(converted_decorators_list):
315
+ raise self.ice("Length mismatch in decorators on class")
316
+ valid_decorators = decorators if decorators else None
428
317
  kid = (
429
- [name, valid_bases, valid_body, doc]
430
- if doc and valid_bases
318
+ [name, *base_classes, *valid_body, doc]
319
+ if doc and base_classes
431
320
  else (
432
- [name, valid_bases, valid_body]
433
- if valid_bases
434
- else [name, valid_body, doc] if doc else [name, valid_body]
321
+ [name, *base_classes, *valid_body]
322
+ if base_classes
323
+ else [name, *valid_body, doc] if doc else [name, *valid_body]
435
324
  )
436
325
  )
437
- return ast.Architype(
326
+ return uni.Archetype(
438
327
  arch_type=arch_type,
439
328
  name=name,
440
329
  access=None,
441
- base_classes=valid_bases,
442
- body=valid_body,
330
+ base_classes=base_classes,
331
+ body=valid,
443
332
  kid=kid,
444
333
  doc=doc,
445
334
  decorators=valid_decorators,
446
335
  )
447
336
 
448
- def proc_return(self, node: py_ast.Return) -> ast.ReturnStmt | None:
337
+ def proc_return(self, node: py_ast.Return) -> uni.ReturnStmt | None:
449
338
  """Process python node.
450
339
 
451
340
  class Return(stmt):
@@ -454,15 +343,15 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
454
343
  """
455
344
  value = self.convert(node.value) if node.value else None
456
345
  if not value:
457
- return ast.ReturnStmt(
346
+ return uni.ReturnStmt(
458
347
  expr=None, kid=[self.operator(Tok.KW_RETURN, "return")]
459
348
  )
460
- elif value and isinstance(value, ast.Expr):
461
- return ast.ReturnStmt(expr=value, kid=[value])
349
+ elif value and isinstance(value, uni.Expr):
350
+ return uni.ReturnStmt(expr=value, kid=[value])
462
351
  else:
463
352
  raise self.ice("Invalid return value")
464
353
 
465
- def proc_delete(self, node: py_ast.Delete) -> ast.DeleteStmt:
354
+ def proc_delete(self, node: py_ast.Delete) -> uni.DeleteStmt:
466
355
  """Process python node.
467
356
 
468
357
  class Delete(stmt):
@@ -470,23 +359,20 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
470
359
  targets: list[expr]
471
360
  """
472
361
  exprs = [self.convert(target) for target in node.targets]
473
- valid_exprs = [expr for expr in exprs if isinstance(expr, ast.Expr)]
362
+ valid_exprs = [expr for expr in exprs if isinstance(expr, uni.Expr)]
474
363
  if not len(valid_exprs) or len(valid_exprs) != len(exprs):
475
364
  raise self.ice("Length mismatch in delete targets")
476
- target = ast.SubNodeList[ast.Expr | ast.KWPair](
477
- items=[*valid_exprs], delim=Tok.COMMA, kid=exprs
478
- )
479
365
  target_1 = (
480
366
  valid_exprs[0]
481
367
  if len(valid_exprs) > 1
482
- else ast.TupleVal(values=target, kid=[target])
368
+ else uni.TupleVal(values=valid_exprs, kid=[*valid_exprs])
483
369
  )
484
- return ast.DeleteStmt(
370
+ return uni.DeleteStmt(
485
371
  target=target_1,
486
- kid=[target],
372
+ kid=[*valid_exprs],
487
373
  )
488
374
 
489
- def proc_assign(self, node: py_ast.Assign) -> ast.Assignment:
375
+ def proc_assign(self, node: py_ast.Assign) -> uni.Assignment:
490
376
  """Process python node.
491
377
 
492
378
  class Assign(stmt):
@@ -495,24 +381,20 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
495
381
  """
496
382
  value = self.convert(node.value)
497
383
  targets = [self.convert(target) for target in node.targets]
498
- valid = [target for target in targets if isinstance(target, ast.Expr)]
499
- if len(valid) == len(targets):
500
- valid_targets = ast.SubNodeList[ast.Expr](
501
- items=valid, delim=Tok.EQ, kid=valid
502
- )
503
- else:
384
+ valid = [target for target in targets if isinstance(target, uni.Expr)]
385
+ if not len(valid) == len(targets):
504
386
  raise self.ice("Length mismatch in assignment targets")
505
- if isinstance(value, ast.Expr):
506
- return ast.Assignment(
507
- target=valid_targets,
387
+ if isinstance(value, uni.Expr):
388
+ return uni.Assignment(
389
+ target=valid,
508
390
  value=value,
509
391
  type_tag=None,
510
- kid=[valid_targets, value],
392
+ kid=[*valid, value],
511
393
  )
512
394
  else:
513
395
  raise self.ice()
514
396
 
515
- def proc_aug_assign(self, node: py_ast.AugAssign) -> ast.Assignment:
397
+ def proc_aug_assign(self, node: py_ast.AugAssign) -> uni.Assignment:
516
398
  """Process python node.
517
399
 
518
400
  class AugAssign(stmt):
@@ -525,19 +407,16 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
525
407
 
526
408
  target = self.convert(node.target)
527
409
  op = self.convert(node.op)
528
- if isinstance(op, ast.Token):
410
+ if isinstance(op, uni.Token):
529
411
  op.name = self.aug_op_map(TOKEN_MAP, op)
530
412
  value = self.convert(node.value)
531
413
  if (
532
- isinstance(value, ast.Expr)
533
- and isinstance(target, ast.Expr)
534
- and isinstance(op, ast.Token)
414
+ isinstance(value, uni.Expr)
415
+ and isinstance(target, uni.Expr)
416
+ and isinstance(op, uni.Token)
535
417
  ):
536
- targ = ast.SubNodeList[ast.Expr](
537
- items=[target], delim=Tok.COMMA, kid=[target]
538
- )
539
- return ast.Assignment(
540
- target=targ,
418
+ return uni.Assignment(
419
+ target=[target],
541
420
  type_tag=None,
542
421
  mutable=True,
543
422
  aug_op=op,
@@ -547,7 +426,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
547
426
  else:
548
427
  raise self.ice()
549
428
 
550
- def proc_ann_assign(self, node: py_ast.AnnAssign) -> ast.Assignment:
429
+ def proc_ann_assign(self, node: py_ast.AnnAssign) -> uni.Assignment:
551
430
  """Process python node.
552
431
 
553
432
  class AnnAssign(stmt):
@@ -559,22 +438,19 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
559
438
  """
560
439
  target = self.convert(node.target)
561
440
  annotation = self.convert(node.annotation)
562
- if isinstance(annotation, ast.Expr):
563
- annotation_subtag = ast.SubTag[ast.Expr](tag=annotation, kid=[annotation])
441
+ if isinstance(annotation, uni.Expr):
442
+ annotation_subtag = uni.SubTag[uni.Expr](tag=annotation, kid=[annotation])
564
443
  else:
565
444
  raise self.ice()
566
445
  value = self.convert(node.value) if node.value else None
567
446
  if (
568
- (isinstance(value, (ast.Expr, ast.YieldExpr)) or not value)
569
- and isinstance(annotation, ast.Expr)
570
- and isinstance(target, ast.Expr)
447
+ (isinstance(value, (uni.Expr, uni.YieldExpr)) or not value)
448
+ and isinstance(annotation, uni.Expr)
449
+ and isinstance(target, uni.Expr)
571
450
  ):
572
- target = ast.SubNodeList[ast.Expr](
573
- items=[target], delim=Tok.EQ, kid=[target]
574
- )
575
- return ast.Assignment(
576
- target=target,
577
- value=value if isinstance(value, (ast.Expr, ast.YieldExpr)) else None,
451
+ return uni.Assignment(
452
+ target=[target],
453
+ value=value if isinstance(value, (uni.Expr, uni.YieldExpr)) else None,
578
454
  type_tag=annotation_subtag,
579
455
  kid=(
580
456
  [target, annotation_subtag, value]
@@ -585,7 +461,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
585
461
  else:
586
462
  raise self.ice()
587
463
 
588
- def proc_for(self, node: py_ast.For) -> ast.InForStmt:
464
+ def proc_for(self, node: py_ast.For) -> uni.InForStmt:
589
465
  """Process python node.
590
466
 
591
467
  class For(stmt):
@@ -598,53 +474,36 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
598
474
  target = self.convert(node.target)
599
475
  iter = self.convert(node.iter)
600
476
  body = [self.convert(i) for i in node.body]
601
- val_body = [i for i in body if isinstance(i, ast.CodeBlockStmt)]
477
+ val_body = [i for i in body if isinstance(i, uni.CodeBlockStmt)]
602
478
  if len(val_body) != len(body):
603
479
  raise self.ice("Length mismatch in for body")
604
480
 
605
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
606
- items=val_body,
607
- delim=Tok.WS,
608
- kid=val_body,
609
- left_enc=self.operator(Tok.LBRACE, "{"),
610
- right_enc=self.operator(Tok.RBRACE, "}"),
611
- )
481
+ valid_body = val_body
612
482
  orelse = [self.convert(i) for i in node.orelse]
613
- val_orelse = [i for i in orelse if isinstance(i, ast.CodeBlockStmt)]
483
+ val_orelse = [i for i in orelse if isinstance(i, uni.CodeBlockStmt)]
614
484
  if len(val_orelse) != len(orelse):
615
485
  raise self.ice("Length mismatch in for orelse")
616
486
  if orelse:
617
- valid_orelse = ast.SubNodeList[ast.CodeBlockStmt](
618
- items=val_orelse,
619
- delim=Tok.WS,
620
- kid=orelse,
621
- left_enc=self.operator(Tok.LBRACE, "{"),
622
- right_enc=self.operator(Tok.RBRACE, "}"),
623
- )
487
+ fin_orelse = uni.ElseStmt(body=val_orelse, kid=val_orelse)
624
488
  else:
625
- valid_orelse = None
626
- fin_orelse = (
627
- ast.ElseStmt(body=valid_orelse, kid=[valid_orelse])
628
- if valid_orelse
629
- else None
630
- )
631
- if isinstance(target, ast.Expr) and isinstance(iter, ast.Expr):
632
- return ast.InForStmt(
489
+ fin_orelse = None
490
+ if isinstance(target, uni.Expr) and isinstance(iter, uni.Expr):
491
+ return uni.InForStmt(
633
492
  target=target,
634
493
  is_async=False,
635
494
  collection=iter,
636
495
  body=valid_body,
637
496
  else_body=fin_orelse,
638
497
  kid=(
639
- [target, iter, valid_body, fin_orelse]
498
+ [target, iter, *valid_body, fin_orelse]
640
499
  if fin_orelse
641
- else [target, iter, valid_body]
500
+ else [target, iter, *valid_body]
642
501
  ),
643
502
  )
644
503
  else:
645
504
  raise self.ice()
646
505
 
647
- def proc_async_for(self, node: py_ast.AsyncFor) -> ast.InForStmt:
506
+ def proc_async_for(self, node: py_ast.AsyncFor) -> uni.InForStmt:
648
507
  """Process AsyncFor node.
649
508
 
650
509
  class AsyncFor(stmt):
@@ -657,53 +516,36 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
657
516
  target = self.convert(node.target)
658
517
  iter = self.convert(node.iter)
659
518
  body = [self.convert(i) for i in node.body]
660
- val_body = [i for i in body if isinstance(i, ast.CodeBlockStmt)]
519
+ val_body = [i for i in body if isinstance(i, uni.CodeBlockStmt)]
661
520
  if len(val_body) != len(body):
662
521
  raise self.ice("Length mismatch in for body")
663
522
 
664
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
665
- items=val_body,
666
- delim=Tok.WS,
667
- kid=val_body,
668
- left_enc=self.operator(Tok.LBRACE, "{"),
669
- right_enc=self.operator(Tok.RBRACE, "}"),
670
- )
523
+ valid_body = val_body
671
524
  orelse = [self.convert(i) for i in node.orelse]
672
- val_orelse = [i for i in orelse if isinstance(i, ast.CodeBlockStmt)]
525
+ val_orelse = [i for i in orelse if isinstance(i, uni.CodeBlockStmt)]
673
526
  if len(val_orelse) != len(orelse):
674
527
  raise self.ice("Length mismatch in for orelse")
675
528
  if orelse:
676
- valid_orelse = ast.SubNodeList[ast.CodeBlockStmt](
677
- items=val_orelse,
678
- delim=Tok.WS,
679
- kid=orelse,
680
- left_enc=self.operator(Tok.LBRACE, "{"),
681
- right_enc=self.operator(Tok.RBRACE, "}"),
682
- )
529
+ fin_orelse = uni.ElseStmt(body=val_orelse, kid=val_orelse)
683
530
  else:
684
- valid_orelse = None
685
- fin_orelse = (
686
- ast.ElseStmt(body=valid_orelse, kid=[valid_orelse])
687
- if valid_orelse
688
- else None
689
- )
690
- if isinstance(target, ast.Expr) and isinstance(iter, ast.Expr):
691
- return ast.InForStmt(
531
+ fin_orelse = None
532
+ if isinstance(target, uni.Expr) and isinstance(iter, uni.Expr):
533
+ return uni.InForStmt(
692
534
  target=target,
693
535
  is_async=True,
694
536
  collection=iter,
695
537
  body=valid_body,
696
538
  else_body=fin_orelse,
697
539
  kid=(
698
- [target, iter, valid_body, fin_orelse]
540
+ [target, iter, *valid_body, fin_orelse]
699
541
  if fin_orelse
700
- else [target, iter, valid_body]
542
+ else [target, iter, *valid_body]
701
543
  ),
702
544
  )
703
545
  else:
704
546
  raise self.ice()
705
547
 
706
- def proc_while(self, node: py_ast.While) -> ast.WhileStmt:
548
+ def proc_while(self, node: py_ast.While) -> uni.WhileStmt:
707
549
  """Process While node.
708
550
 
709
551
  class While(stmt):
@@ -714,26 +556,19 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
714
556
  """
715
557
  test = self.convert(node.test)
716
558
  body = [self.convert(stmt) for stmt in node.body]
717
- valid_body = [stmt for stmt in body if isinstance(stmt, ast.CodeBlockStmt)]
559
+ valid_body = [stmt for stmt in body if isinstance(stmt, uni.CodeBlockStmt)]
718
560
  if len(valid_body) != len(body):
719
561
  raise self.ice("Length mismatch in while body")
720
- fin_body = ast.SubNodeList[ast.CodeBlockStmt](
721
- items=valid_body,
722
- delim=Tok.WS,
723
- kid=valid_body,
724
- left_enc=self.operator(Tok.LBRACE, "{"),
725
- right_enc=self.operator(Tok.RBRACE, "}"),
726
- )
727
- if isinstance(test, ast.Expr):
728
- return ast.WhileStmt(
562
+ if isinstance(test, uni.Expr):
563
+ return uni.WhileStmt(
729
564
  condition=test,
730
- body=fin_body,
731
- kid=[test, fin_body],
565
+ body=valid_body,
566
+ kid=[test, *valid_body],
732
567
  )
733
568
  else:
734
569
  raise self.ice()
735
570
 
736
- def proc_if(self, node: py_ast.If) -> ast.IfStmt:
571
+ def proc_if(self, node: py_ast.If) -> uni.IfStmt:
737
572
  """Process If node.
738
573
 
739
574
  class If(stmt):
@@ -744,53 +579,40 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
744
579
  """
745
580
  test = self.convert(node.test)
746
581
  body = [self.convert(stmt) for stmt in node.body]
747
- valid_body = [stmt for stmt in body if isinstance(stmt, ast.CodeBlockStmt)]
582
+ valid_body = [stmt for stmt in body if isinstance(stmt, uni.CodeBlockStmt)]
748
583
  if len(valid_body) != len(body):
749
- self.error("Length mismatch in async for body")
750
- body2 = ast.SubNodeList[ast.CodeBlockStmt](
751
- items=valid_body,
752
- delim=Tok.WS,
753
- kid=body,
754
- left_enc=self.operator(Tok.LBRACE, "{"),
755
- right_enc=self.operator(Tok.RBRACE, "}"),
756
- )
584
+ self.log_error("Length mismatch in async for body")
585
+ body2 = valid_body
757
586
 
758
587
  orelse = [self.convert(stmt) for stmt in node.orelse]
759
588
  valid_orelse = [
760
- stmt for stmt in orelse if isinstance(stmt, (ast.CodeBlockStmt))
589
+ stmt for stmt in orelse if isinstance(stmt, (uni.CodeBlockStmt))
761
590
  ]
762
591
  if valid_orelse:
763
592
  first_elm = valid_orelse[0]
764
- if isinstance(first_elm, ast.IfStmt):
765
- else_body: Optional[ast.ElseIf | ast.ElseStmt] = ast.ElseIf(
593
+ if isinstance(first_elm, uni.IfStmt):
594
+ else_body: Optional[uni.ElseIf | uni.ElseStmt] = uni.ElseIf(
766
595
  condition=first_elm.condition,
767
596
  body=first_elm.body,
768
597
  else_body=first_elm.else_body,
769
598
  kid=first_elm.kid,
770
599
  )
771
600
  else:
772
- orelse2 = ast.SubNodeList[ast.CodeBlockStmt](
773
- items=valid_orelse,
774
- delim=Tok.WS,
775
- kid=orelse,
776
- left_enc=self.operator(Tok.LBRACE, "{"),
777
- right_enc=self.operator(Tok.RBRACE, "}"),
778
- )
779
- else_body = ast.ElseStmt(body=orelse2, kid=[orelse2])
601
+ else_body = uni.ElseStmt(body=valid_orelse, kid=valid_orelse)
780
602
  else:
781
603
  else_body = None
782
- if isinstance(test, ast.Expr):
783
- ret = ast.IfStmt(
604
+ if isinstance(test, uni.Expr):
605
+ ret = uni.IfStmt(
784
606
  condition=test,
785
607
  body=body2,
786
608
  else_body=else_body,
787
- kid=([test, body2, else_body] if else_body else [test, body2]),
609
+ kid=([test, *body2, else_body] if else_body else [test, *body2]),
788
610
  )
789
611
  else:
790
612
  raise self.ice()
791
613
  return ret
792
614
 
793
- def proc_with(self, node: py_ast.With) -> ast.WithStmt:
615
+ def proc_with(self, node: py_ast.With) -> uni.WithStmt:
794
616
  """Process With node.
795
617
 
796
618
  class With(stmt):
@@ -799,28 +621,21 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
799
621
  body: list[stmt]
800
622
  """
801
623
  items = [self.convert(item) for item in node.items]
802
- valid_items = [item for item in items if isinstance(item, ast.ExprAsItem)]
624
+ valid_items = [item for item in items if isinstance(item, uni.ExprAsItem)]
803
625
  if len(valid_items) != len(items):
804
626
  raise self.ice("Length mismatch in with items")
805
- items_sub = ast.SubNodeList[ast.ExprAsItem](
806
- items=valid_items, delim=Tok.COMMA, kid=items
807
- )
808
627
  body = [self.convert(stmt) for stmt in node.body]
809
- valid_body = [stmt for stmt in body if isinstance(stmt, ast.CodeBlockStmt)]
628
+ valid_body = [stmt for stmt in body if isinstance(stmt, uni.CodeBlockStmt)]
810
629
  if len(valid_body) != len(body):
811
630
  raise self.ice("Length mismatch in async for body")
812
- body_sub = ast.SubNodeList[ast.CodeBlockStmt](
813
- items=valid_body,
814
- delim=Tok.WS,
815
- kid=body,
816
- left_enc=self.operator(Tok.LBRACE, "{"),
817
- right_enc=self.operator(Tok.RBRACE, "}"),
818
- )
819
- return ast.WithStmt(
820
- is_async=False, exprs=items_sub, body=body_sub, kid=[items_sub, body_sub]
631
+ return uni.WithStmt(
632
+ is_async=False,
633
+ exprs=valid_items,
634
+ body=valid_body,
635
+ kid=[*valid_items, *valid_body],
821
636
  )
822
637
 
823
- def proc_async_with(self, node: py_ast.AsyncWith) -> ast.WithStmt:
638
+ def proc_async_with(self, node: py_ast.AsyncWith) -> uni.WithStmt:
824
639
  """Process AsyncWith node.
825
640
 
826
641
  class AsyncWith(stmt):
@@ -829,28 +644,21 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
829
644
  body: list[stmt]
830
645
  """
831
646
  items = [self.convert(item) for item in node.items]
832
- valid_items = [item for item in items if isinstance(item, ast.ExprAsItem)]
647
+ valid_items = [item for item in items if isinstance(item, uni.ExprAsItem)]
833
648
  if len(valid_items) != len(items):
834
649
  raise self.ice("Length mismatch in with items")
835
- items_sub = ast.SubNodeList[ast.ExprAsItem](
836
- items=valid_items, delim=Tok.COMMA, kid=items
837
- )
838
650
  body = [self.convert(stmt) for stmt in node.body]
839
- valid_body = [stmt for stmt in body if isinstance(stmt, ast.CodeBlockStmt)]
651
+ valid_body = [stmt for stmt in body if isinstance(stmt, uni.CodeBlockStmt)]
840
652
  if len(valid_body) != len(body):
841
653
  raise self.ice("Length mismatch in async for body")
842
- body_sub = ast.SubNodeList[ast.CodeBlockStmt](
843
- items=valid_body,
844
- delim=Tok.WS,
845
- kid=body,
846
- left_enc=self.operator(Tok.LBRACE, "{"),
847
- right_enc=self.operator(Tok.RBRACE, "}"),
848
- )
849
- return ast.WithStmt(
850
- is_async=True, exprs=items_sub, body=body_sub, kid=[items_sub, body_sub]
654
+ return uni.WithStmt(
655
+ is_async=True,
656
+ exprs=valid_items,
657
+ body=valid_body,
658
+ kid=[*valid_items, *valid_body],
851
659
  )
852
660
 
853
- def proc_raise(self, node: py_ast.Raise) -> ast.RaiseStmt:
661
+ def proc_raise(self, node: py_ast.Raise) -> uni.RaiseStmt:
854
662
  """Process python node.
855
663
 
856
664
  class Raise(stmt):
@@ -859,28 +667,28 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
859
667
  """
860
668
  exc = self.convert(node.exc) if node.exc else None
861
669
  cause = self.convert(node.cause) if node.cause else None
862
- kid: list[ast.Expr | ast.Token] = []
863
- if isinstance(exc, ast.Expr):
670
+ kid: list[uni.Expr | uni.Token] = []
671
+ if isinstance(exc, uni.Expr):
864
672
  kid = [exc]
865
- if isinstance(cause, ast.Expr):
673
+ if isinstance(cause, uni.Expr):
866
674
  kid.append(cause)
867
675
  if not (exc and cause):
868
676
  kid.append(self.operator(Tok.KW_RAISE, "raise"))
869
- if (isinstance(cause, ast.Expr) or cause is None) and (
870
- isinstance(exc, ast.Expr) or exc is None
677
+ if (isinstance(cause, uni.Expr) or cause is None) and (
678
+ isinstance(exc, uni.Expr) or exc is None
871
679
  ):
872
680
  if exc and not node.cause:
873
- return ast.RaiseStmt(
681
+ return uni.RaiseStmt(
874
682
  cause=exc,
875
683
  from_target=None,
876
684
  kid=[self.operator(Tok.KW_RAISE, "raise"), exc],
877
685
  )
878
686
  else:
879
- return ast.RaiseStmt(cause=cause, from_target=exc, kid=kid)
687
+ return uni.RaiseStmt(cause=cause, from_target=exc, kid=kid)
880
688
  else:
881
689
  raise self.ice()
882
690
 
883
- def proc_assert(self, node: py_ast.Assert) -> ast.AssertStmt:
691
+ def proc_assert(self, node: py_ast.Assert) -> uni.AssertStmt:
884
692
  """Process python node.
885
693
 
886
694
  class Assert(stmt):
@@ -889,8 +697,8 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
889
697
  """
890
698
  test = self.convert(node.test)
891
699
  msg = self.convert(node.msg) if node.msg else None
892
- if isinstance(test, ast.Expr) and (isinstance(msg, ast.Expr) or msg is None):
893
- return ast.AssertStmt(
700
+ if isinstance(test, uni.Expr) and (isinstance(msg, uni.Expr) or msg is None):
701
+ return uni.AssertStmt(
894
702
  condition=test,
895
703
  error_msg=msg,
896
704
  kid=[test, msg] if msg else [test],
@@ -898,7 +706,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
898
706
  else:
899
707
  raise self.ice()
900
708
 
901
- def proc_attribute(self, node: py_ast.Attribute) -> ast.AtomTrailer:
709
+ def proc_attribute(self, node: py_ast.Attribute) -> uni.AtomTrailer:
902
710
  """Proassignment targetscess python node.
903
711
 
904
712
  class Attribute(expr):
@@ -910,11 +718,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
910
718
  """
911
719
  value = self.convert(node.value)
912
720
  if (
913
- isinstance(value, ast.FuncCall)
914
- and isinstance(value.target, ast.Name)
721
+ isinstance(value, uni.FuncCall)
722
+ and isinstance(value.target, uni.Name)
915
723
  and value.target.value == "super"
916
724
  ):
917
- tok = ast.Name(
725
+ tok = uni.Name(
918
726
  orig_src=self.orig_src,
919
727
  name=Tok.KW_SUPER,
920
728
  value="super",
@@ -925,9 +733,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
925
733
  pos_start=0,
926
734
  pos_end=0,
927
735
  )
928
- value = ast.SpecialVarRef(var=tok)
736
+ value = uni.SpecialVarRef(var=tok)
929
737
  # exit()
930
- attribute = ast.Name(
738
+ attribute = uni.Name(
931
739
  orig_src=self.orig_src,
932
740
  name=Tok.NAME,
933
741
  value=(
@@ -942,8 +750,8 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
942
750
  pos_start=0,
943
751
  pos_end=0,
944
752
  )
945
- if isinstance(value, ast.Expr):
946
- return ast.AtomTrailer(
753
+ if isinstance(value, uni.Expr):
754
+ return uni.AtomTrailer(
947
755
  target=value,
948
756
  right=attribute,
949
757
  is_attr=True,
@@ -953,19 +761,19 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
953
761
  else:
954
762
  raise self.ice()
955
763
 
956
- def proc_await(self, node: py_ast.Await) -> ast.AwaitExpr:
764
+ def proc_await(self, node: py_ast.Await) -> uni.AwaitExpr:
957
765
  """Process python node.
958
766
 
959
767
  class Await(expr):
960
768
  value: expr
961
769
  """
962
770
  value = self.convert(node.value)
963
- if isinstance(value, ast.Expr):
964
- return ast.AwaitExpr(target=value, kid=[value])
771
+ if isinstance(value, uni.Expr):
772
+ return uni.AwaitExpr(target=value, kid=[value])
965
773
  else:
966
774
  raise self.ice()
967
775
 
968
- def proc_bin_op(self, node: py_ast.BinOp) -> ast.AtomUnit:
776
+ def proc_bin_op(self, node: py_ast.BinOp) -> uni.AtomUnit:
969
777
  """Process python node.
970
778
 
971
779
  class BinOp(expr):
@@ -979,17 +787,17 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
979
787
  op = self.convert(node.op)
980
788
  right = self.convert(node.right)
981
789
  if (
982
- isinstance(left, ast.Expr)
983
- and isinstance(op, ast.Token)
984
- and isinstance(right, ast.Expr)
790
+ isinstance(left, uni.Expr)
791
+ and isinstance(op, uni.Token)
792
+ and isinstance(right, uni.Expr)
985
793
  ):
986
- value = ast.BinaryExpr(
794
+ value = uni.BinaryExpr(
987
795
  left=left,
988
796
  op=op,
989
797
  right=right,
990
798
  kid=[left, op, right],
991
799
  )
992
- return ast.AtomUnit(
800
+ return uni.AtomUnit(
993
801
  value=value,
994
802
  kid=[
995
803
  self.operator(Tok.RPAREN, "("),
@@ -1000,7 +808,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1000
808
  else:
1001
809
  raise self.ice()
1002
810
 
1003
- def proc_unary_op(self, node: py_ast.UnaryOp) -> ast.UnaryExpr:
811
+ def proc_unary_op(self, node: py_ast.UnaryOp) -> uni.UnaryExpr:
1004
812
  """Process python node.
1005
813
 
1006
814
  class UnaryOp(expr):
@@ -1009,8 +817,8 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1009
817
  """
1010
818
  op = self.convert(node.op)
1011
819
  operand = self.convert(node.operand)
1012
- if isinstance(op, ast.Token) and isinstance(operand, ast.Expr):
1013
- return ast.UnaryExpr(
820
+ if isinstance(op, uni.Token) and isinstance(operand, uni.Expr):
821
+ return uni.UnaryExpr(
1014
822
  op=op,
1015
823
  operand=operand,
1016
824
  kid=[op, operand],
@@ -1018,7 +826,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1018
826
  else:
1019
827
  raise self.ice()
1020
828
 
1021
- def proc_bool_op(self, node: py_ast.BoolOp) -> ast.BoolExpr:
829
+ def proc_bool_op(self, node: py_ast.BoolOp) -> uni.AtomUnit:
1022
830
  """Process python node.
1023
831
 
1024
832
  class BoolOp(expr): a and b and c
@@ -1027,18 +835,23 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1027
835
  """
1028
836
  op = self.convert(node.op)
1029
837
  values = [self.convert(value) for value in node.values]
1030
- valid = [value for value in values if isinstance(value, ast.Expr)]
1031
- valid_values = ast.SubNodeList[ast.Expr](
1032
- items=valid, delim=Tok.COMMA, kid=values
1033
- )
1034
- if isinstance(op, ast.Token) and len(valid) == len(values):
1035
- return ast.BoolExpr(op=op, values=valid, kid=[op, valid_values])
838
+ valid = [value for value in values if isinstance(value, uni.Expr)]
839
+ if isinstance(op, uni.Token) and len(valid) == len(values):
840
+ expr = uni.BoolExpr(op=op, values=valid, kid=[op, *valid])
841
+ return uni.AtomUnit(
842
+ value=expr,
843
+ kid=[
844
+ self.operator(Tok.RPAREN, "("),
845
+ expr,
846
+ self.operator(Tok.LPAREN, ")"),
847
+ ],
848
+ )
1036
849
  else:
1037
850
  raise self.ice()
1038
851
 
1039
- def proc_break(self, node: py_ast.Break) -> ast.CtrlStmt:
852
+ def proc_break(self, node: py_ast.Break) -> uni.CtrlStmt:
1040
853
  """Process python node."""
1041
- break_tok = ast.Token(
854
+ break_tok = uni.Token(
1042
855
  orig_src=self.orig_src,
1043
856
  name=Tok.KW_BREAK,
1044
857
  value="break",
@@ -1049,9 +862,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1049
862
  pos_start=0,
1050
863
  pos_end=0,
1051
864
  )
1052
- return ast.CtrlStmt(ctrl=break_tok, kid=[break_tok])
865
+ return uni.CtrlStmt(ctrl=break_tok, kid=[break_tok])
1053
866
 
1054
- def proc_call(self, node: py_ast.Call) -> ast.FuncCall:
867
+ def proc_call(self, node: py_ast.Call) -> uni.FuncCall:
1055
868
  """Process python node.
1056
869
 
1057
870
  class Call(expr):
@@ -1062,33 +875,31 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1062
875
  keywords: list[keyword]
1063
876
  """
1064
877
  func = self.convert(node.func)
1065
- params_in: list[ast.Expr | ast.KWPair] = []
878
+ params_in: list[uni.Expr | uni.KWPair] = []
1066
879
  args = [self.convert(arg) for arg in node.args]
1067
880
  keywords = [self.convert(keyword) for keyword in node.keywords]
1068
881
 
1069
882
  for i in args:
1070
- if isinstance(i, ast.Expr):
883
+ if isinstance(i, uni.Expr):
1071
884
  params_in.append(i)
1072
885
  for i in keywords:
1073
- if isinstance(i, ast.KWPair):
886
+ if isinstance(i, uni.KWPair):
1074
887
  params_in.append(i)
1075
888
  if len(params_in) != 0:
1076
- params_in2 = ast.SubNodeList[ast.Expr | ast.KWPair](
1077
- items=params_in, delim=Tok.COMMA, kid=params_in
1078
- )
889
+ kids = [func, *params_in]
1079
890
  else:
1080
- params_in2 = None
1081
- if isinstance(func, ast.Expr):
1082
- return ast.FuncCall(
891
+ kids = [func]
892
+ if isinstance(func, uni.Expr):
893
+ return uni.FuncCall(
1083
894
  target=func,
1084
- params=params_in2,
895
+ params=params_in,
1085
896
  genai_call=None,
1086
- kid=[func, params_in2] if params_in2 else [func],
897
+ kid=kids,
1087
898
  )
1088
899
  else:
1089
900
  raise self.ice()
1090
901
 
1091
- def proc_compare(self, node: py_ast.Compare) -> ast.CompareExpr:
902
+ def proc_compare(self, node: py_ast.Compare) -> uni.AtomUnit:
1092
903
  """Process python node.
1093
904
 
1094
905
  class Compare(expr):
@@ -1101,28 +912,32 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1101
912
  left = self.convert(node.left)
1102
913
  comparators = [self.convert(comparator) for comparator in node.comparators]
1103
914
  valid_comparators = [
1104
- comparator for comparator in comparators if isinstance(comparator, ast.Expr)
915
+ comparator for comparator in comparators if isinstance(comparator, uni.Expr)
1105
916
  ]
1106
- comparators2 = ast.SubNodeList[ast.Expr](
1107
- items=valid_comparators, delim=Tok.COMMA, kid=comparators
1108
- )
1109
917
  ops = [self.convert(op) for op in node.ops]
1110
- valid_ops = [op for op in ops if isinstance(op, ast.Token)]
1111
- ops2 = ast.SubNodeList[ast.Token](items=valid_ops, delim=Tok.COMMA, kid=ops)
918
+ valid_ops = [op for op in ops if isinstance(op, uni.Token)]
1112
919
 
1113
- kids = [left, ops2, comparators2]
920
+ kids = [left, *valid_ops, *valid_comparators]
1114
921
  if (
1115
- isinstance(left, ast.Expr)
922
+ isinstance(left, uni.Expr)
1116
923
  and len(ops) == len(valid_ops)
1117
924
  and len(comparators) == len(valid_comparators)
1118
925
  ):
1119
- return ast.CompareExpr(
926
+ expr = uni.CompareExpr(
1120
927
  left=left, rights=valid_comparators, ops=valid_ops, kid=kids
1121
928
  )
929
+ return uni.AtomUnit(
930
+ value=expr,
931
+ kid=[
932
+ self.operator(Tok.RPAREN, "("),
933
+ expr,
934
+ self.operator(Tok.LPAREN, ")"),
935
+ ],
936
+ )
1122
937
  else:
1123
938
  raise self.ice()
1124
939
 
1125
- def proc_constant(self, node: py_ast.Constant) -> ast.Literal:
940
+ def proc_constant(self, node: py_ast.Constant) -> uni.Literal:
1126
941
  """Process python node.
1127
942
 
1128
943
  class Constant(expr):
@@ -1133,12 +948,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1133
948
  n: int | float | complex
1134
949
  """
1135
950
  type_mapping = {
1136
- int: ast.Int,
1137
- float: ast.Float,
1138
- str: ast.String,
1139
- bytes: ast.String,
1140
- bool: ast.Bool,
1141
- type(None): ast.Null,
951
+ int: uni.Int,
952
+ float: uni.Float,
953
+ str: uni.String,
954
+ bytes: uni.String,
955
+ bool: uni.Bool,
956
+ type(None): uni.Null,
1142
957
  }
1143
958
  value_type = type(node.value)
1144
959
  if value_type in type_mapping:
@@ -1167,7 +982,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1167
982
  pos_end=0,
1168
983
  )
1169
984
  elif node.value == Ellipsis:
1170
- return ast.Ellipsis(
985
+ return uni.Ellipsis(
1171
986
  orig_src=self.orig_src,
1172
987
  name=Tok.ELLIPSIS,
1173
988
  value="...",
@@ -1181,9 +996,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1181
996
  else:
1182
997
  raise self.ice("Invalid type for constant")
1183
998
 
1184
- def proc_continue(self, node: py_ast.Continue) -> ast.CtrlStmt:
999
+ def proc_continue(self, node: py_ast.Continue) -> uni.CtrlStmt:
1185
1000
  """Process python node."""
1186
- continue_tok = ast.Token(
1001
+ continue_tok = uni.Token(
1187
1002
  orig_src=self.orig_src,
1188
1003
  name=Tok.KW_CONTINUE,
1189
1004
  value="continue",
@@ -1194,9 +1009,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1194
1009
  pos_start=0,
1195
1010
  pos_end=0,
1196
1011
  )
1197
- return ast.CtrlStmt(ctrl=continue_tok, kid=[continue_tok])
1012
+ return uni.CtrlStmt(ctrl=continue_tok, kid=[continue_tok])
1198
1013
 
1199
- def proc_dict(self, node: py_ast.Dict) -> ast.DictVal:
1014
+ def proc_dict(self, node: py_ast.Dict) -> uni.DictVal:
1200
1015
  """Process python node.
1201
1016
 
1202
1017
  class Dict(expr):
@@ -1205,18 +1020,18 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1205
1020
  """
1206
1021
  keys = [self.convert(i) if i else None for i in node.keys]
1207
1022
  values = [self.convert(i) for i in node.values]
1208
- valid_keys = [i for i in keys if isinstance(i, ast.Expr) or i is None]
1209
- valid_values = [i for i in values if isinstance(i, ast.Expr)]
1210
- kvpair: list[ast.KVPair] = []
1023
+ valid_keys = [i for i in keys if isinstance(i, uni.Expr) or i is None]
1024
+ valid_values = [i for i in values if isinstance(i, uni.Expr)]
1025
+ kvpair: list[uni.KVPair] = []
1211
1026
  for i in range(len(values)):
1212
1027
  key_pluck = valid_keys[i]
1213
- kvp = ast.KVPair(
1028
+ kvp = uni.KVPair(
1214
1029
  key=key_pluck,
1215
1030
  value=valid_values[i],
1216
1031
  kid=([key_pluck, valid_values[i]] if key_pluck else [valid_values[i]]),
1217
1032
  )
1218
1033
  kvpair.append(kvp)
1219
- return ast.DictVal(
1034
+ return uni.DictVal(
1220
1035
  kv_pairs=kvpair,
1221
1036
  kid=(
1222
1037
  [*kvpair]
@@ -1225,7 +1040,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1225
1040
  ),
1226
1041
  )
1227
1042
 
1228
- def proc_dict_comp(self, node: py_ast.DictComp) -> ast.DictCompr:
1043
+ def proc_dict_comp(self, node: py_ast.DictComp) -> uni.DictCompr:
1229
1044
  """Process python node.
1230
1045
 
1231
1046
  class DictComp(expr):
@@ -1235,21 +1050,20 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1235
1050
  """
1236
1051
  key = self.convert(node.key)
1237
1052
  value = self.convert(node.value)
1238
- if isinstance(key, ast.Expr) and isinstance(value, ast.Expr):
1239
- kv_pair = ast.KVPair(key=key, value=value, kid=[key, value])
1053
+ if isinstance(key, uni.Expr) and isinstance(value, uni.Expr):
1054
+ kv_pair = uni.KVPair(key=key, value=value, kid=[key, value])
1240
1055
  else:
1241
1056
  raise self.ice()
1242
1057
  generators = [self.convert(i) for i in node.generators]
1243
- valid = [i for i in generators if isinstance(i, (ast.InnerCompr))]
1058
+ valid = [i for i in generators if isinstance(i, (uni.InnerCompr))]
1244
1059
  if len(valid) != len(generators):
1245
1060
  raise self.ice("Length mismatch in dict compr generators")
1246
- compr = ast.SubNodeList[ast.InnerCompr](items=valid, delim=Tok.COMMA, kid=valid)
1247
- return ast.DictCompr(kv_pair=kv_pair, compr=valid, kid=[kv_pair, compr])
1061
+ return uni.DictCompr(kv_pair=kv_pair, compr=valid, kid=[kv_pair, *valid])
1248
1062
 
1249
1063
  def proc_ellipsis(self, node: py_ast.Ellipsis) -> None:
1250
1064
  """Process python node."""
1251
1065
 
1252
- def proc_except_handler(self, node: py_ast.ExceptHandler) -> ast.Except:
1066
+ def proc_except_handler(self, node: py_ast.ExceptHandler) -> uni.Except:
1253
1067
  """Process python node.
1254
1068
 
1255
1069
  class ExceptHandler(excepthandler):
@@ -1258,9 +1072,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1258
1072
  body: list[stmt]
1259
1073
  """
1260
1074
  type = self.convert(node.type) if node.type else None
1261
- name: ast.Name | None = None
1075
+ name: uni.Name | None = None
1262
1076
  if not type and not node.name:
1263
- type = ast.Name(
1077
+ type = uni.Name(
1264
1078
  orig_src=self.orig_src,
1265
1079
  name=Tok.NAME,
1266
1080
  value="Exception",
@@ -1271,7 +1085,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1271
1085
  pos_start=0,
1272
1086
  pos_end=0,
1273
1087
  )
1274
- name = ast.Name(
1088
+ name = uni.Name(
1275
1089
  orig_src=self.orig_src,
1276
1090
  name=Tok.NAME,
1277
1091
  value="e",
@@ -1283,7 +1097,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1283
1097
  pos_end=0,
1284
1098
  )
1285
1099
  else:
1286
- # type = ast.Name(
1100
+ # type = uni.Name(
1287
1101
  # orig_src=self.orig_src,
1288
1102
  # name=Tok.NAME,
1289
1103
  # value=no,
@@ -1295,7 +1109,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1295
1109
  # pos_end=0,
1296
1110
  # )
1297
1111
  name = (
1298
- ast.Name(
1112
+ uni.Name(
1299
1113
  orig_src=self.orig_src,
1300
1114
  name=Tok.NAME,
1301
1115
  value=node.name,
@@ -1311,40 +1125,33 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1311
1125
  )
1312
1126
 
1313
1127
  body = [self.convert(i) for i in node.body]
1314
- valid = [i for i in body if isinstance(i, (ast.CodeBlockStmt))]
1128
+ valid = [i for i in body if isinstance(i, (uni.CodeBlockStmt))]
1315
1129
  if len(valid) != len(body):
1316
1130
  raise self.ice("Length mismatch in except handler body")
1317
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
1318
- items=valid,
1319
- delim=Tok.WS,
1320
- kid=valid,
1321
- left_enc=self.operator(Tok.LBRACE, "{"),
1322
- right_enc=self.operator(Tok.RBRACE, "}"),
1323
- )
1324
- kid = [item for item in [type, name, valid_body] if item]
1325
- if isinstance(type, ast.Expr) and (isinstance(name, ast.Name) or not name):
1326
- return ast.Except(
1131
+ kid = [item for item in [type, name, *valid] if item]
1132
+ if isinstance(type, uni.Expr) and (isinstance(name, uni.Name) or not name):
1133
+ return uni.Except(
1327
1134
  ex_type=type,
1328
1135
  name=name,
1329
- body=valid_body,
1136
+ body=valid,
1330
1137
  kid=kid,
1331
1138
  )
1332
1139
  else:
1333
1140
  raise self.ice()
1334
1141
 
1335
- def proc_expr(self, node: py_ast.Expr) -> ast.ExprStmt:
1142
+ def proc_expr(self, node: py_ast.Expr) -> uni.ExprStmt:
1336
1143
  """Process python node.
1337
1144
 
1338
1145
  class Expr(stmt):
1339
1146
  value: expr
1340
1147
  """
1341
1148
  value = self.convert(node.value)
1342
- if isinstance(value, ast.Expr):
1343
- return ast.ExprStmt(expr=value, in_fstring=False, kid=[value])
1149
+ if isinstance(value, uni.Expr):
1150
+ return uni.ExprStmt(expr=value, in_fstring=False, kid=[value])
1344
1151
  else:
1345
1152
  raise self.ice()
1346
1153
 
1347
- def proc_formatted_value(self, node: py_ast.FormattedValue) -> ast.ExprStmt:
1154
+ def proc_formatted_value(self, node: py_ast.FormattedValue) -> uni.ExprStmt:
1348
1155
  """Process python node.
1349
1156
 
1350
1157
  class FormattedValue(expr):
@@ -1355,8 +1162,8 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1355
1162
  format_spec: expr | None
1356
1163
  """
1357
1164
  value = self.convert(node.value)
1358
- if isinstance(value, ast.Expr):
1359
- ret = ast.ExprStmt(
1165
+ if isinstance(value, uni.Expr):
1166
+ ret = uni.ExprStmt(
1360
1167
  expr=value,
1361
1168
  in_fstring=True,
1362
1169
  kid=[value],
@@ -1368,7 +1175,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1368
1175
  def proc_function_type(self, node: py_ast.FunctionType) -> None:
1369
1176
  """Process python node."""
1370
1177
 
1371
- def proc_generator_exp(self, node: py_ast.GeneratorExp) -> ast.GenCompr:
1178
+ def proc_generator_exp(self, node: py_ast.GeneratorExp) -> uni.GenCompr:
1372
1179
  """Process python node..
1373
1180
 
1374
1181
  class SetComp(expr):
@@ -1377,25 +1184,24 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1377
1184
  """
1378
1185
  elt = self.convert(node.elt)
1379
1186
  generators = [self.convert(gen) for gen in node.generators]
1380
- valid = [gen for gen in generators if isinstance(gen, ast.InnerCompr)]
1187
+ valid = [gen for gen in generators if isinstance(gen, uni.InnerCompr)]
1381
1188
  if len(generators) != len(valid):
1382
1189
  raise self.ice("Length mismatch in list comp generators")
1383
- compr = ast.SubNodeList[ast.InnerCompr](items=valid, delim=Tok.COMMA, kid=valid)
1384
- if isinstance(elt, ast.Expr):
1385
- return ast.GenCompr(out_expr=elt, compr=valid, kid=[elt, compr])
1190
+ if isinstance(elt, uni.Expr):
1191
+ return uni.GenCompr(out_expr=elt, compr=valid, kid=[elt, *valid])
1386
1192
  else:
1387
1193
  raise self.ice()
1388
1194
 
1389
- def proc_global(self, node: py_ast.Global) -> ast.GlobalStmt:
1195
+ def proc_global(self, node: py_ast.Global) -> uni.GlobalStmt:
1390
1196
  """Process python node.
1391
1197
 
1392
1198
  class Global(stmt):
1393
1199
  names: list[_Identifier]
1394
1200
  """
1395
- names: list[ast.NameAtom] = []
1201
+ names: list[uni.NameAtom] = []
1396
1202
  for id in node.names:
1397
1203
  names.append(
1398
- ast.Name(
1204
+ uni.Name(
1399
1205
  orig_src=self.orig_src,
1400
1206
  name=Tok.NAME,
1401
1207
  value=id,
@@ -1407,10 +1213,9 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1407
1213
  pos_end=0,
1408
1214
  )
1409
1215
  )
1410
- target = ast.SubNodeList[ast.NameAtom](items=names, delim=Tok.COMMA, kid=names)
1411
- return ast.GlobalStmt(target=target, kid=[target])
1216
+ return uni.GlobalStmt(target=names, kid=names)
1412
1217
 
1413
- def proc_if_exp(self, node: py_ast.IfExp) -> ast.IfElseExpr:
1218
+ def proc_if_exp(self, node: py_ast.IfExp) -> uni.IfElseExpr:
1414
1219
  """Process python node.
1415
1220
 
1416
1221
  class IfExp(expr):
@@ -1422,33 +1227,33 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1422
1227
  body = self.convert(node.body)
1423
1228
  orelse = self.convert(node.orelse)
1424
1229
  if (
1425
- isinstance(test, ast.Expr)
1426
- and isinstance(body, ast.Expr)
1427
- and isinstance(orelse, ast.Expr)
1230
+ isinstance(test, uni.Expr)
1231
+ and isinstance(body, uni.Expr)
1232
+ and isinstance(orelse, uni.Expr)
1428
1233
  ):
1429
- return ast.IfElseExpr(
1234
+ return uni.IfElseExpr(
1430
1235
  value=body, condition=test, else_value=orelse, kid=[body, test, orelse]
1431
1236
  )
1432
1237
  else:
1433
1238
  raise self.ice()
1434
1239
 
1435
- def proc_import(self, node: py_ast.Import) -> ast.Import:
1240
+ def proc_import(self, node: py_ast.Import) -> uni.Import:
1436
1241
  """Process python node.
1437
1242
 
1438
1243
  class Import(stmt):
1439
1244
  names: list[alias]
1440
1245
  """
1441
1246
  names = [self.convert(name) for name in node.names]
1442
- valid_names = [name for name in names if isinstance(name, ast.ExprAsItem)]
1247
+ valid_names = [name for name in names if isinstance(name, uni.ExprAsItem)]
1443
1248
  if len(valid_names) != len(names):
1444
- self.error("Length mismatch in import names")
1249
+ self.log_error("Length mismatch in import names")
1445
1250
  paths = []
1446
1251
  for name in valid_names:
1447
- if isinstance(name.expr, ast.Name) and (
1448
- isinstance(name.alias, ast.Name) or name.alias is None
1252
+ if isinstance(name.expr, uni.Name) and (
1253
+ isinstance(name.alias, uni.Name) or name.alias is None
1449
1254
  ):
1450
1255
  paths.append(
1451
- ast.ModulePath(
1256
+ uni.ModulePath(
1452
1257
  path=[name.expr],
1453
1258
  level=0,
1454
1259
  alias=name.alias,
@@ -1458,29 +1263,15 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1458
1263
  # Need to unravel atom trailers
1459
1264
  else:
1460
1265
  raise self.ice()
1461
- lang = ast.Name(
1462
- orig_src=self.orig_src,
1463
- name=Tok.NAME,
1464
- value="py",
1465
- line=node.lineno,
1466
- end_line=node.end_lineno if node.end_lineno else node.lineno,
1467
- col_start=node.col_offset,
1468
- col_end=0,
1469
- pos_start=0,
1470
- pos_end=0,
1471
- )
1472
- pytag = ast.SubTag[ast.Name](tag=lang, kid=[lang])
1473
- items = ast.SubNodeList[ast.ModulePath](items=paths, delim=Tok.COMMA, kid=paths)
1474
- ret = ast.Import(
1475
- hint=pytag,
1266
+ ret = uni.Import(
1476
1267
  from_loc=None,
1477
- items=items,
1268
+ items=paths,
1478
1269
  is_absorb=False,
1479
- kid=[pytag, items],
1270
+ kid=paths,
1480
1271
  )
1481
1272
  return ret
1482
1273
 
1483
- def proc_import_from(self, node: py_ast.ImportFrom) -> ast.Import:
1274
+ def proc_import_from(self, node: py_ast.ImportFrom) -> uni.Import:
1484
1275
  """Process python node.
1485
1276
 
1486
1277
  class ImportFrom(stmt):
@@ -1488,7 +1279,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1488
1279
  names: list[alias]
1489
1280
  level: int
1490
1281
  """
1491
- lang = ast.Name(
1282
+ lang = uni.Name(
1492
1283
  orig_src=self.orig_src,
1493
1284
  name=Tok.NAME,
1494
1285
  value="py",
@@ -1499,11 +1290,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1499
1290
  pos_start=0,
1500
1291
  pos_end=0,
1501
1292
  )
1502
- modpaths: list[ast.Name] = []
1293
+ modpaths: list[uni.Name] = []
1503
1294
  if node.module:
1504
1295
  for i in node.module.split("."):
1505
1296
  modpaths.append(
1506
- ast.Name(
1297
+ uni.Name(
1507
1298
  orig_src=self.orig_src,
1508
1299
  name=Tok.NAME,
1509
1300
  value=i,
@@ -1517,22 +1308,23 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1517
1308
  )
1518
1309
  moddots = [self.operator(Tok.DOT, ".") for _ in range(node.level)]
1519
1310
  modparts = moddots + modpaths
1520
- path = ast.ModulePath(
1521
- path=modpaths,
1311
+ path = uni.ModulePath(
1312
+ path=modpaths if modpaths else None,
1522
1313
  level=node.level,
1523
1314
  alias=None,
1524
1315
  kid=modparts,
1525
1316
  )
1317
+
1526
1318
  names = [self.convert(name) for name in node.names]
1527
1319
  valid_names = []
1528
1320
  for name in names:
1529
1321
  if (
1530
- isinstance(name, ast.ExprAsItem)
1531
- and isinstance(name.expr, ast.Name)
1532
- and (isinstance(name.alias, ast.Name) or name.alias is None)
1322
+ isinstance(name, uni.ExprAsItem)
1323
+ and isinstance(name.expr, uni.Name)
1324
+ and (isinstance(name.alias, uni.Name) or name.alias is None)
1533
1325
  ):
1534
1326
  valid_names.append(
1535
- ast.ModuleItem(
1327
+ uni.ModuleItem(
1536
1328
  name=name.expr,
1537
1329
  alias=name.alias if name.alias else None,
1538
1330
  kid=[i for i in name.kid if i],
@@ -1540,38 +1332,27 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1540
1332
  )
1541
1333
  else:
1542
1334
  raise self.ice()
1543
- items = (
1544
- ast.SubNodeList[ast.ModuleItem](
1545
- items=valid_names, delim=Tok.COMMA, kid=valid_names
1546
- )
1547
- if valid_names
1548
- else None
1549
- )
1335
+ items = valid_names
1550
1336
  if not items:
1551
1337
  raise self.ice("No valid names in import from")
1552
- pytag = ast.SubTag[ast.Name](tag=lang, kid=[lang])
1338
+ pytag = uni.SubTag[uni.Name](tag=lang, kid=[lang])
1553
1339
  if len(node.names) == 1 and node.names[0].name == "*":
1554
- path_in = ast.SubNodeList[ast.ModulePath](
1555
- items=[path], delim=Tok.COMMA, kid=[path]
1556
- )
1557
- ret = ast.Import(
1558
- hint=pytag,
1340
+ ret = uni.Import(
1559
1341
  from_loc=None,
1560
- items=path_in,
1342
+ items=[path],
1561
1343
  is_absorb=True,
1562
- kid=[pytag, path_in],
1344
+ kid=[pytag, path],
1563
1345
  )
1564
1346
  return ret
1565
- ret = ast.Import(
1566
- hint=pytag,
1347
+ ret = uni.Import(
1567
1348
  from_loc=path,
1568
1349
  items=items,
1569
1350
  is_absorb=False,
1570
- kid=[pytag, path, items],
1351
+ kid=[pytag, path, *items],
1571
1352
  )
1572
1353
  return ret
1573
1354
 
1574
- def proc_joined_str(self, node: py_ast.JoinedStr) -> ast.FString:
1355
+ def proc_joined_str(self, node: py_ast.JoinedStr) -> uni.FString:
1575
1356
  """Process python node.
1576
1357
 
1577
1358
  class JoinedStr(expr):
@@ -1581,14 +1362,14 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1581
1362
  """
1582
1363
  values = [self.convert(value) for value in node.values]
1583
1364
  valid = [
1584
- value for value in values if isinstance(value, (ast.String, ast.ExprStmt))
1365
+ value for value in values if isinstance(value, (uni.String, uni.ExprStmt))
1585
1366
  ]
1586
- valid_values = ast.SubNodeList[ast.String | ast.ExprStmt](
1587
- items=valid, delim=None, kid=valid
1367
+ return uni.FString(
1368
+ parts=valid,
1369
+ kid=[*valid] if valid else [uni.EmptyToken()],
1588
1370
  )
1589
- return ast.FString(parts=valid_values, kid=[valid_values])
1590
1371
 
1591
- def proc_lambda(self, node: py_ast.Lambda) -> ast.LambdaExpr:
1372
+ def proc_lambda(self, node: py_ast.Lambda) -> uni.LambdaExpr:
1592
1373
  """Process python node.
1593
1374
 
1594
1375
  class Lambda(expr):
@@ -1597,12 +1378,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1597
1378
  """
1598
1379
  args = self.convert(node.args)
1599
1380
  body = self.convert(node.body)
1600
- if isinstance(args, ast.FuncSignature) and isinstance(body, ast.Expr):
1601
- return ast.LambdaExpr(signature=args, body=body, kid=[args, body])
1381
+ if isinstance(args, uni.FuncSignature) and isinstance(body, uni.Expr):
1382
+ return uni.LambdaExpr(signature=args, body=body, kid=[args, body])
1602
1383
  else:
1603
1384
  raise self.ice()
1604
1385
 
1605
- def proc_list(self, node: py_ast.List) -> ast.ListVal:
1386
+ def proc_list(self, node: py_ast.List) -> uni.ListVal:
1606
1387
  """Process python node.
1607
1388
 
1608
1389
  class List(expr):
@@ -1610,23 +1391,17 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1610
1391
  ctx: expr_context
1611
1392
  """
1612
1393
  elts = [self.convert(elt) for elt in node.elts]
1613
- valid_elts = [elt for elt in elts if isinstance(elt, ast.Expr)]
1394
+ valid_elts = [elt for elt in elts if isinstance(elt, uni.Expr)]
1614
1395
  if len(valid_elts) != len(elts):
1615
1396
  raise self.ice("Length mismatch in list elements")
1616
1397
  l_square = self.operator(Tok.LSQUARE, "[")
1617
1398
  r_square = self.operator(Tok.RSQUARE, "]")
1618
- return ast.ListVal(
1619
- values=(
1620
- ast.SubNodeList[ast.Expr](
1621
- items=valid_elts, delim=Tok.COMMA, kid=valid_elts
1622
- )
1623
- if valid_elts
1624
- else None
1625
- ),
1399
+ return uni.ListVal(
1400
+ values=valid_elts,
1626
1401
  kid=[*valid_elts] if valid_elts else [l_square, r_square],
1627
1402
  )
1628
1403
 
1629
- def proc_list_comp(self, node: py_ast.ListComp) -> ast.ListCompr:
1404
+ def proc_list_comp(self, node: py_ast.ListComp) -> uni.ListCompr:
1630
1405
  """Process python node.
1631
1406
 
1632
1407
  class ListComp(expr):
@@ -1635,16 +1410,15 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1635
1410
  """
1636
1411
  elt = self.convert(node.elt)
1637
1412
  generators = [self.convert(gen) for gen in node.generators]
1638
- valid = [gen for gen in generators if isinstance(gen, ast.InnerCompr)]
1413
+ valid = [gen for gen in generators if isinstance(gen, uni.InnerCompr)]
1639
1414
  if len(generators) != len(valid):
1640
1415
  raise self.ice("Length mismatch in list comp generators")
1641
- compr = ast.SubNodeList[ast.InnerCompr](items=valid, delim=Tok.COMMA, kid=valid)
1642
- if isinstance(elt, ast.Expr):
1643
- return ast.ListCompr(out_expr=elt, compr=valid, kid=[elt, compr])
1416
+ if isinstance(elt, uni.Expr):
1417
+ return uni.ListCompr(out_expr=elt, compr=valid, kid=[elt, *valid])
1644
1418
  else:
1645
1419
  raise self.ice()
1646
1420
 
1647
- def proc_match(self, node: py_ast.Match) -> ast.MatchStmt:
1421
+ def proc_match(self, node: py_ast.Match) -> uni.MatchStmt:
1648
1422
  """Process python node.
1649
1423
 
1650
1424
  class Match(stmt):
@@ -1653,13 +1427,13 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1653
1427
  """
1654
1428
  subject = self.convert(node.subject)
1655
1429
  cases = [self.convert(i) for i in node.cases]
1656
- valid = [case for case in cases if isinstance(case, ast.MatchCase)]
1657
- if isinstance(subject, ast.Expr):
1658
- return ast.MatchStmt(target=subject, cases=valid, kid=[subject, *valid])
1430
+ valid = [case for case in cases if isinstance(case, uni.MatchCase)]
1431
+ if isinstance(subject, uni.Expr):
1432
+ return uni.MatchStmt(target=subject, cases=valid, kid=[subject, *valid])
1659
1433
  else:
1660
1434
  raise self.ice()
1661
1435
 
1662
- def proc_match_as(self, node: py_ast.MatchAs) -> ast.MatchAs | ast.MatchWild:
1436
+ def proc_match_as(self, node: py_ast.MatchAs) -> uni.MatchAs | uni.MatchWild:
1663
1437
  """Process python node.
1664
1438
 
1665
1439
  class MatchAs(pattern):
@@ -1667,7 +1441,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1667
1441
  name: _Identifier | None
1668
1442
  """
1669
1443
  pattern = self.convert(node.pattern) if node.pattern else None
1670
- name = ast.Name(
1444
+ name = uni.Name(
1671
1445
  orig_src=self.orig_src,
1672
1446
  name=Tok.NAME,
1673
1447
  value=node.name if node.name else "_",
@@ -1683,16 +1457,20 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1683
1457
  pos_end=0,
1684
1458
  )
1685
1459
 
1686
- if isinstance(pattern, ast.MatchPattern):
1687
- return ast.MatchAs(
1688
- name=name,
1689
- pattern=pattern,
1690
- kid=[name, pattern] if pattern else [name],
1691
- )
1692
- else:
1693
- return ast.MatchWild(kid=[name])
1460
+ if (
1461
+ name.value == "_"
1462
+ or pattern is not None
1463
+ and not isinstance(pattern, uni.MatchPattern)
1464
+ ):
1465
+ return uni.MatchWild(kid=[name])
1466
+
1467
+ return uni.MatchAs(
1468
+ name=name,
1469
+ pattern=pattern,
1470
+ kid=[name] if pattern is None else [name, pattern],
1471
+ )
1694
1472
 
1695
- def proc_match_class(self, node: py_ast.MatchClass) -> ast.MatchArch:
1473
+ def proc_match_class(self, node: py_ast.MatchClass) -> uni.MatchArch:
1696
1474
  """Process python node.
1697
1475
 
1698
1476
  class MatchClass(pattern):
@@ -1705,23 +1483,21 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1705
1483
  kid = [cls]
1706
1484
  if len(node.patterns) != 0:
1707
1485
  patterns = [self.convert(i) for i in node.patterns]
1708
- valid_patterns = [i for i in patterns if isinstance(i, ast.MatchPattern)]
1486
+ valid_patterns = [i for i in patterns if isinstance(i, uni.MatchPattern)]
1709
1487
  if len(patterns) == len(valid_patterns):
1710
- patterns_sub = ast.SubNodeList[ast.MatchPattern](
1711
- items=valid_patterns, delim=Tok.COMMA, kid=valid_patterns
1712
- )
1713
- kid.append(patterns_sub)
1488
+ kid.extend(valid_patterns)
1489
+ patterns_list = valid_patterns
1714
1490
  else:
1715
1491
  raise self.ice()
1716
1492
  else:
1717
- patterns_sub = None
1493
+ patterns_list = None
1718
1494
 
1719
1495
  if len(node.kwd_patterns):
1720
- names: list[ast.Name] = []
1721
- kv_pairs: list[ast.MatchKVPair] = []
1496
+ names: list[uni.Name] = []
1497
+ kv_pairs: list[uni.MatchKVPair] = []
1722
1498
  for kwd_attrs in node.kwd_attrs:
1723
1499
  names.append(
1724
- ast.Name(
1500
+ uni.Name(
1725
1501
  orig_src=self.orig_src,
1726
1502
  name=Tok.NAME,
1727
1503
  value=kwd_attrs,
@@ -1735,30 +1511,32 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1735
1511
  )
1736
1512
  kwd_patterns = [self.convert(i) for i in node.kwd_patterns]
1737
1513
  valid_kwd_patterns = [
1738
- i for i in kwd_patterns if isinstance(i, ast.MatchPattern)
1514
+ i for i in kwd_patterns if isinstance(i, uni.MatchPattern)
1739
1515
  ]
1740
1516
  for i in range(len(kwd_patterns)):
1741
1517
  kv_pairs.append(
1742
- ast.MatchKVPair(
1518
+ uni.MatchKVPair(
1743
1519
  key=names[i],
1744
1520
  value=valid_kwd_patterns[i],
1745
1521
  kid=[names[i], valid_kwd_patterns[i]],
1746
1522
  )
1747
1523
  )
1748
- kw_patterns = ast.SubNodeList[ast.MatchKVPair](
1749
- items=kv_pairs, delim=Tok.COMMA, kid=kv_pairs
1750
- )
1751
- kid.append(kw_patterns)
1524
+
1525
+ kid.extend(kv_pairs)
1526
+ kw_patterns_list = kv_pairs
1752
1527
  else:
1753
- kw_patterns = None
1754
- if isinstance(cls, (ast.NameAtom, ast.AtomTrailer)):
1755
- return ast.MatchArch(
1756
- name=cls, arg_patterns=patterns_sub, kw_patterns=kw_patterns, kid=kid
1528
+ kw_patterns_list = None
1529
+ if isinstance(cls, (uni.NameAtom, uni.AtomTrailer)):
1530
+ return uni.MatchArch(
1531
+ name=cls,
1532
+ arg_patterns=patterns_list,
1533
+ kw_patterns=kw_patterns_list,
1534
+ kid=kid,
1757
1535
  )
1758
1536
  else:
1759
1537
  raise self.ice()
1760
1538
 
1761
- def proc_match_mapping(self, node: py_ast.MatchMapping) -> ast.MatchMapping:
1539
+ def proc_match_mapping(self, node: py_ast.MatchMapping) -> uni.MatchMapping:
1762
1540
  """Process python node.
1763
1541
 
1764
1542
  class MatchMapping(pattern):
@@ -1766,22 +1544,24 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1766
1544
  patterns: list[pattern]
1767
1545
  rest: _Identifier | None
1768
1546
  """
1769
- values: list[ast.MatchKVPair | ast.MatchStar] = []
1547
+ values: list[uni.MatchKVPair | uni.MatchStar] = []
1770
1548
  keys = [self.convert(i) for i in node.keys]
1771
1549
  valid_keys = [
1772
- i for i in keys if isinstance(i, (ast.MatchPattern, ast.NameAtom))
1550
+ i
1551
+ for i in keys
1552
+ if isinstance(i, (uni.MatchPattern, uni.NameAtom, uni.AtomExpr))
1773
1553
  ]
1774
1554
  patterns = [self.convert(i) for i in node.patterns]
1775
- valid_patterns = [i for i in patterns if isinstance(i, ast.MatchPattern)]
1555
+ valid_patterns = [i for i in patterns if isinstance(i, uni.MatchPattern)]
1776
1556
  for i in range(len(valid_keys)):
1777
- kv_pair = ast.MatchKVPair(
1557
+ kv_pair = uni.MatchKVPair(
1778
1558
  key=valid_keys[i],
1779
1559
  value=valid_patterns[i],
1780
1560
  kid=[valid_keys[i], valid_patterns[i]],
1781
1561
  )
1782
1562
  values.append(kv_pair)
1783
1563
  if node.rest:
1784
- name = ast.Name(
1564
+ name = uni.Name(
1785
1565
  orig_src=self.orig_src,
1786
1566
  name=Tok.NAME,
1787
1567
  value=node.rest,
@@ -1792,40 +1572,40 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1792
1572
  pos_start=0,
1793
1573
  pos_end=0,
1794
1574
  )
1795
- values.append(ast.MatchStar(name=name, is_list=True, kid=[name]))
1796
- return ast.MatchMapping(values=values, kid=values)
1575
+ values.append(uni.MatchStar(name=name, is_list=False, kid=[name]))
1576
+ return uni.MatchMapping(values=values, kid=values)
1797
1577
 
1798
- def proc_match_or(self, node: py_ast.MatchOr) -> ast.MatchOr:
1578
+ def proc_match_or(self, node: py_ast.MatchOr) -> uni.MatchOr:
1799
1579
  """Process python node.
1800
1580
 
1801
1581
  class MatchOr(pattern):
1802
1582
  patterns: list[pattern]
1803
1583
  """
1804
1584
  patterns = [self.convert(i) for i in node.patterns]
1805
- valid = [i for i in patterns if isinstance(i, ast.MatchPattern)]
1806
- return ast.MatchOr(patterns=valid, kid=valid)
1585
+ valid = [i for i in patterns if isinstance(i, uni.MatchPattern)]
1586
+ return uni.MatchOr(patterns=valid, kid=valid)
1807
1587
 
1808
- def proc_match_sequence(self, node: py_ast.MatchSequence) -> ast.MatchSequence:
1588
+ def proc_match_sequence(self, node: py_ast.MatchSequence) -> uni.MatchSequence:
1809
1589
  """Process python node.
1810
1590
 
1811
1591
  class MatchSequence(pattern):
1812
1592
  patterns: list[pattern]
1813
1593
  """
1814
1594
  patterns = [self.convert(i) for i in node.patterns]
1815
- valid = [i for i in patterns if isinstance(i, ast.MatchPattern)]
1595
+ valid = [i for i in patterns if isinstance(i, uni.MatchPattern)]
1816
1596
  if len(patterns) == len(valid):
1817
- return ast.MatchSequence(values=valid, kid=valid)
1597
+ return uni.MatchSequence(values=valid, kid=valid)
1818
1598
  else:
1819
1599
  raise self.ice()
1820
1600
 
1821
- def proc_match_singleton(self, node: py_ast.MatchSingleton) -> ast.MatchSingleton:
1601
+ def proc_match_singleton(self, node: py_ast.MatchSingleton) -> uni.MatchSingleton:
1822
1602
  """Process python node.
1823
1603
 
1824
1604
  class MatchSingleton(pattern):
1825
1605
  value: Literal[True, False] | None
1826
1606
  """
1827
1607
  type = Tok.NULL if node.value is None else Tok.BOOL
1828
- ret_type = ast.Null if node.value is None else ast.Bool
1608
+ ret_type = uni.Null if node.value is None else uni.Bool
1829
1609
  value = ret_type(
1830
1610
  orig_src=self.orig_src,
1831
1611
  name=type,
@@ -1837,18 +1617,18 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1837
1617
  pos_start=0,
1838
1618
  pos_end=0,
1839
1619
  )
1840
- if isinstance(value, (ast.Bool, ast.Null)):
1841
- return ast.MatchSingleton(value=value, kid=[value])
1620
+ if isinstance(value, (uni.Bool, uni.Null)):
1621
+ return uni.MatchSingleton(value=value, kid=[value])
1842
1622
  else:
1843
1623
  raise self.ice()
1844
1624
 
1845
- def proc_match_star(self, node: py_ast.MatchStar) -> ast.MatchStar:
1625
+ def proc_match_star(self, node: py_ast.MatchStar) -> uni.MatchStar:
1846
1626
  """Process python node.
1847
1627
 
1848
1628
  class MatchStar(pattern):
1849
1629
  name: _Identifier | None
1850
1630
  """
1851
- name = ast.Name(
1631
+ name = uni.Name(
1852
1632
  orig_src=self.orig_src,
1853
1633
  name=Tok.NAME,
1854
1634
  value=node.name if node.name else "_",
@@ -1859,21 +1639,21 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1859
1639
  pos_start=0,
1860
1640
  pos_end=0,
1861
1641
  )
1862
- return ast.MatchStar(name=name, is_list=True, kid=[name])
1642
+ return uni.MatchStar(name=name, is_list=True, kid=[name])
1863
1643
 
1864
- def proc_match_value(self, node: py_ast.MatchValue) -> ast.MatchValue:
1644
+ def proc_match_value(self, node: py_ast.MatchValue) -> uni.MatchValue:
1865
1645
  """Process python node.
1866
1646
 
1867
1647
  class MatchValue(pattern):
1868
1648
  value: expr
1869
1649
  """
1870
1650
  value = self.convert(node.value)
1871
- if isinstance(value, ast.Expr):
1872
- return ast.MatchValue(value=value, kid=[value])
1651
+ if isinstance(value, uni.Expr):
1652
+ return uni.MatchValue(value=value, kid=[value])
1873
1653
  else:
1874
1654
  raise self.ice()
1875
1655
 
1876
- def proc_name(self, node: py_ast.Name) -> ast.Name:
1656
+ def proc_name(self, node: py_ast.Name) -> uni.Name:
1877
1657
  """Process python node.
1878
1658
 
1879
1659
  class Name(expr):
@@ -1891,7 +1671,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1891
1671
  ]
1892
1672
 
1893
1673
  value = node.id if node.id not in reserved_keywords else f"<>{node.id}"
1894
- ret = ast.Name(
1674
+ ret = uni.Name(
1895
1675
  orig_src=self.orig_src,
1896
1676
  name=Tok.NAME,
1897
1677
  value=value,
@@ -1904,7 +1684,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1904
1684
  )
1905
1685
  return ret
1906
1686
 
1907
- def proc_named_expr(self, node: py_ast.NamedExpr) -> ast.BinaryExpr:
1687
+ def proc_named_expr(self, node: py_ast.NamedExpr) -> uni.AtomUnit:
1908
1688
  """Process python node.
1909
1689
 
1910
1690
  class NamedExpr(expr):
@@ -1913,17 +1693,26 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1913
1693
  """
1914
1694
  target = self.convert(node.target)
1915
1695
  value = self.convert(node.value)
1916
- if isinstance(value, ast.Expr) and isinstance(target, ast.Name):
1917
- return ast.BinaryExpr(
1696
+ if isinstance(value, uni.Expr) and isinstance(target, uni.Name):
1697
+ op = self.operator(Tok.WALRUS_EQ, ":=")
1698
+ expr = uni.BinaryExpr(
1918
1699
  left=target,
1919
- op=self.operator(Tok.WALRUS_EQ, ":="),
1700
+ op=op,
1920
1701
  right=value,
1921
- kid=[target, value],
1702
+ kid=[target, op, value],
1703
+ )
1704
+ return uni.AtomUnit(
1705
+ value=expr,
1706
+ kid=[
1707
+ self.operator(Tok.RPAREN, "("),
1708
+ expr,
1709
+ self.operator(Tok.LPAREN, ")"),
1710
+ ],
1922
1711
  )
1923
1712
  else:
1924
1713
  raise self.ice()
1925
1714
 
1926
- def proc_nonlocal(self, node: py_ast.Nonlocal) -> ast.NonLocalStmt:
1715
+ def proc_nonlocal(self, node: py_ast.Nonlocal) -> uni.NonLocalStmt:
1927
1716
  """Process python node.
1928
1717
 
1929
1718
  class Nonlocal(stmt):
@@ -1933,11 +1722,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1933
1722
 
1934
1723
  reserved_keywords = [v for _, v in TOKEN_MAP.items()]
1935
1724
 
1936
- names: list[ast.NameAtom] = []
1725
+ names: list[uni.NameAtom] = []
1937
1726
  for name in node.names:
1938
1727
  value = name if name not in reserved_keywords else f"<>{name}"
1939
1728
  names.append(
1940
- ast.Name(
1729
+ uni.Name(
1941
1730
  orig_src=self.orig_src,
1942
1731
  name=Tok.NAME,
1943
1732
  value=value,
@@ -1949,12 +1738,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1949
1738
  pos_end=0,
1950
1739
  )
1951
1740
  )
1952
- target = ast.SubNodeList[ast.NameAtom](items=names, delim=Tok.COMMA, kid=names)
1953
- return ast.NonLocalStmt(target=target, kid=names)
1741
+ return uni.NonLocalStmt(target=names, kid=names)
1954
1742
 
1955
- def proc_pass(self, node: py_ast.Pass) -> ast.Semi:
1743
+ def proc_pass(self, node: py_ast.Pass) -> uni.Semi:
1956
1744
  """Process python node."""
1957
- return ast.Semi(
1745
+ return uni.Semi(
1958
1746
  orig_src=self.orig_src,
1959
1747
  name=Tok.SEMI,
1960
1748
  value=";",
@@ -1966,7 +1754,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1966
1754
  pos_end=0,
1967
1755
  )
1968
1756
 
1969
- def proc_set(self, node: py_ast.Set) -> ast.SetVal:
1757
+ def proc_set(self, node: py_ast.Set) -> uni.SetVal:
1970
1758
  """Process python node.
1971
1759
 
1972
1760
  class Set(expr):
@@ -1974,21 +1762,18 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1974
1762
  """
1975
1763
  if len(node.elts) != 0:
1976
1764
  elts = [self.convert(i) for i in node.elts]
1977
- valid = [i for i in elts if isinstance(i, (ast.Expr))]
1765
+ valid = [i for i in elts if isinstance(i, (uni.Expr))]
1978
1766
  if len(valid) != len(elts):
1979
1767
  raise self.ice("Length mismatch in set body")
1980
- valid_elts = ast.SubNodeList[ast.Expr](
1981
- items=valid, delim=Tok.COMMA, kid=valid
1982
- )
1983
- kid: list[ast.AstNode] = [*valid]
1768
+ kid: list[uni.UniNode] = [*valid]
1984
1769
  else:
1985
- valid_elts = None
1770
+ valid = []
1986
1771
  l_brace = self.operator(Tok.LBRACE, "{")
1987
1772
  r_brace = self.operator(Tok.RBRACE, "}")
1988
1773
  kid = [l_brace, r_brace]
1989
- return ast.SetVal(values=valid_elts, kid=kid)
1774
+ return uni.SetVal(values=valid, kid=kid)
1990
1775
 
1991
- def proc_set_comp(self, node: py_ast.SetComp) -> ast.ListCompr:
1776
+ def proc_set_comp(self, node: py_ast.SetComp) -> uni.ListCompr:
1992
1777
  """Process python node.
1993
1778
 
1994
1779
  class SetComp(expr):
@@ -1997,16 +1782,15 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
1997
1782
  """
1998
1783
  elt = self.convert(node.elt)
1999
1784
  generators = [self.convert(gen) for gen in node.generators]
2000
- valid = [gen for gen in generators if isinstance(gen, ast.InnerCompr)]
1785
+ valid = [gen for gen in generators if isinstance(gen, uni.InnerCompr)]
2001
1786
  if len(generators) != len(valid):
2002
1787
  raise self.ice("Length mismatch in list comp generators")
2003
- compr = ast.SubNodeList[ast.InnerCompr](items=valid, delim=Tok.COMMA, kid=valid)
2004
- if isinstance(elt, ast.Expr):
2005
- return ast.SetCompr(out_expr=elt, compr=valid, kid=[elt, compr])
1788
+ if isinstance(elt, uni.Expr):
1789
+ return uni.SetCompr(out_expr=elt, compr=valid, kid=[elt, *valid])
2006
1790
  else:
2007
1791
  raise self.ice()
2008
1792
 
2009
- def proc_slice(self, node: py_ast.Slice) -> ast.IndexSlice:
1793
+ def proc_slice(self, node: py_ast.Slice) -> uni.IndexSlice:
2010
1794
  """Process python node.
2011
1795
 
2012
1796
  class Slice(_Slice):
@@ -2021,19 +1805,19 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2021
1805
  if not valid_kid:
2022
1806
  valid_kid = [self.operator(Tok.COLON, ":")]
2023
1807
  if (
2024
- (isinstance(lower, ast.Expr) or lower is None)
2025
- and (isinstance(upper, ast.Expr) or upper is None)
2026
- and (isinstance(step, ast.Expr) or step is None)
1808
+ (isinstance(lower, uni.Expr) or lower is None)
1809
+ and (isinstance(upper, uni.Expr) or upper is None)
1810
+ and (isinstance(step, uni.Expr) or step is None)
2027
1811
  ):
2028
- return ast.IndexSlice(
2029
- slices=[ast.IndexSlice.Slice(lower, upper, step)],
1812
+ return uni.IndexSlice(
1813
+ slices=[uni.IndexSlice.Slice(lower, upper, step)],
2030
1814
  is_range=True,
2031
1815
  kid=valid_kid,
2032
1816
  )
2033
1817
  else:
2034
1818
  raise self.ice()
2035
1819
 
2036
- def proc_starred(self, node: py_ast.Starred) -> ast.UnaryExpr:
1820
+ def proc_starred(self, node: py_ast.Starred) -> uni.UnaryExpr:
2037
1821
  """Process python node.
2038
1822
 
2039
1823
  class Starred(expr):
@@ -2042,12 +1826,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2042
1826
  """
2043
1827
  star_tok = self.operator(Tok.STAR_MUL, "*")
2044
1828
  value = self.convert(node.value)
2045
- if isinstance(value, ast.Expr):
2046
- return ast.UnaryExpr(operand=value, op=star_tok, kid=[value, star_tok])
1829
+ if isinstance(value, uni.Expr):
1830
+ return uni.UnaryExpr(operand=value, op=star_tok, kid=[value, star_tok])
2047
1831
  else:
2048
1832
  raise self.ice()
2049
1833
 
2050
- def proc_subscript(self, node: py_ast.Subscript) -> ast.AtomTrailer:
1834
+ def proc_subscript(self, node: py_ast.Subscript) -> uni.AtomTrailer:
2051
1835
  """Process python node.
2052
1836
 
2053
1837
  class Subscript(expr):
@@ -2057,32 +1841,32 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2057
1841
  """
2058
1842
  value = self.convert(node.value)
2059
1843
  slice = self.convert(node.slice)
2060
- if not isinstance(slice, ast.IndexSlice) and isinstance(slice, ast.Expr):
2061
- slice = ast.IndexSlice(
2062
- slices=[ast.IndexSlice.Slice(slice, None, None)],
1844
+ if not isinstance(slice, uni.IndexSlice) and isinstance(slice, uni.Expr):
1845
+ slice = uni.IndexSlice(
1846
+ slices=[uni.IndexSlice.Slice(slice, None, None)],
2063
1847
  is_range=False,
2064
1848
  kid=[slice],
2065
1849
  )
2066
1850
  if (
2067
- not isinstance(slice, ast.IndexSlice)
2068
- and isinstance(slice, ast.TupleVal)
2069
- and slice.values is not None
1851
+ not isinstance(slice, uni.IndexSlice)
1852
+ and isinstance(slice, uni.TupleVal)
1853
+ and slice.values
2070
1854
  ):
2071
1855
 
2072
- slices: list[ast.IndexSlice.Slice] = []
2073
- for index_slice in slice.values.items:
2074
- if not isinstance(index_slice, ast.IndexSlice):
1856
+ slices: list[uni.IndexSlice.Slice] = []
1857
+ for index_slice in slice.values:
1858
+ if not isinstance(index_slice, uni.IndexSlice):
2075
1859
  raise self.ice()
2076
1860
  slices.append(index_slice.slices[0])
2077
1861
 
2078
- slice = ast.IndexSlice(
1862
+ slice = uni.IndexSlice(
2079
1863
  slices=slices,
2080
1864
  is_range=True,
2081
1865
  kid=[slice],
2082
1866
  )
2083
1867
 
2084
- if isinstance(value, ast.Expr) and isinstance(slice, ast.IndexSlice):
2085
- return ast.AtomTrailer(
1868
+ if isinstance(value, uni.Expr) and isinstance(slice, uni.IndexSlice):
1869
+ return uni.AtomTrailer(
2086
1870
  target=value,
2087
1871
  right=slice,
2088
1872
  is_attr=False,
@@ -2092,7 +1876,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2092
1876
  else:
2093
1877
  raise self.ice()
2094
1878
 
2095
- def proc_try(self, node: py_ast.Try | py_ast.TryStar) -> ast.TryStmt:
1879
+ def proc_try(self, node: py_ast.Try | py_ast.TryStar) -> uni.TryStmt:
2096
1880
  """Process python node.
2097
1881
 
2098
1882
  class Try(stmt):
@@ -2102,76 +1886,59 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2102
1886
  finalbody: list[stmt]
2103
1887
  """
2104
1888
  body = [self.convert(i) for i in node.body]
2105
- valid = [i for i in body if isinstance(i, (ast.CodeBlockStmt))]
1889
+ valid = [i for i in body if isinstance(i, (uni.CodeBlockStmt))]
2106
1890
  if len(valid) != len(body):
2107
1891
  raise self.ice("Length mismatch in try body")
2108
- valid_body = ast.SubNodeList[ast.CodeBlockStmt](
2109
- items=valid,
2110
- delim=Tok.WS,
2111
- kid=valid,
2112
- left_enc=self.operator(Tok.LBRACE, "{"),
2113
- right_enc=self.operator(Tok.RBRACE, "}"),
2114
- )
2115
- kid: list[ast.AstNode] = [valid_body]
1892
+ valid_body = valid
1893
+ kid: list[uni.UniNode] = [*valid_body]
2116
1894
 
2117
1895
  if len(node.handlers) != 0:
2118
1896
  handlers = [self.convert(i) for i in node.handlers]
2119
- valid_handlers = [i for i in handlers if isinstance(i, (ast.Except))]
1897
+ valid_handlers = [i for i in handlers if isinstance(i, (uni.Except))]
2120
1898
  if len(handlers) != len(valid_handlers):
2121
1899
  raise self.ice("Length mismatch in try handlers")
2122
- excepts = ast.SubNodeList[ast.Except](
2123
- items=valid_handlers, delim=Tok.WS, kid=valid_handlers
2124
- )
2125
- kid.append(excepts)
1900
+ excepts = valid_handlers
1901
+ kid.extend(valid_handlers)
2126
1902
  else:
2127
- excepts = None
1903
+ excepts = []
2128
1904
 
2129
1905
  if len(node.orelse) != 0:
2130
1906
  orelse = [self.convert(i) for i in node.orelse]
2131
- valid_orelse = [i for i in orelse if isinstance(i, (ast.CodeBlockStmt))]
1907
+ valid_orelse = [i for i in orelse if isinstance(i, (uni.CodeBlockStmt))]
2132
1908
  if len(orelse) != len(valid_orelse):
2133
1909
  raise self.ice("Length mismatch in try orelse")
2134
- else_body = ast.SubNodeList[ast.CodeBlockStmt](
2135
- items=valid_orelse,
2136
- delim=Tok.WS,
2137
- kid=valid_orelse,
2138
- left_enc=self.operator(Tok.LBRACE, "{"),
2139
- right_enc=self.operator(Tok.RBRACE, "}"),
2140
- )
2141
- elsestmt = ast.ElseStmt(body=else_body, kid=[else_body])
2142
- kid.append(else_body)
1910
+ else_body = valid_orelse
1911
+ elsestmt = uni.ElseStmt(body=else_body, kid=else_body)
1912
+ kid.extend(else_body)
2143
1913
  else:
2144
1914
  else_body = None
2145
1915
 
2146
1916
  if len(node.finalbody) != 0:
2147
1917
  finalbody = [self.convert(i) for i in node.finalbody]
2148
1918
  valid_finalbody = [
2149
- i for i in finalbody if isinstance(i, (ast.CodeBlockStmt))
1919
+ i for i in finalbody if isinstance(i, (uni.CodeBlockStmt))
2150
1920
  ]
2151
1921
  if len(finalbody) != len(valid_finalbody):
2152
1922
  raise self.ice("Length mismatch in try finalbody")
2153
- finally_body = ast.SubNodeList[ast.CodeBlockStmt](
2154
- items=valid_finalbody,
2155
- delim=Tok.WS,
2156
- kid=valid_finalbody,
2157
- left_enc=self.operator(Tok.LBRACE, "{"),
2158
- right_enc=self.operator(Tok.RBRACE, "}"),
1923
+ finally_stmt_obj: Optional[uni.FinallyStmt] = (
1924
+ fin_append := uni.FinallyStmt(
1925
+ body=valid_finalbody,
1926
+ kid=valid_finalbody,
1927
+ )
2159
1928
  )
2160
- finally_stmt = ast.FinallyStmt(body=finally_body, kid=[finally_body])
2161
-
2162
- kid.append(finally_stmt)
1929
+ kid.append(fin_append)
2163
1930
  else:
2164
- finally_body = None
2165
- ret = ast.TryStmt(
1931
+ finally_stmt_obj = None
1932
+ ret = uni.TryStmt(
2166
1933
  body=valid_body,
2167
1934
  excepts=excepts,
2168
1935
  else_body=elsestmt if else_body else None,
2169
- finally_body=finally_stmt if finally_body else None,
1936
+ finally_body=finally_stmt_obj,
2170
1937
  kid=kid,
2171
1938
  )
2172
1939
  return ret
2173
1940
 
2174
- def proc_try_star(self, node: py_ast.TryStar) -> ast.TryStmt:
1941
+ def proc_try_star(self, node: py_ast.TryStar) -> uni.TryStmt:
2175
1942
  """Process python node.
2176
1943
 
2177
1944
  class Try(stmt):
@@ -2182,7 +1949,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2182
1949
  """
2183
1950
  return self.proc_try(node)
2184
1951
 
2185
- def proc_tuple(self, node: py_ast.Tuple) -> ast.TupleVal:
1952
+ def proc_tuple(self, node: py_ast.Tuple) -> uni.TupleVal:
2186
1953
  """Process python node.
2187
1954
 
2188
1955
  class Tuple(expr):
@@ -2191,52 +1958,49 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2191
1958
  """
2192
1959
  elts = [self.convert(elt) for elt in node.elts]
2193
1960
  if len(node.elts) != 0:
2194
- valid = [i for i in elts if isinstance(i, (ast.Expr, ast.KWPair))]
2195
- if len(elts) != len(valid):
1961
+ valid_elts = [i for i in elts if isinstance(i, (uni.Expr, uni.KWPair))]
1962
+ if len(elts) != len(valid_elts):
2196
1963
  raise self.ice("Length mismatch in tuple elts")
2197
- valid_elts = ast.SubNodeList[ast.Expr | ast.KWPair](
2198
- items=valid, delim=Tok.COMMA, kid=valid
2199
- )
2200
1964
  kid = elts
2201
1965
  else:
2202
1966
  l_paren = self.operator(Tok.LPAREN, "(")
2203
1967
  r_paren = self.operator(Tok.RPAREN, ")")
2204
- valid_elts = None
1968
+ valid_elts = []
2205
1969
  kid = [l_paren, r_paren]
2206
- return ast.TupleVal(values=valid_elts, kid=kid)
1970
+ return uni.TupleVal(values=valid_elts, kid=kid)
2207
1971
 
2208
- def proc_yield(self, node: py_ast.Yield) -> ast.YieldExpr:
1972
+ def proc_yield(self, node: py_ast.Yield) -> uni.YieldExpr:
2209
1973
  """Process python node.
2210
1974
 
2211
1975
  class Yield(expr):
2212
1976
  value: expr | None
2213
1977
  """
2214
1978
  value = self.convert(node.value) if node.value else None
2215
- if isinstance(value, ast.Expr):
2216
- return ast.YieldExpr(expr=value, with_from=False, kid=[value])
1979
+ if isinstance(value, uni.Expr):
1980
+ return uni.YieldExpr(expr=value, with_from=False, kid=[value])
2217
1981
  elif not value:
2218
- return ast.YieldExpr(
1982
+ return uni.YieldExpr(
2219
1983
  expr=None, with_from=False, kid=[self.operator(Tok.KW_YIELD, "yield")]
2220
1984
  )
2221
1985
  else:
2222
1986
  raise self.ice()
2223
1987
 
2224
- def proc_yield_from(self, node: py_ast.YieldFrom) -> ast.YieldExpr:
1988
+ def proc_yield_from(self, node: py_ast.YieldFrom) -> uni.YieldExpr:
2225
1989
  """Process python node."""
2226
1990
  value = self.convert(node.value)
2227
- if isinstance(value, ast.Expr):
2228
- return ast.YieldExpr(expr=value, with_from=True, kid=[value])
1991
+ if isinstance(value, uni.Expr):
1992
+ return uni.YieldExpr(expr=value, with_from=True, kid=[value])
2229
1993
  else:
2230
1994
  raise self.ice()
2231
1995
 
2232
- def proc_alias(self, node: py_ast.alias) -> ast.ExprAsItem:
1996
+ def proc_alias(self, node: py_ast.alias) -> uni.ExprAsItem:
2233
1997
  """Process python node.
2234
1998
 
2235
1999
  class alias(AST):
2236
2000
  name: _Identifier
2237
2001
  asname: _Identifier | None
2238
2002
  """
2239
- name = ast.Name(
2003
+ name = uni.Name(
2240
2004
  orig_src=self.orig_src,
2241
2005
  name=Tok.NAME,
2242
2006
  value=node.name,
@@ -2248,7 +2012,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2248
2012
  pos_end=0,
2249
2013
  )
2250
2014
  asname = (
2251
- ast.Name(
2015
+ uni.Name(
2252
2016
  orig_src=self.orig_src,
2253
2017
  name=Tok.NAME,
2254
2018
  value=node.asname,
@@ -2262,11 +2026,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2262
2026
  if node.asname
2263
2027
  else None
2264
2028
  )
2265
- return ast.ExprAsItem(
2029
+ return uni.ExprAsItem(
2266
2030
  expr=name, alias=asname, kid=[name, asname] if asname else [name]
2267
2031
  )
2268
2032
 
2269
- def proc_arg(self, node: py_ast.arg) -> ast.ParamVar:
2033
+ def proc_arg(self, node: py_ast.arg) -> uni.ParamVar:
2270
2034
  """Process python node.
2271
2035
 
2272
2036
  class arg(AST):
@@ -2282,7 +2046,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2282
2046
  ]
2283
2047
 
2284
2048
  value = node.arg if node.arg not in reserved_keywords else f"<>{node.arg}"
2285
- name = ast.Name(
2049
+ name = uni.Name(
2286
2050
  orig_src=self.orig_src,
2287
2051
  name=Tok.NAME,
2288
2052
  value=value,
@@ -2296,7 +2060,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2296
2060
  ann_expr = (
2297
2061
  self.convert(node.annotation)
2298
2062
  if node.annotation
2299
- else ast.Name(
2063
+ else uni.Name(
2300
2064
  orig_src=self.orig_src,
2301
2065
  name=Tok.NAME,
2302
2066
  value="Any",
@@ -2308,15 +2072,15 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2308
2072
  pos_end=0,
2309
2073
  )
2310
2074
  )
2311
- if not isinstance(ann_expr, ast.Expr):
2075
+ if not isinstance(ann_expr, uni.Expr):
2312
2076
  raise self.ice("Expected annotation to be an expression")
2313
- annot = ast.SubTag[ast.Expr](tag=ann_expr, kid=[ann_expr])
2314
- paramvar = ast.ParamVar(
2077
+ annot = uni.SubTag[uni.Expr](tag=ann_expr, kid=[ann_expr])
2078
+ paramvar = uni.ParamVar(
2315
2079
  name=name, type_tag=annot, unpack=None, value=None, kid=[name, annot]
2316
2080
  )
2317
2081
  return paramvar
2318
2082
 
2319
- def proc_arguments(self, node: py_ast.arguments) -> ast.FuncSignature:
2083
+ def proc_arguments(self, node: py_ast.arguments) -> uni.FuncSignature:
2320
2084
  """Process python node.
2321
2085
 
2322
2086
  class arguments(AST):
@@ -2329,8 +2093,8 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2329
2093
  """
2330
2094
  args = [self.convert(arg) for arg in node.args]
2331
2095
  vararg = self.convert(node.vararg) if node.vararg else None
2332
- if vararg and isinstance(vararg, ast.ParamVar):
2333
- vararg.unpack = ast.Token(
2096
+ if vararg and isinstance(vararg, uni.ParamVar):
2097
+ vararg.unpack = uni.Token(
2334
2098
  orig_src=self.orig_src,
2335
2099
  name=Tok.STAR_MUL,
2336
2100
  value="*",
@@ -2349,14 +2113,14 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2349
2113
  kwdefault = self.convert(kwd) if kwd else None
2350
2114
  if (
2351
2115
  kwdefault
2352
- and isinstance(kwa, ast.ParamVar)
2353
- and isinstance(kwdefault, ast.Expr)
2116
+ and isinstance(kwa, uni.ParamVar)
2117
+ and isinstance(kwdefault, uni.Expr)
2354
2118
  ):
2355
2119
  kwa.value = kwdefault
2356
2120
  kwa.add_kids_right([kwa.value])
2357
2121
  kwarg = self.convert(node.kwarg) if node.kwarg else None
2358
- if kwarg and isinstance(kwarg, ast.ParamVar):
2359
- kwarg.unpack = ast.Token(
2122
+ if kwarg and isinstance(kwarg, uni.ParamVar):
2123
+ kwarg.unpack = uni.Token(
2360
2124
  orig_src=self.orig_src,
2361
2125
  name=Tok.STAR_POW,
2362
2126
  value="**",
@@ -2371,7 +2135,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2371
2135
  defaults = [self.convert(expr) for expr in node.defaults]
2372
2136
  params = [*args]
2373
2137
  for param, default in zip(params[::-1], defaults[::-1]):
2374
- if isinstance(default, ast.Expr) and isinstance(param, ast.ParamVar):
2138
+ if isinstance(default, uni.Expr) and isinstance(param, uni.ParamVar):
2375
2139
  param.value = default
2376
2140
  param.add_kids_right([default])
2377
2141
  if vararg:
@@ -2381,28 +2145,24 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2381
2145
  params.append(kwarg)
2382
2146
  params += defaults
2383
2147
 
2384
- valid_params = [param for param in params if isinstance(param, ast.ParamVar)]
2148
+ valid_params = [param for param in params if isinstance(param, uni.ParamVar)]
2385
2149
  if valid_params:
2386
- fs_params = ast.SubNodeList[ast.ParamVar](
2387
- items=valid_params, delim=Tok.COMMA, kid=valid_params
2388
- )
2389
- return ast.FuncSignature(
2150
+ fs_params = valid_params
2151
+ return uni.FuncSignature(
2390
2152
  params=fs_params,
2391
2153
  return_type=None,
2392
- kid=[fs_params],
2154
+ kid=fs_params,
2393
2155
  )
2394
2156
  else:
2395
- _lparen = self.operator(Tok.LPAREN, "(")
2396
- _rparen = self.operator(Tok.RPAREN, ")")
2397
- return ast.FuncSignature(
2398
- params=None,
2157
+ return uni.FuncSignature(
2158
+ params=[],
2399
2159
  return_type=None,
2400
- kid=[_lparen, _rparen],
2160
+ kid=[self.operator(Tok.LPAREN, "("), self.operator(Tok.RPAREN, ")")],
2401
2161
  )
2402
2162
 
2403
- def operator(self, tok: Tok, value: str) -> ast.Token:
2163
+ def operator(self, tok: Tok, value: str) -> uni.Token:
2404
2164
  """Create an operator token."""
2405
- return ast.Token(
2165
+ return uni.Token(
2406
2166
  orig_src=self.orig_src,
2407
2167
  name=tok,
2408
2168
  value=value,
@@ -2414,123 +2174,123 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2414
2174
  pos_end=0,
2415
2175
  )
2416
2176
 
2417
- def proc_and(self, node: py_ast.And) -> ast.Token:
2177
+ def proc_and(self, node: py_ast.And) -> uni.Token:
2418
2178
  """Process python node."""
2419
2179
  return self.operator(Tok.KW_AND, "and")
2420
2180
 
2421
- def proc_or(self, node: py_ast.Or) -> ast.Token:
2181
+ def proc_or(self, node: py_ast.Or) -> uni.Token:
2422
2182
  """Process python node."""
2423
2183
  return self.operator(Tok.KW_OR, "or")
2424
2184
 
2425
- def proc_add(self, node: py_ast.Add) -> ast.Token:
2185
+ def proc_add(self, node: py_ast.Add) -> uni.Token:
2426
2186
  """Process python node."""
2427
2187
  return self.operator(Tok.PLUS, "+")
2428
2188
 
2429
- def proc_bit_and(self, node: py_ast.BitAnd) -> ast.Token:
2189
+ def proc_bit_and(self, node: py_ast.BitAnd) -> uni.Token:
2430
2190
  """Process python node."""
2431
2191
  return self.operator(Tok.BW_AND, "&")
2432
2192
 
2433
- def proc_bit_or(self, node: py_ast.BitOr) -> ast.Token:
2193
+ def proc_bit_or(self, node: py_ast.BitOr) -> uni.Token:
2434
2194
  """Process python node."""
2435
2195
  return self.operator(Tok.BW_OR, "|")
2436
2196
 
2437
- def proc_bit_xor(self, node: py_ast.BitXor) -> ast.Token:
2197
+ def proc_bit_xor(self, node: py_ast.BitXor) -> uni.Token:
2438
2198
  """Process python node."""
2439
2199
  return self.operator(Tok.BW_XOR, "^")
2440
2200
 
2441
- def proc_div(self, node: py_ast.Div) -> ast.Token:
2201
+ def proc_div(self, node: py_ast.Div) -> uni.Token:
2442
2202
  """Process python node."""
2443
2203
  return self.operator(Tok.DIV, "/")
2444
2204
 
2445
- def proc_floor_div(self, node: py_ast.FloorDiv) -> ast.Token:
2205
+ def proc_floor_div(self, node: py_ast.FloorDiv) -> uni.Token:
2446
2206
  """Process python node."""
2447
2207
  return self.operator(Tok.FLOOR_DIV, "//")
2448
2208
 
2449
- def proc_l_shift(self, node: py_ast.LShift) -> ast.Token:
2209
+ def proc_l_shift(self, node: py_ast.LShift) -> uni.Token:
2450
2210
  """Process python node."""
2451
2211
  return self.operator(Tok.LSHIFT, "<<")
2452
2212
 
2453
- def proc_mod(self, node: py_ast.Mod) -> ast.Token:
2213
+ def proc_mod(self, node: py_ast.Mod) -> uni.Token:
2454
2214
  """Process python node."""
2455
2215
  return self.operator(Tok.MOD, "%")
2456
2216
 
2457
- def proc_mult(self, node: py_ast.Mult) -> ast.Token:
2217
+ def proc_mult(self, node: py_ast.Mult) -> uni.Token:
2458
2218
  """Process python node."""
2459
2219
  return self.operator(Tok.STAR_MUL, "*")
2460
2220
 
2461
- def proc_mat_mult(self, node: py_ast.MatMult) -> ast.Token:
2221
+ def proc_mat_mult(self, node: py_ast.MatMult) -> uni.Token:
2462
2222
  """Process python node."""
2463
2223
  return self.operator(Tok.DECOR_OP, "@")
2464
2224
 
2465
- def proc_pow(self, node: py_ast.Pow) -> ast.Token:
2225
+ def proc_pow(self, node: py_ast.Pow) -> uni.Token:
2466
2226
  """Process python node."""
2467
2227
  return self.operator(Tok.STAR_POW, "**")
2468
2228
 
2469
- def proc_r_shift(self, node: py_ast.RShift) -> ast.Token:
2229
+ def proc_r_shift(self, node: py_ast.RShift) -> uni.Token:
2470
2230
  """Process python node."""
2471
2231
  return self.operator(Tok.RSHIFT, ">>")
2472
2232
 
2473
- def proc_sub(self, node: py_ast.Sub) -> ast.Token:
2233
+ def proc_sub(self, node: py_ast.Sub) -> uni.Token:
2474
2234
  """Process python node."""
2475
2235
  return self.operator(Tok.MINUS, "-")
2476
2236
 
2477
- def proc_invert(self, node: py_ast.Invert) -> ast.Token:
2237
+ def proc_invert(self, node: py_ast.Invert) -> uni.Token:
2478
2238
  """Process python node."""
2479
2239
  return self.operator(Tok.BW_NOT, "~")
2480
2240
 
2481
- def proc_not(self, node: py_ast.Not) -> ast.Token:
2241
+ def proc_not(self, node: py_ast.Not) -> uni.Token:
2482
2242
  """Process python node."""
2483
2243
  return self.operator(Tok.NOT, "not")
2484
2244
 
2485
- def proc_u_add(self, node: py_ast.UAdd) -> ast.Token:
2245
+ def proc_u_add(self, node: py_ast.UAdd) -> uni.Token:
2486
2246
  """Process python node."""
2487
2247
  return self.operator(Tok.PLUS, "+")
2488
2248
 
2489
- def proc_u_sub(self, node: py_ast.USub) -> ast.Token:
2249
+ def proc_u_sub(self, node: py_ast.USub) -> uni.Token:
2490
2250
  """Process python node."""
2491
2251
  return self.operator(Tok.MINUS, "-")
2492
2252
 
2493
- def proc_eq(self, node: py_ast.Eq) -> ast.Token:
2253
+ def proc_eq(self, node: py_ast.Eq) -> uni.Token:
2494
2254
  """Process python node."""
2495
2255
  return self.operator(Tok.EE, "==")
2496
2256
 
2497
- def proc_gt(self, node: py_ast.Gt) -> ast.Token:
2257
+ def proc_gt(self, node: py_ast.Gt) -> uni.Token:
2498
2258
  """Process python node."""
2499
2259
  return self.operator(Tok.GT, ">")
2500
2260
 
2501
- def proc_gt_e(self, node: py_ast.GtE) -> ast.Token:
2261
+ def proc_gt_e(self, node: py_ast.GtE) -> uni.Token:
2502
2262
  """Process python node."""
2503
2263
  return self.operator(Tok.GTE, ">=")
2504
2264
 
2505
- def proc_in(self, node: py_ast.In) -> ast.Token:
2265
+ def proc_in(self, node: py_ast.In) -> uni.Token:
2506
2266
  """Process python node."""
2507
2267
  return self.operator(Tok.KW_IN, "in")
2508
2268
 
2509
- def proc_is(self, node: py_ast.Is) -> ast.Token:
2269
+ def proc_is(self, node: py_ast.Is) -> uni.Token:
2510
2270
  """Process python node."""
2511
2271
  return self.operator(Tok.KW_IS, "is")
2512
2272
 
2513
- def proc_is_not(self, node: py_ast.IsNot) -> ast.Token:
2273
+ def proc_is_not(self, node: py_ast.IsNot) -> uni.Token:
2514
2274
  """Process python node."""
2515
2275
  return self.operator(Tok.KW_ISN, "is not")
2516
2276
 
2517
- def proc_lt(self, node: py_ast.Lt) -> ast.Token:
2277
+ def proc_lt(self, node: py_ast.Lt) -> uni.Token:
2518
2278
  """Process python node."""
2519
2279
  return self.operator(Tok.LT, "<")
2520
2280
 
2521
- def proc_lt_e(self, node: py_ast.LtE) -> ast.Token:
2281
+ def proc_lt_e(self, node: py_ast.LtE) -> uni.Token:
2522
2282
  """Process python node."""
2523
2283
  return self.operator(Tok.LTE, "<=")
2524
2284
 
2525
- def proc_not_eq(self, node: py_ast.NotEq) -> ast.Token:
2285
+ def proc_not_eq(self, node: py_ast.NotEq) -> uni.Token:
2526
2286
  """Process python node."""
2527
2287
  return self.operator(Tok.NE, "!=")
2528
2288
 
2529
- def proc_not_in(self, node: py_ast.NotIn) -> ast.Token:
2289
+ def proc_not_in(self, node: py_ast.NotIn) -> uni.Token:
2530
2290
  """Process python node."""
2531
2291
  return self.operator(Tok.KW_NIN, "not in")
2532
2292
 
2533
- def proc_comprehension(self, node: py_ast.comprehension) -> ast.InnerCompr:
2293
+ def proc_comprehension(self, node: py_ast.comprehension) -> uni.InnerCompr:
2534
2294
  """Process python node.
2535
2295
 
2536
2296
  class comprehension(AST):
@@ -2543,12 +2303,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2543
2303
  iter = self.convert(node.iter)
2544
2304
  if len(node.ifs) != 0:
2545
2305
  ifs_list = [self.convert(ifs) for ifs in node.ifs]
2546
- valid = [ifs for ifs in ifs_list if isinstance(ifs, ast.Expr)]
2306
+ valid = [ifs for ifs in ifs_list if isinstance(ifs, uni.Expr)]
2547
2307
  else:
2548
2308
  valid = None
2549
2309
  is_async = node.is_async > 0
2550
- if isinstance(target, ast.Expr) and isinstance(iter, ast.Expr):
2551
- return ast.InnerCompr(
2310
+ if isinstance(target, uni.Expr) and isinstance(iter, uni.Expr):
2311
+ return uni.InnerCompr(
2552
2312
  is_async=is_async,
2553
2313
  target=target,
2554
2314
  collection=iter,
@@ -2558,7 +2318,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2558
2318
  else:
2559
2319
  raise self.ice()
2560
2320
 
2561
- def proc_keyword(self, node: py_ast.keyword) -> ast.KWPair:
2321
+ def proc_keyword(self, node: py_ast.keyword) -> uni.KWPair:
2562
2322
  """Process python node.
2563
2323
 
2564
2324
  class keyword(AST):
@@ -2567,7 +2327,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2567
2327
  arg: _Identifier | None
2568
2328
  value: expr
2569
2329
  """
2570
- arg = ast.Name(
2330
+ arg = uni.Name(
2571
2331
  orig_src=self.orig_src,
2572
2332
  name=Tok.NAME,
2573
2333
  value=node.arg if node.arg else "_",
@@ -2579,12 +2339,12 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2579
2339
  pos_end=0,
2580
2340
  )
2581
2341
  value = self.convert(node.value)
2582
- if isinstance(value, ast.Expr):
2583
- return ast.KWPair(key=arg, value=value, kid=[arg, value])
2342
+ if isinstance(value, uni.Expr):
2343
+ return uni.KWPair(key=arg, value=value, kid=[arg, value])
2584
2344
  else:
2585
2345
  raise self.ice()
2586
2346
 
2587
- def proc_match_case(self, node: py_ast.match_case) -> ast.MatchCase:
2347
+ def proc_match_case(self, node: py_ast.match_case) -> uni.MatchCase:
2588
2348
  """Process python node.
2589
2349
 
2590
2350
  class match_case(AST):
@@ -2595,11 +2355,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2595
2355
  pattern = self.convert(node.pattern)
2596
2356
  guard = self.convert(node.guard) if node.guard else None
2597
2357
  body = [self.convert(i) for i in node.body]
2598
- valid = [i for i in body if isinstance(i, ast.CodeBlockStmt)]
2599
- if isinstance(pattern, ast.MatchPattern) and (
2600
- isinstance(guard, ast.Expr) or guard is None
2358
+ valid = [i for i in body if isinstance(i, uni.CodeBlockStmt)]
2359
+ if isinstance(pattern, uni.MatchPattern) and (
2360
+ isinstance(guard, uni.Expr) or guard is None
2601
2361
  ):
2602
- return ast.MatchCase(
2362
+ return uni.MatchCase(
2603
2363
  pattern=pattern,
2604
2364
  guard=guard,
2605
2365
  body=valid,
@@ -2608,7 +2368,7 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2608
2368
  else:
2609
2369
  raise self.ice()
2610
2370
 
2611
- def proc_withitem(self, node: py_ast.withitem) -> ast.ExprAsItem:
2371
+ def proc_withitem(self, node: py_ast.withitem) -> uni.ExprAsItem:
2612
2372
  """Process python node.
2613
2373
 
2614
2374
  class withitem(AST):
@@ -2617,10 +2377,10 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2617
2377
  """
2618
2378
  context_expr = self.convert(node.context_expr)
2619
2379
  optional_vars = self.convert(node.optional_vars) if node.optional_vars else None
2620
- if isinstance(context_expr, ast.Expr) and (
2621
- isinstance(optional_vars, ast.Expr) or optional_vars is None
2380
+ if isinstance(context_expr, uni.Expr) and (
2381
+ isinstance(optional_vars, uni.Expr) or optional_vars is None
2622
2382
  ):
2623
- return ast.ExprAsItem(
2383
+ return uni.ExprAsItem(
2624
2384
  expr=context_expr,
2625
2385
  alias=optional_vars if optional_vars else None,
2626
2386
  kid=[context_expr, optional_vars] if optional_vars else [context_expr],
@@ -2640,11 +2400,11 @@ class PyastBuildPass(Pass[ast.PythonModuleAst]):
2640
2400
  def proc_type_var_tuple(self, node: py_ast.TypeVarTuple) -> None:
2641
2401
  """Process python node."""
2642
2402
 
2643
- def convert_to_doc(self, string: ast.String) -> None:
2403
+ def convert_to_doc(self, string: uni.String) -> None:
2644
2404
  """Convert a string to a docstring."""
2645
2405
  string.value = f'"""{string.value[1:-1]}"""'
2646
2406
 
2647
- def aug_op_map(self, tok_dict: dict, op: ast.Token) -> str:
2407
+ def aug_op_map(self, tok_dict: dict, op: uni.Token) -> str:
2648
2408
  """aug_mapper."""
2649
2409
  op.value += "="
2650
2410
  for _key, value in tok_dict.items():