diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69a024e4a364d..8649ac613eca8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,7 @@ exclude: | .github/workflows/release.yml| crates/ty_vendored/vendor/.*| crates/ty_project/resources/.*| + crates/ty_python_semantic/resources/corpus/.*| crates/ty/docs/(configuration|rules|cli).md| crates/ruff_benchmark/resources/.*| crates/ruff_linter/resources/.*| diff --git a/Cargo.lock b/Cargo.lock index 1131908222e3c..16ac7635a1cfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3934,7 +3934,6 @@ version = "0.0.0" dependencies = [ "anyhow", "crossbeam", - "glob", "insta", "notify", "pep440_rs", @@ -3970,6 +3969,7 @@ dependencies = [ "countme", "dir-test", "drop_bomb", + "glob", "hashbrown 0.15.4", "indexmap", "insta", diff --git a/crates/ty_project/Cargo.toml b/crates/ty_project/Cargo.toml index c6e30a6abc225..e8df92d566279 100644 --- a/crates/ty_project/Cargo.toml +++ b/crates/ty_project/Cargo.toml @@ -25,7 +25,6 @@ ty_vendored = { workspace = true } anyhow = { workspace = true } crossbeam = { workspace = true } -glob = { workspace = true } notify = { workspace = true } pep440_rs = { workspace = true, features = ["version-ranges"] } rayon = { workspace = true } @@ -39,7 +38,6 @@ tracing = { workspace = true } [dev-dependencies] ruff_db = { workspace = true, features = ["testing"] } -glob = { workspace = true } insta = { workspace = true, features = ["redactions", "ron"] } [features] diff --git a/crates/ty_project/resources/test/corpus/04_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/04_assign_invalid_target.py deleted file mode 120000 index 8d551b9f78d09..0000000000000 --- a/crates/ty_project/resources/test/corpus/04_assign_invalid_target.py +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_python_parser/resources/invalid/statements/invalid_assignment_targets.py \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/04_assign_named_expr_invalid_target.py b/crates/ty_project/resources/test/corpus/04_assign_named_expr_invalid_target.py deleted file mode 120000 index c751f9658700a..0000000000000 --- a/crates/ty_project/resources/test/corpus/04_assign_named_expr_invalid_target.py +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_python_parser/resources/invalid/expressions/named/invalid_target.py \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/04_aug_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/04_aug_assign_invalid_target.py deleted file mode 120000 index f3ebd5de4abc3..0000000000000 --- a/crates/ty_project/resources/test/corpus/04_aug_assign_invalid_target.py +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_python_parser/resources/invalid/statements/invalid_augmented_assignment_target.py \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb b/crates/ty_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb deleted file mode 120000 index 82df885aaa183..0000000000000 --- a/crates/ty_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/89_type_alias_invalid_bound.py b/crates/ty_project/resources/test/corpus/89_type_alias_invalid_bound.py deleted file mode 120000 index 5dfcadebb0d17..0000000000000 --- a/crates/ty_project/resources/test/corpus/89_type_alias_invalid_bound.py +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_python_parser/resources/inline/err/type_param_invalid_bound_expr.py \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/98_ann_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/98_ann_assign_invalid_target.py deleted file mode 120000 index ebc265cfa2500..0000000000000 --- a/crates/ty_project/resources/test/corpus/98_ann_assign_invalid_target.py +++ /dev/null @@ -1 +0,0 @@ -../../../../ruff_python_parser/resources/inline/err/ann_assign_stmt_invalid_target.py \ No newline at end of file diff --git a/crates/ty_python_semantic/Cargo.toml b/crates/ty_python_semantic/Cargo.toml index 542d31a8a08dc..1bbdf10a4926e 100644 --- a/crates/ty_python_semantic/Cargo.toml +++ b/crates/ty_python_semantic/Cargo.toml @@ -55,6 +55,7 @@ ty_vendored = { workspace = true } anyhow = { workspace = true } dir-test = { workspace = true } +glob = { workspace = true } insta = { workspace = true } tempfile = { workspace = true } quickcheck = { version = "1.0.3", default-features = false } diff --git a/crates/ty_project/resources/test/corpus/00_const.py b/crates/ty_python_semantic/resources/corpus/00_const.py similarity index 100% rename from crates/ty_project/resources/test/corpus/00_const.py rename to crates/ty_python_semantic/resources/corpus/00_const.py diff --git a/crates/ty_project/resources/test/corpus/00_empty.py b/crates/ty_python_semantic/resources/corpus/00_empty.py similarity index 100% rename from crates/ty_project/resources/test/corpus/00_empty.py rename to crates/ty_python_semantic/resources/corpus/00_empty.py diff --git a/crates/ty_project/resources/test/corpus/00_expr_discard.py b/crates/ty_python_semantic/resources/corpus/00_expr_discard.py similarity index 100% rename from crates/ty_project/resources/test/corpus/00_expr_discard.py rename to crates/ty_python_semantic/resources/corpus/00_expr_discard.py diff --git a/crates/ty_project/resources/test/corpus/00_expr_var1.py b/crates/ty_python_semantic/resources/corpus/00_expr_var1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/00_expr_var1.py rename to crates/ty_python_semantic/resources/corpus/00_expr_var1.py diff --git a/crates/ty_project/resources/test/corpus/01_expr_unary.py b/crates/ty_python_semantic/resources/corpus/01_expr_unary.py similarity index 100% rename from crates/ty_project/resources/test/corpus/01_expr_unary.py rename to crates/ty_python_semantic/resources/corpus/01_expr_unary.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_attr.py b/crates/ty_python_semantic/resources/corpus/02_expr_attr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_attr.py rename to crates/ty_python_semantic/resources/corpus/02_expr_attr.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_attr_multiline.py b/crates/ty_python_semantic/resources/corpus/02_expr_attr_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_attr_multiline.py rename to crates/ty_python_semantic/resources/corpus/02_expr_attr_multiline.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_attr_multiline_assign.py b/crates/ty_python_semantic/resources/corpus/02_expr_attr_multiline_assign.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_attr_multiline_assign.py rename to crates/ty_python_semantic/resources/corpus/02_expr_attr_multiline_assign.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_bin_bool.py b/crates/ty_python_semantic/resources/corpus/02_expr_bin_bool.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_bin_bool.py rename to crates/ty_python_semantic/resources/corpus/02_expr_bin_bool.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_binary.py b/crates/ty_python_semantic/resources/corpus/02_expr_binary.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_binary.py rename to crates/ty_python_semantic/resources/corpus/02_expr_binary.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline.py b/crates/ty_python_semantic/resources/corpus/02_expr_bool_op_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline.py rename to crates/ty_python_semantic/resources/corpus/02_expr_bool_op_multiline.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline2.py b/crates/ty_python_semantic/resources/corpus/02_expr_bool_op_multiline2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline2.py rename to crates/ty_python_semantic/resources/corpus/02_expr_bool_op_multiline2.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_rel.py b/crates/ty_python_semantic/resources/corpus/02_expr_rel.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_rel.py rename to crates/ty_python_semantic/resources/corpus/02_expr_rel.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_rel_multiple.py b/crates/ty_python_semantic/resources/corpus/02_expr_rel_multiple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_rel_multiple.py rename to crates/ty_python_semantic/resources/corpus/02_expr_rel_multiple.py diff --git a/crates/ty_project/resources/test/corpus/02_expr_subscr.py b/crates/ty_python_semantic/resources/corpus/02_expr_subscr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/02_expr_subscr.py rename to crates/ty_python_semantic/resources/corpus/02_expr_subscr.py diff --git a/crates/ty_project/resources/test/corpus/03_dict.py b/crates/ty_python_semantic/resources/corpus/03_dict.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_dict.py rename to crates/ty_python_semantic/resources/corpus/03_dict.py diff --git a/crates/ty_project/resources/test/corpus/03_dict_ex.py b/crates/ty_python_semantic/resources/corpus/03_dict_ex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_dict_ex.py rename to crates/ty_python_semantic/resources/corpus/03_dict_ex.py diff --git a/crates/ty_project/resources/test/corpus/03_dict_literal_large.py b/crates/ty_python_semantic/resources/corpus/03_dict_literal_large.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_dict_literal_large.py rename to crates/ty_python_semantic/resources/corpus/03_dict_literal_large.py diff --git a/crates/ty_project/resources/test/corpus/03_dict_unpack_huge.py b/crates/ty_python_semantic/resources/corpus/03_dict_unpack_huge.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_dict_unpack_huge.py rename to crates/ty_python_semantic/resources/corpus/03_dict_unpack_huge.py diff --git a/crates/ty_project/resources/test/corpus/03_list.py b/crates/ty_python_semantic/resources/corpus/03_list.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_list.py rename to crates/ty_python_semantic/resources/corpus/03_list.py diff --git a/crates/ty_project/resources/test/corpus/03_list_ex.py b/crates/ty_python_semantic/resources/corpus/03_list_ex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_list_ex.py rename to crates/ty_python_semantic/resources/corpus/03_list_ex.py diff --git a/crates/ty_project/resources/test/corpus/03_list_large.py b/crates/ty_python_semantic/resources/corpus/03_list_large.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_list_large.py rename to crates/ty_python_semantic/resources/corpus/03_list_large.py diff --git a/crates/ty_project/resources/test/corpus/03_set.py b/crates/ty_python_semantic/resources/corpus/03_set.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_set.py rename to crates/ty_python_semantic/resources/corpus/03_set.py diff --git a/crates/ty_project/resources/test/corpus/03_set_multi.py b/crates/ty_python_semantic/resources/corpus/03_set_multi.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_set_multi.py rename to crates/ty_python_semantic/resources/corpus/03_set_multi.py diff --git a/crates/ty_project/resources/test/corpus/03_slice.py b/crates/ty_python_semantic/resources/corpus/03_slice.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_slice.py rename to crates/ty_python_semantic/resources/corpus/03_slice.py diff --git a/crates/ty_project/resources/test/corpus/03_slice_ext.py b/crates/ty_python_semantic/resources/corpus/03_slice_ext.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_slice_ext.py rename to crates/ty_python_semantic/resources/corpus/03_slice_ext.py diff --git a/crates/ty_project/resources/test/corpus/03_tuple.py b/crates/ty_python_semantic/resources/corpus/03_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_tuple.py rename to crates/ty_python_semantic/resources/corpus/03_tuple.py diff --git a/crates/ty_project/resources/test/corpus/03_tuple_ex.py b/crates/ty_python_semantic/resources/corpus/03_tuple_ex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/03_tuple_ex.py rename to crates/ty_python_semantic/resources/corpus/03_tuple_ex.py diff --git a/crates/ty_project/resources/test/corpus/04_assign.py b/crates/ty_python_semantic/resources/corpus/04_assign.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign.py rename to crates/ty_python_semantic/resources/corpus/04_assign.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_attr.py b/crates/ty_python_semantic/resources/corpus/04_assign_attr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_attr.py rename to crates/ty_python_semantic/resources/corpus/04_assign_attr.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_attr_func.py b/crates/ty_python_semantic/resources/corpus/04_assign_attr_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_attr_func.py rename to crates/ty_python_semantic/resources/corpus/04_assign_attr_func.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_named_expr.py b/crates/ty_python_semantic/resources/corpus/04_assign_named_expr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_named_expr.py rename to crates/ty_python_semantic/resources/corpus/04_assign_named_expr.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_subscr.py b/crates/ty_python_semantic/resources/corpus/04_assign_subscr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_subscr.py rename to crates/ty_python_semantic/resources/corpus/04_assign_subscr.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_unpack.py b/crates/ty_python_semantic/resources/corpus/04_assign_unpack.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_unpack.py rename to crates/ty_python_semantic/resources/corpus/04_assign_unpack.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_unpack_ex.py b/crates/ty_python_semantic/resources/corpus/04_assign_unpack_ex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_unpack_ex.py rename to crates/ty_python_semantic/resources/corpus/04_assign_unpack_ex.py diff --git a/crates/ty_project/resources/test/corpus/04_assign_unpack_tuple.py b/crates/ty_python_semantic/resources/corpus/04_assign_unpack_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_assign_unpack_tuple.py rename to crates/ty_python_semantic/resources/corpus/04_assign_unpack_tuple.py diff --git a/crates/ty_project/resources/test/corpus/04_aug_assign.py b/crates/ty_python_semantic/resources/corpus/04_aug_assign.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_aug_assign.py rename to crates/ty_python_semantic/resources/corpus/04_aug_assign.py diff --git a/crates/ty_project/resources/test/corpus/04_aug_assign_attr_multiline.py b/crates/ty_python_semantic/resources/corpus/04_aug_assign_attr_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_aug_assign_attr_multiline.py rename to crates/ty_python_semantic/resources/corpus/04_aug_assign_attr_multiline.py diff --git a/crates/ty_project/resources/test/corpus/04_aug_assign_attr_sub.py b/crates/ty_python_semantic/resources/corpus/04_aug_assign_attr_sub.py similarity index 100% rename from crates/ty_project/resources/test/corpus/04_aug_assign_attr_sub.py rename to crates/ty_python_semantic/resources/corpus/04_aug_assign_attr_sub.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall.py b/crates/ty_python_semantic/resources/corpus/05_funcall.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall.py rename to crates/ty_python_semantic/resources/corpus/05_funcall.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_1.py b/crates/ty_python_semantic/resources/corpus/05_funcall_1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_1.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_1.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_2.py b/crates/ty_python_semantic/resources/corpus/05_funcall_2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_2.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_2.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_in_multiline_tuple.py b/crates/ty_python_semantic/resources/corpus/05_funcall_in_multiline_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_in_multiline_tuple.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_in_multiline_tuple.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_kw.py b/crates/ty_python_semantic/resources/corpus/05_funcall_kw.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_kw.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_kw.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_kw_many.py b/crates/ty_python_semantic/resources/corpus/05_funcall_kw_many.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_kw_many.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_kw_many.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_kw_pos.py b/crates/ty_python_semantic/resources/corpus/05_funcall_kw_pos.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_kw_pos.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_kw_pos.py diff --git a/crates/ty_project/resources/test/corpus/05_funcall_method_multiline.py b/crates/ty_python_semantic/resources/corpus/05_funcall_method_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/05_funcall_method_multiline.py rename to crates/ty_python_semantic/resources/corpus/05_funcall_method_multiline.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_kwargs.py b/crates/ty_python_semantic/resources/corpus/06_funcall_kwargs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_kwargs.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_kwargs.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_many_args.py b/crates/ty_python_semantic/resources/corpus/06_funcall_many_args.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_many_args.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_many_args.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_starargs_ex.py b/crates/ty_python_semantic/resources/corpus/06_funcall_starargs_ex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_starargs_ex.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_starargs_ex.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_varargs.py b/crates/ty_python_semantic/resources/corpus/06_funcall_varargs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_varargs.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_varargs.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs.py b/crates/ty_python_semantic/resources/corpus/06_funcall_varargs_kwargs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_varargs_kwargs.py diff --git a/crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py b/crates/ty_python_semantic/resources/corpus/06_funcall_varargs_kwargs_mixed.py similarity index 100% rename from crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py rename to crates/ty_python_semantic/resources/corpus/06_funcall_varargs_kwargs_mixed.py diff --git a/crates/ty_project/resources/test/corpus/07_ifexpr.py b/crates/ty_python_semantic/resources/corpus/07_ifexpr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/07_ifexpr.py rename to crates/ty_python_semantic/resources/corpus/07_ifexpr.py diff --git a/crates/ty_project/resources/test/corpus/07_ifexpr_multiline.py b/crates/ty_python_semantic/resources/corpus/07_ifexpr_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/07_ifexpr_multiline.py rename to crates/ty_python_semantic/resources/corpus/07_ifexpr_multiline.py diff --git a/crates/ty_project/resources/test/corpus/07_ifexpr_multiline2.py b/crates/ty_python_semantic/resources/corpus/07_ifexpr_multiline2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/07_ifexpr_multiline2.py rename to crates/ty_python_semantic/resources/corpus/07_ifexpr_multiline2.py diff --git a/crates/ty_project/resources/test/corpus/08_del.py b/crates/ty_python_semantic/resources/corpus/08_del.py similarity index 100% rename from crates/ty_project/resources/test/corpus/08_del.py rename to crates/ty_python_semantic/resources/corpus/08_del.py diff --git a/crates/ty_project/resources/test/corpus/08_del_multi.py b/crates/ty_python_semantic/resources/corpus/08_del_multi.py similarity index 100% rename from crates/ty_project/resources/test/corpus/08_del_multi.py rename to crates/ty_python_semantic/resources/corpus/08_del_multi.py diff --git a/crates/ty_project/resources/test/corpus/09_pass.py b/crates/ty_python_semantic/resources/corpus/09_pass.py similarity index 100% rename from crates/ty_project/resources/test/corpus/09_pass.py rename to crates/ty_python_semantic/resources/corpus/09_pass.py diff --git a/crates/ty_project/resources/test/corpus/10_if.py b/crates/ty_python_semantic/resources/corpus/10_if.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if.py rename to crates/ty_python_semantic/resources/corpus/10_if.py diff --git a/crates/ty_project/resources/test/corpus/10_if_chained_compare.py b/crates/ty_python_semantic/resources/corpus/10_if_chained_compare.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if_chained_compare.py rename to crates/ty_python_semantic/resources/corpus/10_if_chained_compare.py diff --git a/crates/ty_project/resources/test/corpus/10_if_false.py b/crates/ty_python_semantic/resources/corpus/10_if_false.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if_false.py rename to crates/ty_python_semantic/resources/corpus/10_if_false.py diff --git a/crates/ty_project/resources/test/corpus/10_if_invalid.py b/crates/ty_python_semantic/resources/corpus/10_if_invalid.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if_invalid.py rename to crates/ty_python_semantic/resources/corpus/10_if_invalid.py diff --git a/crates/ty_project/resources/test/corpus/10_if_true.py b/crates/ty_python_semantic/resources/corpus/10_if_true.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if_true.py rename to crates/ty_python_semantic/resources/corpus/10_if_true.py diff --git a/crates/ty_project/resources/test/corpus/10_if_with_named_expr.py b/crates/ty_python_semantic/resources/corpus/10_if_with_named_expr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/10_if_with_named_expr.py rename to crates/ty_python_semantic/resources/corpus/10_if_with_named_expr.py diff --git a/crates/ty_project/resources/test/corpus/11_if_else.py b/crates/ty_python_semantic/resources/corpus/11_if_else.py similarity index 100% rename from crates/ty_project/resources/test/corpus/11_if_else.py rename to crates/ty_python_semantic/resources/corpus/11_if_else.py diff --git a/crates/ty_project/resources/test/corpus/11_if_else_deeply_nested_for.py b/crates/ty_python_semantic/resources/corpus/11_if_else_deeply_nested_for.py similarity index 100% rename from crates/ty_project/resources/test/corpus/11_if_else_deeply_nested_for.py rename to crates/ty_python_semantic/resources/corpus/11_if_else_deeply_nested_for.py diff --git a/crates/ty_project/resources/test/corpus/11_if_else_false.py b/crates/ty_python_semantic/resources/corpus/11_if_else_false.py similarity index 100% rename from crates/ty_project/resources/test/corpus/11_if_else_false.py rename to crates/ty_python_semantic/resources/corpus/11_if_else_false.py diff --git a/crates/ty_project/resources/test/corpus/11_if_else_true.py b/crates/ty_python_semantic/resources/corpus/11_if_else_true.py similarity index 100% rename from crates/ty_project/resources/test/corpus/11_if_else_true.py rename to crates/ty_python_semantic/resources/corpus/11_if_else_true.py diff --git a/crates/ty_project/resources/test/corpus/12_if_elif.py b/crates/ty_python_semantic/resources/corpus/12_if_elif.py similarity index 100% rename from crates/ty_project/resources/test/corpus/12_if_elif.py rename to crates/ty_python_semantic/resources/corpus/12_if_elif.py diff --git a/crates/ty_project/resources/test/corpus/12_if_elif_else.py b/crates/ty_python_semantic/resources/corpus/12_if_elif_else.py similarity index 100% rename from crates/ty_project/resources/test/corpus/12_if_elif_else.py rename to crates/ty_python_semantic/resources/corpus/12_if_elif_else.py diff --git a/crates/ty_project/resources/test/corpus/13_ifelse_complex1.py b/crates/ty_python_semantic/resources/corpus/13_ifelse_complex1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/13_ifelse_complex1.py rename to crates/ty_python_semantic/resources/corpus/13_ifelse_complex1.py diff --git a/crates/ty_project/resources/test/corpus/13_ifelse_many.py b/crates/ty_python_semantic/resources/corpus/13_ifelse_many.py similarity index 100% rename from crates/ty_project/resources/test/corpus/13_ifelse_many.py rename to crates/ty_python_semantic/resources/corpus/13_ifelse_many.py diff --git a/crates/ty_project/resources/test/corpus/15_while.py b/crates/ty_python_semantic/resources/corpus/15_while.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while.py rename to crates/ty_python_semantic/resources/corpus/15_while.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break.py b/crates/ty_python_semantic/resources/corpus/15_while_break.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break.py rename to crates/ty_python_semantic/resources/corpus/15_while_break.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break_in_finally.py b/crates/ty_python_semantic/resources/corpus/15_while_break_in_finally.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break_in_finally.py rename to crates/ty_python_semantic/resources/corpus/15_while_break_in_finally.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break_invalid_in_class.py b/crates/ty_python_semantic/resources/corpus/15_while_break_invalid_in_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break_invalid_in_class.py rename to crates/ty_python_semantic/resources/corpus/15_while_break_invalid_in_class.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break_invalid_in_func.py b/crates/ty_python_semantic/resources/corpus/15_while_break_invalid_in_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break_invalid_in_func.py rename to crates/ty_python_semantic/resources/corpus/15_while_break_invalid_in_func.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break_non_empty.py b/crates/ty_python_semantic/resources/corpus/15_while_break_non_empty.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break_non_empty.py rename to crates/ty_python_semantic/resources/corpus/15_while_break_non_empty.py diff --git a/crates/ty_project/resources/test/corpus/15_while_break_non_exit.py b/crates/ty_python_semantic/resources/corpus/15_while_break_non_exit.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_break_non_exit.py rename to crates/ty_python_semantic/resources/corpus/15_while_break_non_exit.py diff --git a/crates/ty_project/resources/test/corpus/15_while_continue.py b/crates/ty_python_semantic/resources/corpus/15_while_continue.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_continue.py rename to crates/ty_python_semantic/resources/corpus/15_while_continue.py diff --git a/crates/ty_project/resources/test/corpus/15_while_false.py b/crates/ty_python_semantic/resources/corpus/15_while_false.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_false.py rename to crates/ty_python_semantic/resources/corpus/15_while_false.py diff --git a/crates/ty_project/resources/test/corpus/15_while_infinite.py b/crates/ty_python_semantic/resources/corpus/15_while_infinite.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_infinite.py rename to crates/ty_python_semantic/resources/corpus/15_while_infinite.py diff --git a/crates/ty_project/resources/test/corpus/15_while_true.py b/crates/ty_python_semantic/resources/corpus/15_while_true.py similarity index 100% rename from crates/ty_project/resources/test/corpus/15_while_true.py rename to crates/ty_python_semantic/resources/corpus/15_while_true.py diff --git a/crates/ty_project/resources/test/corpus/16_for.py b/crates/ty_python_semantic/resources/corpus/16_for.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for.py rename to crates/ty_python_semantic/resources/corpus/16_for.py diff --git a/crates/ty_project/resources/test/corpus/16_for_break.py b/crates/ty_python_semantic/resources/corpus/16_for_break.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_break.py rename to crates/ty_python_semantic/resources/corpus/16_for_break.py diff --git a/crates/ty_project/resources/test/corpus/16_for_break_invalid_in_class.py b/crates/ty_python_semantic/resources/corpus/16_for_break_invalid_in_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_break_invalid_in_class.py rename to crates/ty_python_semantic/resources/corpus/16_for_break_invalid_in_class.py diff --git a/crates/ty_project/resources/test/corpus/16_for_break_invalid_in_func.py b/crates/ty_python_semantic/resources/corpus/16_for_break_invalid_in_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_break_invalid_in_func.py rename to crates/ty_python_semantic/resources/corpus/16_for_break_invalid_in_func.py diff --git a/crates/ty_project/resources/test/corpus/16_for_continue.py b/crates/ty_python_semantic/resources/corpus/16_for_continue.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_continue.py rename to crates/ty_python_semantic/resources/corpus/16_for_continue.py diff --git a/crates/ty_project/resources/test/corpus/16_for_else.py b/crates/ty_python_semantic/resources/corpus/16_for_else.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_else.py rename to crates/ty_python_semantic/resources/corpus/16_for_else.py diff --git a/crates/ty_project/resources/test/corpus/16_for_invalid.py b/crates/ty_python_semantic/resources/corpus/16_for_invalid.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_invalid.py rename to crates/ty_python_semantic/resources/corpus/16_for_invalid.py diff --git a/crates/ty_project/resources/test/corpus/16_for_list_literal.py b/crates/ty_python_semantic/resources/corpus/16_for_list_literal.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_list_literal.py rename to crates/ty_python_semantic/resources/corpus/16_for_list_literal.py diff --git a/crates/ty_project/resources/test/corpus/16_for_nested_ifs.py b/crates/ty_python_semantic/resources/corpus/16_for_nested_ifs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/16_for_nested_ifs.py rename to crates/ty_python_semantic/resources/corpus/16_for_nested_ifs.py diff --git a/crates/ty_project/resources/test/corpus/20_lambda.py b/crates/ty_python_semantic/resources/corpus/20_lambda.py similarity index 100% rename from crates/ty_project/resources/test/corpus/20_lambda.py rename to crates/ty_python_semantic/resources/corpus/20_lambda.py diff --git a/crates/ty_project/resources/test/corpus/20_lambda_const.py b/crates/ty_python_semantic/resources/corpus/20_lambda_const.py similarity index 100% rename from crates/ty_project/resources/test/corpus/20_lambda_const.py rename to crates/ty_python_semantic/resources/corpus/20_lambda_const.py diff --git a/crates/ty_project/resources/test/corpus/20_lambda_default_arg.py b/crates/ty_python_semantic/resources/corpus/20_lambda_default_arg.py similarity index 100% rename from crates/ty_project/resources/test/corpus/20_lambda_default_arg.py rename to crates/ty_python_semantic/resources/corpus/20_lambda_default_arg.py diff --git a/crates/ty_project/resources/test/corpus/20_lambda_ifelse.py b/crates/ty_python_semantic/resources/corpus/20_lambda_ifelse.py similarity index 100% rename from crates/ty_project/resources/test/corpus/20_lambda_ifelse.py rename to crates/ty_python_semantic/resources/corpus/20_lambda_ifelse.py diff --git a/crates/ty_project/resources/test/corpus/21_func1.py b/crates/ty_python_semantic/resources/corpus/21_func1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/21_func1.py rename to crates/ty_python_semantic/resources/corpus/21_func1.py diff --git a/crates/ty_project/resources/test/corpus/21_func1_ret.py b/crates/ty_python_semantic/resources/corpus/21_func1_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/21_func1_ret.py rename to crates/ty_python_semantic/resources/corpus/21_func1_ret.py diff --git a/crates/ty_project/resources/test/corpus/21_func_assign.py b/crates/ty_python_semantic/resources/corpus/21_func_assign.py similarity index 100% rename from crates/ty_project/resources/test/corpus/21_func_assign.py rename to crates/ty_python_semantic/resources/corpus/21_func_assign.py diff --git a/crates/ty_project/resources/test/corpus/21_func_assign2.py b/crates/ty_python_semantic/resources/corpus/21_func_assign2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/21_func_assign2.py rename to crates/ty_python_semantic/resources/corpus/21_func_assign2.py diff --git a/crates/ty_project/resources/test/corpus/22_func_arg.py b/crates/ty_python_semantic/resources/corpus/22_func_arg.py similarity index 100% rename from crates/ty_project/resources/test/corpus/22_func_arg.py rename to crates/ty_python_semantic/resources/corpus/22_func_arg.py diff --git a/crates/ty_project/resources/test/corpus/22_func_vararg.py b/crates/ty_python_semantic/resources/corpus/22_func_vararg.py similarity index 100% rename from crates/ty_project/resources/test/corpus/22_func_vararg.py rename to crates/ty_python_semantic/resources/corpus/22_func_vararg.py diff --git a/crates/ty_project/resources/test/corpus/23_func_ret.py b/crates/ty_python_semantic/resources/corpus/23_func_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/23_func_ret.py rename to crates/ty_python_semantic/resources/corpus/23_func_ret.py diff --git a/crates/ty_project/resources/test/corpus/23_func_ret_val.py b/crates/ty_python_semantic/resources/corpus/23_func_ret_val.py similarity index 100% rename from crates/ty_project/resources/test/corpus/23_func_ret_val.py rename to crates/ty_python_semantic/resources/corpus/23_func_ret_val.py diff --git a/crates/ty_project/resources/test/corpus/24_func_if_ret.py b/crates/ty_python_semantic/resources/corpus/24_func_if_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/24_func_if_ret.py rename to crates/ty_python_semantic/resources/corpus/24_func_if_ret.py diff --git a/crates/ty_project/resources/test/corpus/24_func_ifelse_ret.py b/crates/ty_python_semantic/resources/corpus/24_func_ifelse_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/24_func_ifelse_ret.py rename to crates/ty_python_semantic/resources/corpus/24_func_ifelse_ret.py diff --git a/crates/ty_project/resources/test/corpus/24_func_ifnot_ret.py b/crates/ty_python_semantic/resources/corpus/24_func_ifnot_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/24_func_ifnot_ret.py rename to crates/ty_python_semantic/resources/corpus/24_func_ifnot_ret.py diff --git a/crates/ty_project/resources/test/corpus/25_func_annotations.py b/crates/ty_python_semantic/resources/corpus/25_func_annotations.py similarity index 100% rename from crates/ty_project/resources/test/corpus/25_func_annotations.py rename to crates/ty_python_semantic/resources/corpus/25_func_annotations.py diff --git a/crates/ty_project/resources/test/corpus/25_func_annotations_nested.py b/crates/ty_python_semantic/resources/corpus/25_func_annotations_nested.py similarity index 100% rename from crates/ty_project/resources/test/corpus/25_func_annotations_nested.py rename to crates/ty_python_semantic/resources/corpus/25_func_annotations_nested.py diff --git a/crates/ty_project/resources/test/corpus/25_func_annotations_same_name.py b/crates/ty_python_semantic/resources/corpus/25_func_annotations_same_name.py similarity index 100% rename from crates/ty_project/resources/test/corpus/25_func_annotations_same_name.py rename to crates/ty_python_semantic/resources/corpus/25_func_annotations_same_name.py diff --git a/crates/ty_project/resources/test/corpus/25_func_annotations_scope.py b/crates/ty_python_semantic/resources/corpus/25_func_annotations_scope.py similarity index 100% rename from crates/ty_project/resources/test/corpus/25_func_annotations_scope.py rename to crates/ty_python_semantic/resources/corpus/25_func_annotations_scope.py diff --git a/crates/ty_project/resources/test/corpus/25_func_annotations_starred.py b/crates/ty_python_semantic/resources/corpus/25_func_annotations_starred.py similarity index 100% rename from crates/ty_project/resources/test/corpus/25_func_annotations_starred.py rename to crates/ty_python_semantic/resources/corpus/25_func_annotations_starred.py diff --git a/crates/ty_project/resources/test/corpus/26_func_const_defaults.py b/crates/ty_python_semantic/resources/corpus/26_func_const_defaults.py similarity index 100% rename from crates/ty_project/resources/test/corpus/26_func_const_defaults.py rename to crates/ty_python_semantic/resources/corpus/26_func_const_defaults.py diff --git a/crates/ty_project/resources/test/corpus/26_func_defaults_same_name.py b/crates/ty_python_semantic/resources/corpus/26_func_defaults_same_name.py similarity index 100% rename from crates/ty_project/resources/test/corpus/26_func_defaults_same_name.py rename to crates/ty_python_semantic/resources/corpus/26_func_defaults_same_name.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic.py b/crates/ty_python_semantic/resources/corpus/27_func_generic.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_bound.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_bound.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_bound.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_bound.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_constraint.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_constraint.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_constraint.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_constraint.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_default.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_default.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_default.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_paramspec.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_paramspec.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_paramspec.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_paramspec.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_paramspec_default.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_paramspec_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_paramspec_default.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_paramspec_default.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_tuple.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_tuple.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_tuple.py diff --git a/crates/ty_project/resources/test/corpus/27_func_generic_tuple_default.py b/crates/ty_python_semantic/resources/corpus/27_func_generic_tuple_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/27_func_generic_tuple_default.py rename to crates/ty_python_semantic/resources/corpus/27_func_generic_tuple_default.py diff --git a/crates/ty_project/resources/test/corpus/30_func_enclosed.py b/crates/ty_python_semantic/resources/corpus/30_func_enclosed.py similarity index 100% rename from crates/ty_project/resources/test/corpus/30_func_enclosed.py rename to crates/ty_python_semantic/resources/corpus/30_func_enclosed.py diff --git a/crates/ty_project/resources/test/corpus/30_func_enclosed_many.py b/crates/ty_python_semantic/resources/corpus/30_func_enclosed_many.py similarity index 100% rename from crates/ty_project/resources/test/corpus/30_func_enclosed_many.py rename to crates/ty_python_semantic/resources/corpus/30_func_enclosed_many.py diff --git a/crates/ty_project/resources/test/corpus/31_func_global.py b/crates/ty_python_semantic/resources/corpus/31_func_global.py similarity index 100% rename from crates/ty_project/resources/test/corpus/31_func_global.py rename to crates/ty_python_semantic/resources/corpus/31_func_global.py diff --git a/crates/ty_project/resources/test/corpus/31_func_global_annotated_later.py b/crates/ty_python_semantic/resources/corpus/31_func_global_annotated_later.py similarity index 100% rename from crates/ty_project/resources/test/corpus/31_func_global_annotated_later.py rename to crates/ty_python_semantic/resources/corpus/31_func_global_annotated_later.py diff --git a/crates/ty_project/resources/test/corpus/31_func_nonlocal.py b/crates/ty_python_semantic/resources/corpus/31_func_nonlocal.py similarity index 100% rename from crates/ty_project/resources/test/corpus/31_func_nonlocal.py rename to crates/ty_python_semantic/resources/corpus/31_func_nonlocal.py diff --git a/crates/ty_project/resources/test/corpus/32_func_global_nested.py b/crates/ty_python_semantic/resources/corpus/32_func_global_nested.py similarity index 100% rename from crates/ty_project/resources/test/corpus/32_func_global_nested.py rename to crates/ty_python_semantic/resources/corpus/32_func_global_nested.py diff --git a/crates/ty_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py b/crates/ty_python_semantic/resources/corpus/33_func_with_docstring_optimizable_tuple_and_return.py similarity index 100% rename from crates/ty_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py rename to crates/ty_python_semantic/resources/corpus/33_func_with_docstring_optimizable_tuple_and_return.py diff --git a/crates/ty_project/resources/test/corpus/40_import.py b/crates/ty_python_semantic/resources/corpus/40_import.py similarity index 100% rename from crates/ty_project/resources/test/corpus/40_import.py rename to crates/ty_python_semantic/resources/corpus/40_import.py diff --git a/crates/ty_project/resources/test/corpus/41_from_import.py b/crates/ty_python_semantic/resources/corpus/41_from_import.py similarity index 100% rename from crates/ty_project/resources/test/corpus/41_from_import.py rename to crates/ty_python_semantic/resources/corpus/41_from_import.py diff --git a/crates/ty_project/resources/test/corpus/42_import_from_dot.py b/crates/ty_python_semantic/resources/corpus/42_import_from_dot.py similarity index 100% rename from crates/ty_project/resources/test/corpus/42_import_from_dot.py rename to crates/ty_python_semantic/resources/corpus/42_import_from_dot.py diff --git a/crates/ty_project/resources/test/corpus/50_yield.py b/crates/ty_python_semantic/resources/corpus/50_yield.py similarity index 100% rename from crates/ty_project/resources/test/corpus/50_yield.py rename to crates/ty_python_semantic/resources/corpus/50_yield.py diff --git a/crates/ty_project/resources/test/corpus/51_gen_comp.py b/crates/ty_python_semantic/resources/corpus/51_gen_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/51_gen_comp.py rename to crates/ty_python_semantic/resources/corpus/51_gen_comp.py diff --git a/crates/ty_project/resources/test/corpus/51_gen_comp2.py b/crates/ty_python_semantic/resources/corpus/51_gen_comp2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/51_gen_comp2.py rename to crates/ty_python_semantic/resources/corpus/51_gen_comp2.py diff --git a/crates/ty_project/resources/test/corpus/52_gen_comp_if.py b/crates/ty_python_semantic/resources/corpus/52_gen_comp_if.py similarity index 100% rename from crates/ty_project/resources/test/corpus/52_gen_comp_if.py rename to crates/ty_python_semantic/resources/corpus/52_gen_comp_if.py diff --git a/crates/ty_project/resources/test/corpus/53_dict_comp.py b/crates/ty_python_semantic/resources/corpus/53_dict_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/53_dict_comp.py rename to crates/ty_python_semantic/resources/corpus/53_dict_comp.py diff --git a/crates/ty_project/resources/test/corpus/53_list_comp.py b/crates/ty_python_semantic/resources/corpus/53_list_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/53_list_comp.py rename to crates/ty_python_semantic/resources/corpus/53_list_comp.py diff --git a/crates/ty_project/resources/test/corpus/53_list_comp_method.py b/crates/ty_python_semantic/resources/corpus/53_list_comp_method.py similarity index 100% rename from crates/ty_project/resources/test/corpus/53_list_comp_method.py rename to crates/ty_python_semantic/resources/corpus/53_list_comp_method.py diff --git a/crates/ty_project/resources/test/corpus/53_set_comp.py b/crates/ty_python_semantic/resources/corpus/53_set_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/53_set_comp.py rename to crates/ty_python_semantic/resources/corpus/53_set_comp.py diff --git a/crates/ty_project/resources/test/corpus/54_list_comp_func.py b/crates/ty_python_semantic/resources/corpus/54_list_comp_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/54_list_comp_func.py rename to crates/ty_python_semantic/resources/corpus/54_list_comp_func.py diff --git a/crates/ty_project/resources/test/corpus/54_list_comp_lambda.py b/crates/ty_python_semantic/resources/corpus/54_list_comp_lambda.py similarity index 100% rename from crates/ty_project/resources/test/corpus/54_list_comp_lambda.py rename to crates/ty_python_semantic/resources/corpus/54_list_comp_lambda.py diff --git a/crates/ty_project/resources/test/corpus/54_list_comp_lambda_listcomp.py b/crates/ty_python_semantic/resources/corpus/54_list_comp_lambda_listcomp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/54_list_comp_lambda_listcomp.py rename to crates/ty_python_semantic/resources/corpus/54_list_comp_lambda_listcomp.py diff --git a/crates/ty_project/resources/test/corpus/54_list_comp_recur_func.py b/crates/ty_python_semantic/resources/corpus/54_list_comp_recur_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/54_list_comp_recur_func.py rename to crates/ty_python_semantic/resources/corpus/54_list_comp_recur_func.py diff --git a/crates/ty_project/resources/test/corpus/55_list_comp_nested.py b/crates/ty_python_semantic/resources/corpus/55_list_comp_nested.py similarity index 100% rename from crates/ty_project/resources/test/corpus/55_list_comp_nested.py rename to crates/ty_python_semantic/resources/corpus/55_list_comp_nested.py diff --git a/crates/ty_project/resources/test/corpus/56_yield_from.py b/crates/ty_python_semantic/resources/corpus/56_yield_from.py similarity index 100% rename from crates/ty_project/resources/test/corpus/56_yield_from.py rename to crates/ty_python_semantic/resources/corpus/56_yield_from.py diff --git a/crates/ty_project/resources/test/corpus/57_await.py b/crates/ty_python_semantic/resources/corpus/57_await.py similarity index 100% rename from crates/ty_project/resources/test/corpus/57_await.py rename to crates/ty_python_semantic/resources/corpus/57_await.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for.py b/crates/ty_python_semantic/resources/corpus/58_async_for.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for.py rename to crates/ty_python_semantic/resources/corpus/58_async_for.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_break.py b/crates/ty_python_semantic/resources/corpus/58_async_for_break.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_break.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_break.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_continue.py b/crates/ty_python_semantic/resources/corpus/58_async_for_continue.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_continue.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_continue.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_dict_comp.py b/crates/ty_python_semantic/resources/corpus/58_async_for_dict_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_dict_comp.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_dict_comp.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_else.py b/crates/ty_python_semantic/resources/corpus/58_async_for_else.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_else.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_else.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_gen_comp.py b/crates/ty_python_semantic/resources/corpus/58_async_for_gen_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_gen_comp.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_gen_comp.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_list_comp.py b/crates/ty_python_semantic/resources/corpus/58_async_for_list_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_list_comp.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_list_comp.py diff --git a/crates/ty_project/resources/test/corpus/58_async_for_set_comp.py b/crates/ty_python_semantic/resources/corpus/58_async_for_set_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/58_async_for_set_comp.py rename to crates/ty_python_semantic/resources/corpus/58_async_for_set_comp.py diff --git a/crates/ty_project/resources/test/corpus/59_async_with.py b/crates/ty_python_semantic/resources/corpus/59_async_with.py similarity index 100% rename from crates/ty_project/resources/test/corpus/59_async_with.py rename to crates/ty_python_semantic/resources/corpus/59_async_with.py diff --git a/crates/ty_project/resources/test/corpus/59_async_with_nested_with.py b/crates/ty_python_semantic/resources/corpus/59_async_with_nested_with.py similarity index 100% rename from crates/ty_project/resources/test/corpus/59_async_with_nested_with.py rename to crates/ty_python_semantic/resources/corpus/59_async_with_nested_with.py diff --git a/crates/ty_project/resources/test/corpus/60_try_except.py b/crates/ty_python_semantic/resources/corpus/60_try_except.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_except.py rename to crates/ty_python_semantic/resources/corpus/60_try_except.py diff --git a/crates/ty_project/resources/test/corpus/60_try_except2.py b/crates/ty_python_semantic/resources/corpus/60_try_except2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_except2.py rename to crates/ty_python_semantic/resources/corpus/60_try_except2.py diff --git a/crates/ty_project/resources/test/corpus/60_try_except_bare.py b/crates/ty_python_semantic/resources/corpus/60_try_except_bare.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_except_bare.py rename to crates/ty_python_semantic/resources/corpus/60_try_except_bare.py diff --git a/crates/ty_project/resources/test/corpus/60_try_finally.py b/crates/ty_python_semantic/resources/corpus/60_try_finally.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_finally.py rename to crates/ty_python_semantic/resources/corpus/60_try_finally.py diff --git a/crates/ty_project/resources/test/corpus/60_try_finally_codeobj.py b/crates/ty_python_semantic/resources/corpus/60_try_finally_codeobj.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_finally_codeobj.py rename to crates/ty_python_semantic/resources/corpus/60_try_finally_codeobj.py diff --git a/crates/ty_project/resources/test/corpus/60_try_finally_cond.py b/crates/ty_python_semantic/resources/corpus/60_try_finally_cond.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_finally_cond.py rename to crates/ty_python_semantic/resources/corpus/60_try_finally_cond.py diff --git a/crates/ty_project/resources/test/corpus/60_try_finally_for.py b/crates/ty_python_semantic/resources/corpus/60_try_finally_for.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_finally_for.py rename to crates/ty_python_semantic/resources/corpus/60_try_finally_for.py diff --git a/crates/ty_project/resources/test/corpus/60_try_finally_ret.py b/crates/ty_python_semantic/resources/corpus/60_try_finally_ret.py similarity index 100% rename from crates/ty_project/resources/test/corpus/60_try_finally_ret.py rename to crates/ty_python_semantic/resources/corpus/60_try_finally_ret.py diff --git a/crates/ty_project/resources/test/corpus/61_try_except_finally.py b/crates/ty_python_semantic/resources/corpus/61_try_except_finally.py similarity index 100% rename from crates/ty_project/resources/test/corpus/61_try_except_finally.py rename to crates/ty_python_semantic/resources/corpus/61_try_except_finally.py diff --git a/crates/ty_project/resources/test/corpus/62_try_except_as.py b/crates/ty_python_semantic/resources/corpus/62_try_except_as.py similarity index 100% rename from crates/ty_project/resources/test/corpus/62_try_except_as.py rename to crates/ty_python_semantic/resources/corpus/62_try_except_as.py diff --git a/crates/ty_project/resources/test/corpus/62_try_except_break.py b/crates/ty_python_semantic/resources/corpus/62_try_except_break.py similarity index 100% rename from crates/ty_project/resources/test/corpus/62_try_except_break.py rename to crates/ty_python_semantic/resources/corpus/62_try_except_break.py diff --git a/crates/ty_project/resources/test/corpus/62_try_except_cond.py b/crates/ty_python_semantic/resources/corpus/62_try_except_cond.py similarity index 100% rename from crates/ty_project/resources/test/corpus/62_try_except_cond.py rename to crates/ty_python_semantic/resources/corpus/62_try_except_cond.py diff --git a/crates/ty_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py b/crates/ty_python_semantic/resources/corpus/62_try_except_double_nested_inside_if_else.py similarity index 100% rename from crates/ty_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py rename to crates/ty_python_semantic/resources/corpus/62_try_except_double_nested_inside_if_else.py diff --git a/crates/ty_project/resources/test/corpus/62_try_except_return.py b/crates/ty_python_semantic/resources/corpus/62_try_except_return.py similarity index 100% rename from crates/ty_project/resources/test/corpus/62_try_except_return.py rename to crates/ty_python_semantic/resources/corpus/62_try_except_return.py diff --git a/crates/ty_project/resources/test/corpus/63_raise.py b/crates/ty_python_semantic/resources/corpus/63_raise.py similarity index 100% rename from crates/ty_project/resources/test/corpus/63_raise.py rename to crates/ty_python_semantic/resources/corpus/63_raise.py diff --git a/crates/ty_project/resources/test/corpus/63_raise_func.py b/crates/ty_python_semantic/resources/corpus/63_raise_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/63_raise_func.py rename to crates/ty_python_semantic/resources/corpus/63_raise_func.py diff --git a/crates/ty_project/resources/test/corpus/63_raise_x.py b/crates/ty_python_semantic/resources/corpus/63_raise_x.py similarity index 100% rename from crates/ty_project/resources/test/corpus/63_raise_x.py rename to crates/ty_python_semantic/resources/corpus/63_raise_x.py diff --git a/crates/ty_project/resources/test/corpus/63_raise_x_from_y.py b/crates/ty_python_semantic/resources/corpus/63_raise_x_from_y.py similarity index 100% rename from crates/ty_project/resources/test/corpus/63_raise_x_from_y.py rename to crates/ty_python_semantic/resources/corpus/63_raise_x_from_y.py diff --git a/crates/ty_project/resources/test/corpus/64_assert.py b/crates/ty_python_semantic/resources/corpus/64_assert.py similarity index 100% rename from crates/ty_project/resources/test/corpus/64_assert.py rename to crates/ty_python_semantic/resources/corpus/64_assert.py diff --git a/crates/ty_project/resources/test/corpus/67_with.py b/crates/ty_python_semantic/resources/corpus/67_with.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with.py rename to crates/ty_python_semantic/resources/corpus/67_with.py diff --git a/crates/ty_project/resources/test/corpus/67_with_as.py b/crates/ty_python_semantic/resources/corpus/67_with_as.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_as.py rename to crates/ty_python_semantic/resources/corpus/67_with_as.py diff --git a/crates/ty_project/resources/test/corpus/67_with_as_func.py b/crates/ty_python_semantic/resources/corpus/67_with_as_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_as_func.py rename to crates/ty_python_semantic/resources/corpus/67_with_as_func.py diff --git a/crates/ty_project/resources/test/corpus/67_with_cond_return.py b/crates/ty_python_semantic/resources/corpus/67_with_cond_return.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_cond_return.py rename to crates/ty_python_semantic/resources/corpus/67_with_cond_return.py diff --git a/crates/ty_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py b/crates/ty_python_semantic/resources/corpus/67_with_inside_try_finally_multiple_terminal_elif.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py rename to crates/ty_python_semantic/resources/corpus/67_with_inside_try_finally_multiple_terminal_elif.py diff --git a/crates/ty_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py b/crates/ty_python_semantic/resources/corpus/67_with_inside_try_finally_preceding_terminal_except.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py rename to crates/ty_python_semantic/resources/corpus/67_with_inside_try_finally_preceding_terminal_except.py diff --git a/crates/ty_project/resources/test/corpus/67_with_multi_exit.py b/crates/ty_python_semantic/resources/corpus/67_with_multi_exit.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_multi_exit.py rename to crates/ty_python_semantic/resources/corpus/67_with_multi_exit.py diff --git a/crates/ty_project/resources/test/corpus/67_with_non_name_target.py b/crates/ty_python_semantic/resources/corpus/67_with_non_name_target.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_non_name_target.py rename to crates/ty_python_semantic/resources/corpus/67_with_non_name_target.py diff --git a/crates/ty_project/resources/test/corpus/67_with_return.py b/crates/ty_python_semantic/resources/corpus/67_with_return.py similarity index 100% rename from crates/ty_project/resources/test/corpus/67_with_return.py rename to crates/ty_python_semantic/resources/corpus/67_with_return.py diff --git a/crates/ty_project/resources/test/corpus/68_with2.py b/crates/ty_python_semantic/resources/corpus/68_with2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/68_with2.py rename to crates/ty_python_semantic/resources/corpus/68_with2.py diff --git a/crates/ty_project/resources/test/corpus/69_for_try_except_continue1.py b/crates/ty_python_semantic/resources/corpus/69_for_try_except_continue1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/69_for_try_except_continue1.py rename to crates/ty_python_semantic/resources/corpus/69_for_try_except_continue1.py diff --git a/crates/ty_project/resources/test/corpus/69_for_try_except_continue2.py b/crates/ty_python_semantic/resources/corpus/69_for_try_except_continue2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/69_for_try_except_continue2.py rename to crates/ty_python_semantic/resources/corpus/69_for_try_except_continue2.py diff --git a/crates/ty_project/resources/test/corpus/69_for_try_except_continue3.py b/crates/ty_python_semantic/resources/corpus/69_for_try_except_continue3.py similarity index 100% rename from crates/ty_project/resources/test/corpus/69_for_try_except_continue3.py rename to crates/ty_python_semantic/resources/corpus/69_for_try_except_continue3.py diff --git a/crates/ty_project/resources/test/corpus/70_class.py b/crates/ty_python_semantic/resources/corpus/70_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/70_class.py rename to crates/ty_python_semantic/resources/corpus/70_class.py diff --git a/crates/ty_project/resources/test/corpus/70_class_base.py b/crates/ty_python_semantic/resources/corpus/70_class_base.py similarity index 100% rename from crates/ty_project/resources/test/corpus/70_class_base.py rename to crates/ty_python_semantic/resources/corpus/70_class_base.py diff --git a/crates/ty_project/resources/test/corpus/70_class_doc_str.py b/crates/ty_python_semantic/resources/corpus/70_class_doc_str.py similarity index 100% rename from crates/ty_project/resources/test/corpus/70_class_doc_str.py rename to crates/ty_python_semantic/resources/corpus/70_class_doc_str.py diff --git a/crates/ty_project/resources/test/corpus/71_class_meth.py b/crates/ty_python_semantic/resources/corpus/71_class_meth.py similarity index 100% rename from crates/ty_project/resources/test/corpus/71_class_meth.py rename to crates/ty_python_semantic/resources/corpus/71_class_meth.py diff --git a/crates/ty_project/resources/test/corpus/71_class_var.py b/crates/ty_python_semantic/resources/corpus/71_class_var.py similarity index 100% rename from crates/ty_project/resources/test/corpus/71_class_var.py rename to crates/ty_python_semantic/resources/corpus/71_class_var.py diff --git a/crates/ty_project/resources/test/corpus/72_class_mix.py b/crates/ty_python_semantic/resources/corpus/72_class_mix.py similarity index 100% rename from crates/ty_project/resources/test/corpus/72_class_mix.py rename to crates/ty_python_semantic/resources/corpus/72_class_mix.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic.py b/crates/ty_python_semantic/resources/corpus/73_class_generic.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_bounds.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_bounds.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_bounds.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_bounds.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_constraints.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_constraints.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_constraints.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_constraints.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_defaults.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_defaults.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_defaults.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_defaults.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_paramspec.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_paramspec.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_paramspec.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_paramspec.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_paramspec_default.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_paramspec_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_paramspec_default.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_paramspec_default.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_tuple.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_tuple.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_tuple.py diff --git a/crates/ty_project/resources/test/corpus/73_class_generic_tuple_default.py b/crates/ty_python_semantic/resources/corpus/73_class_generic_tuple_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/73_class_generic_tuple_default.py rename to crates/ty_python_semantic/resources/corpus/73_class_generic_tuple_default.py diff --git a/crates/ty_project/resources/test/corpus/74_class_kwargs.py b/crates/ty_python_semantic/resources/corpus/74_class_kwargs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/74_class_kwargs.py rename to crates/ty_python_semantic/resources/corpus/74_class_kwargs.py diff --git a/crates/ty_project/resources/test/corpus/74_class_kwargs_2.py b/crates/ty_python_semantic/resources/corpus/74_class_kwargs_2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/74_class_kwargs_2.py rename to crates/ty_python_semantic/resources/corpus/74_class_kwargs_2.py diff --git a/crates/ty_project/resources/test/corpus/74_class_super.py b/crates/ty_python_semantic/resources/corpus/74_class_super.py similarity index 100% rename from crates/ty_project/resources/test/corpus/74_class_super.py rename to crates/ty_python_semantic/resources/corpus/74_class_super.py diff --git a/crates/ty_project/resources/test/corpus/74_class_super_nested.py b/crates/ty_python_semantic/resources/corpus/74_class_super_nested.py similarity index 100% rename from crates/ty_project/resources/test/corpus/74_class_super_nested.py rename to crates/ty_python_semantic/resources/corpus/74_class_super_nested.py diff --git a/crates/ty_project/resources/test/corpus/74_just_super.py b/crates/ty_python_semantic/resources/corpus/74_just_super.py similarity index 100% rename from crates/ty_project/resources/test/corpus/74_just_super.py rename to crates/ty_python_semantic/resources/corpus/74_just_super.py diff --git a/crates/ty_project/resources/test/corpus/75_classderef.py b/crates/ty_python_semantic/resources/corpus/75_classderef.py similarity index 100% rename from crates/ty_project/resources/test/corpus/75_classderef.py rename to crates/ty_python_semantic/resources/corpus/75_classderef.py diff --git a/crates/ty_project/resources/test/corpus/75_classderef_no.py b/crates/ty_python_semantic/resources/corpus/75_classderef_no.py similarity index 100% rename from crates/ty_project/resources/test/corpus/75_classderef_no.py rename to crates/ty_python_semantic/resources/corpus/75_classderef_no.py diff --git a/crates/ty_project/resources/test/corpus/76_class_nonlocal1.py b/crates/ty_python_semantic/resources/corpus/76_class_nonlocal1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/76_class_nonlocal1.py rename to crates/ty_python_semantic/resources/corpus/76_class_nonlocal1.py diff --git a/crates/ty_project/resources/test/corpus/76_class_nonlocal2.py b/crates/ty_python_semantic/resources/corpus/76_class_nonlocal2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/76_class_nonlocal2.py rename to crates/ty_python_semantic/resources/corpus/76_class_nonlocal2.py diff --git a/crates/ty_project/resources/test/corpus/76_class_nonlocal3.py b/crates/ty_python_semantic/resources/corpus/76_class_nonlocal3.py similarity index 100% rename from crates/ty_project/resources/test/corpus/76_class_nonlocal3.py rename to crates/ty_python_semantic/resources/corpus/76_class_nonlocal3.py diff --git a/crates/ty_project/resources/test/corpus/76_class_nonlocal4.py b/crates/ty_python_semantic/resources/corpus/76_class_nonlocal4.py similarity index 100% rename from crates/ty_project/resources/test/corpus/76_class_nonlocal4.py rename to crates/ty_python_semantic/resources/corpus/76_class_nonlocal4.py diff --git a/crates/ty_project/resources/test/corpus/76_class_nonlocal5.py b/crates/ty_python_semantic/resources/corpus/76_class_nonlocal5.py similarity index 100% rename from crates/ty_project/resources/test/corpus/76_class_nonlocal5.py rename to crates/ty_python_semantic/resources/corpus/76_class_nonlocal5.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__.py b/crates/ty_python_semantic/resources/corpus/77_class__class__.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__nested.py b/crates/ty_python_semantic/resources/corpus/77_class__class__nested.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__nested.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__nested.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__no_class.py b/crates/ty_python_semantic/resources/corpus/77_class__class__no_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__no_class.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__no_class.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__nonlocals.py b/crates/ty_python_semantic/resources/corpus/77_class__class__nonlocals.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__nonlocals.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__nonlocals.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__nonlocals_2.py b/crates/ty_python_semantic/resources/corpus/77_class__class__nonlocals_2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__nonlocals_2.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__nonlocals_2.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__param.py b/crates/ty_python_semantic/resources/corpus/77_class__class__param.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__param.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__param.py diff --git a/crates/ty_project/resources/test/corpus/77_class__class__param_lambda.py b/crates/ty_python_semantic/resources/corpus/77_class__class__param_lambda.py similarity index 100% rename from crates/ty_project/resources/test/corpus/77_class__class__param_lambda.py rename to crates/ty_python_semantic/resources/corpus/77_class__class__param_lambda.py diff --git a/crates/ty_project/resources/test/corpus/78_class_body_cond.py b/crates/ty_python_semantic/resources/corpus/78_class_body_cond.py similarity index 100% rename from crates/ty_project/resources/test/corpus/78_class_body_cond.py rename to crates/ty_python_semantic/resources/corpus/78_class_body_cond.py diff --git a/crates/ty_project/resources/test/corpus/78_class_dec.py b/crates/ty_python_semantic/resources/corpus/78_class_dec.py similarity index 100% rename from crates/ty_project/resources/test/corpus/78_class_dec.py rename to crates/ty_python_semantic/resources/corpus/78_class_dec.py diff --git a/crates/ty_project/resources/test/corpus/78_class_dec_member.py b/crates/ty_python_semantic/resources/corpus/78_class_dec_member.py similarity index 100% rename from crates/ty_project/resources/test/corpus/78_class_dec_member.py rename to crates/ty_python_semantic/resources/corpus/78_class_dec_member.py diff --git a/crates/ty_project/resources/test/corpus/78_class_dec_member_func.py b/crates/ty_python_semantic/resources/corpus/78_class_dec_member_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/78_class_dec_member_func.py rename to crates/ty_python_semantic/resources/corpus/78_class_dec_member_func.py diff --git a/crates/ty_project/resources/test/corpus/79_metaclass.py b/crates/ty_python_semantic/resources/corpus/79_metaclass.py similarity index 100% rename from crates/ty_project/resources/test/corpus/79_metaclass.py rename to crates/ty_python_semantic/resources/corpus/79_metaclass.py diff --git a/crates/ty_project/resources/test/corpus/80_func_kwonlyargs1.py b/crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/80_func_kwonlyargs1.py rename to crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs1.py diff --git a/crates/ty_project/resources/test/corpus/80_func_kwonlyargs2.py b/crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/80_func_kwonlyargs2.py rename to crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs2.py diff --git a/crates/ty_project/resources/test/corpus/80_func_kwonlyargs3.py b/crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs3.py similarity index 100% rename from crates/ty_project/resources/test/corpus/80_func_kwonlyargs3.py rename to crates/ty_python_semantic/resources/corpus/80_func_kwonlyargs3.py diff --git a/crates/ty_project/resources/test/corpus/81_func_kwonlyargs_defaults.py b/crates/ty_python_semantic/resources/corpus/81_func_kwonlyargs_defaults.py similarity index 100% rename from crates/ty_project/resources/test/corpus/81_func_kwonlyargs_defaults.py rename to crates/ty_python_semantic/resources/corpus/81_func_kwonlyargs_defaults.py diff --git a/crates/ty_python_semantic/resources/corpus/83_jupyter_notebook_ipython_magic.ipynb b/crates/ty_python_semantic/resources/corpus/83_jupyter_notebook_ipython_magic.ipynb new file mode 120000 index 0000000000000..a323f576562dd --- /dev/null +++ b/crates/ty_python_semantic/resources/corpus/83_jupyter_notebook_ipython_magic.ipynb @@ -0,0 +1 @@ +../../../ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb \ No newline at end of file diff --git a/crates/ty_project/resources/test/corpus/85_match.py b/crates/ty_python_semantic/resources/corpus/85_match.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match.py rename to crates/ty_python_semantic/resources/corpus/85_match.py diff --git a/crates/ty_project/resources/test/corpus/85_match_as.py b/crates/ty_python_semantic/resources/corpus/85_match_as.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_as.py rename to crates/ty_python_semantic/resources/corpus/85_match_as.py diff --git a/crates/ty_project/resources/test/corpus/85_match_attr.py b/crates/ty_python_semantic/resources/corpus/85_match_attr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_attr.py rename to crates/ty_python_semantic/resources/corpus/85_match_attr.py diff --git a/crates/ty_project/resources/test/corpus/85_match_class.py b/crates/ty_python_semantic/resources/corpus/85_match_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_class.py rename to crates/ty_python_semantic/resources/corpus/85_match_class.py diff --git a/crates/ty_project/resources/test/corpus/85_match_default.py b/crates/ty_python_semantic/resources/corpus/85_match_default.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_default.py rename to crates/ty_python_semantic/resources/corpus/85_match_default.py diff --git a/crates/ty_project/resources/test/corpus/85_match_guard.py b/crates/ty_python_semantic/resources/corpus/85_match_guard.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_guard.py rename to crates/ty_python_semantic/resources/corpus/85_match_guard.py diff --git a/crates/ty_project/resources/test/corpus/85_match_guard_with_named_expr.py b/crates/ty_python_semantic/resources/corpus/85_match_guard_with_named_expr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_guard_with_named_expr.py rename to crates/ty_python_semantic/resources/corpus/85_match_guard_with_named_expr.py diff --git a/crates/ty_project/resources/test/corpus/85_match_in_func.py b/crates/ty_python_semantic/resources/corpus/85_match_in_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_in_func.py rename to crates/ty_python_semantic/resources/corpus/85_match_in_func.py diff --git a/crates/ty_project/resources/test/corpus/85_match_in_func_with_rest.py b/crates/ty_python_semantic/resources/corpus/85_match_in_func_with_rest.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_in_func_with_rest.py rename to crates/ty_python_semantic/resources/corpus/85_match_in_func_with_rest.py diff --git a/crates/ty_project/resources/test/corpus/85_match_in_func_with_star.py b/crates/ty_python_semantic/resources/corpus/85_match_in_func_with_star.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_in_func_with_star.py rename to crates/ty_python_semantic/resources/corpus/85_match_in_func_with_star.py diff --git a/crates/ty_project/resources/test/corpus/85_match_invalid.py b/crates/ty_python_semantic/resources/corpus/85_match_invalid.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_invalid.py rename to crates/ty_python_semantic/resources/corpus/85_match_invalid.py diff --git a/crates/ty_project/resources/test/corpus/85_match_mapping.py b/crates/ty_python_semantic/resources/corpus/85_match_mapping.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_mapping.py rename to crates/ty_python_semantic/resources/corpus/85_match_mapping.py diff --git a/crates/ty_project/resources/test/corpus/85_match_mapping_subpattern.py b/crates/ty_python_semantic/resources/corpus/85_match_mapping_subpattern.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_mapping_subpattern.py rename to crates/ty_python_semantic/resources/corpus/85_match_mapping_subpattern.py diff --git a/crates/ty_project/resources/test/corpus/85_match_or.py b/crates/ty_python_semantic/resources/corpus/85_match_or.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_or.py rename to crates/ty_python_semantic/resources/corpus/85_match_or.py diff --git a/crates/ty_project/resources/test/corpus/85_match_sequence.py b/crates/ty_python_semantic/resources/corpus/85_match_sequence.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_sequence.py rename to crates/ty_python_semantic/resources/corpus/85_match_sequence.py diff --git a/crates/ty_project/resources/test/corpus/85_match_sequence_wildcard.py b/crates/ty_python_semantic/resources/corpus/85_match_sequence_wildcard.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_sequence_wildcard.py rename to crates/ty_python_semantic/resources/corpus/85_match_sequence_wildcard.py diff --git a/crates/ty_project/resources/test/corpus/85_match_singleton.py b/crates/ty_python_semantic/resources/corpus/85_match_singleton.py similarity index 100% rename from crates/ty_project/resources/test/corpus/85_match_singleton.py rename to crates/ty_python_semantic/resources/corpus/85_match_singleton.py diff --git a/crates/ty_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py b/crates/ty_python_semantic/resources/corpus/88_regression_generic_method_with_nested_function.py similarity index 100% rename from crates/ty_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py rename to crates/ty_python_semantic/resources/corpus/88_regression_generic_method_with_nested_function.py diff --git a/crates/ty_project/resources/test/corpus/88_regression_issue_17792.py b/crates/ty_python_semantic/resources/corpus/88_regression_issue_17792.py similarity index 100% rename from crates/ty_project/resources/test/corpus/88_regression_issue_17792.py rename to crates/ty_python_semantic/resources/corpus/88_regression_issue_17792.py diff --git a/crates/ty_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py b/crates/ty_python_semantic/resources/corpus/88_regression_tuple_type_short_circuit.py similarity index 100% rename from crates/ty_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py rename to crates/ty_python_semantic/resources/corpus/88_regression_tuple_type_short_circuit.py diff --git a/crates/ty_project/resources/test/corpus/89_type_alias.py b/crates/ty_python_semantic/resources/corpus/89_type_alias.py similarity index 100% rename from crates/ty_project/resources/test/corpus/89_type_alias.py rename to crates/ty_python_semantic/resources/corpus/89_type_alias.py diff --git a/crates/ty_project/resources/test/corpus/90_docstring_class.py b/crates/ty_python_semantic/resources/corpus/90_docstring_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/90_docstring_class.py rename to crates/ty_python_semantic/resources/corpus/90_docstring_class.py diff --git a/crates/ty_project/resources/test/corpus/90_docstring_func.py b/crates/ty_python_semantic/resources/corpus/90_docstring_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/90_docstring_func.py rename to crates/ty_python_semantic/resources/corpus/90_docstring_func.py diff --git a/crates/ty_project/resources/test/corpus/90_docstring_mod.py b/crates/ty_python_semantic/resources/corpus/90_docstring_mod.py similarity index 100% rename from crates/ty_project/resources/test/corpus/90_docstring_mod.py rename to crates/ty_python_semantic/resources/corpus/90_docstring_mod.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers1.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers1.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers1.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers1.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers2.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers2.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers2.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers2.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers2_comp.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers2_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers2_comp.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers2_comp.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers3.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers3.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers3.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers3.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers4.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers4.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers4.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers4.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers_dict.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers_dict.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers_dict.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers_dict.py diff --git a/crates/ty_project/resources/test/corpus/91_line_numbers_dict_comp.py b/crates/ty_python_semantic/resources/corpus/91_line_numbers_dict_comp.py similarity index 100% rename from crates/ty_project/resources/test/corpus/91_line_numbers_dict_comp.py rename to crates/ty_python_semantic/resources/corpus/91_line_numbers_dict_comp.py diff --git a/crates/ty_project/resources/test/corpus/92_qual_class_in_class.py b/crates/ty_python_semantic/resources/corpus/92_qual_class_in_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/92_qual_class_in_class.py rename to crates/ty_python_semantic/resources/corpus/92_qual_class_in_class.py diff --git a/crates/ty_project/resources/test/corpus/92_qual_class_in_func.py b/crates/ty_python_semantic/resources/corpus/92_qual_class_in_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/92_qual_class_in_func.py rename to crates/ty_python_semantic/resources/corpus/92_qual_class_in_func.py diff --git a/crates/ty_project/resources/test/corpus/93_deadcode.py b/crates/ty_python_semantic/resources/corpus/93_deadcode.py similarity index 100% rename from crates/ty_project/resources/test/corpus/93_deadcode.py rename to crates/ty_python_semantic/resources/corpus/93_deadcode.py diff --git a/crates/ty_project/resources/test/corpus/94_strformat.py b/crates/ty_python_semantic/resources/corpus/94_strformat.py similarity index 100% rename from crates/ty_project/resources/test/corpus/94_strformat.py rename to crates/ty_python_semantic/resources/corpus/94_strformat.py diff --git a/crates/ty_project/resources/test/corpus/94_strformat_complex.py b/crates/ty_python_semantic/resources/corpus/94_strformat_complex.py similarity index 100% rename from crates/ty_project/resources/test/corpus/94_strformat_complex.py rename to crates/ty_python_semantic/resources/corpus/94_strformat_complex.py diff --git a/crates/ty_project/resources/test/corpus/94_strformat_conv.py b/crates/ty_python_semantic/resources/corpus/94_strformat_conv.py similarity index 100% rename from crates/ty_project/resources/test/corpus/94_strformat_conv.py rename to crates/ty_python_semantic/resources/corpus/94_strformat_conv.py diff --git a/crates/ty_project/resources/test/corpus/94_strformat_conversion.py b/crates/ty_python_semantic/resources/corpus/94_strformat_conversion.py similarity index 100% rename from crates/ty_project/resources/test/corpus/94_strformat_conversion.py rename to crates/ty_python_semantic/resources/corpus/94_strformat_conversion.py diff --git a/crates/ty_project/resources/test/corpus/94_strformat_spec.py b/crates/ty_python_semantic/resources/corpus/94_strformat_spec.py similarity index 100% rename from crates/ty_project/resources/test/corpus/94_strformat_spec.py rename to crates/ty_python_semantic/resources/corpus/94_strformat_spec.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py b/crates/ty_python_semantic/resources/corpus/95_annotation_assign_subscript_no_rhs.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_assign_subscript_no_rhs.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_assign_tuple.py b/crates/ty_python_semantic/resources/corpus/95_annotation_assign_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_assign_tuple.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_assign_tuple.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_class.py b/crates/ty_python_semantic/resources/corpus/95_annotation_class.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_class.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_class.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_class_multiline.py b/crates/ty_python_semantic/resources/corpus/95_annotation_class_multiline.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_class_multiline.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_class_multiline.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_class_no_value.py b/crates/ty_python_semantic/resources/corpus/95_annotation_class_no_value.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_class_no_value.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_class_no_value.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_fstring_invalid.py b/crates/ty_python_semantic/resources/corpus/95_annotation_fstring_invalid.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_fstring_invalid.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_fstring_invalid.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_func.py b/crates/ty_python_semantic/resources/corpus/95_annotation_func.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_func.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_func.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_func_future.py b/crates/ty_python_semantic/resources/corpus/95_annotation_func_future.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_func_future.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_func_future.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_global.py b/crates/ty_python_semantic/resources/corpus/95_annotation_global.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_global.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_global.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_global_simple.py b/crates/ty_python_semantic/resources/corpus/95_annotation_global_simple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_global_simple.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_global_simple.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_local_attr.py b/crates/ty_python_semantic/resources/corpus/95_annotation_local_attr.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_local_attr.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_local_attr.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_module.py b/crates/ty_python_semantic/resources/corpus/95_annotation_module.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_module.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_module.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_string_tuple.py b/crates/ty_python_semantic/resources/corpus/95_annotation_string_tuple.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_string_tuple.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_string_tuple.py diff --git a/crates/ty_project/resources/test/corpus/95_annotation_union.py b/crates/ty_python_semantic/resources/corpus/95_annotation_union.py similarity index 100% rename from crates/ty_project/resources/test/corpus/95_annotation_union.py rename to crates/ty_python_semantic/resources/corpus/95_annotation_union.py diff --git a/crates/ty_project/resources/test/corpus/96_debug.py b/crates/ty_python_semantic/resources/corpus/96_debug.py similarity index 100% rename from crates/ty_project/resources/test/corpus/96_debug.py rename to crates/ty_python_semantic/resources/corpus/96_debug.py diff --git a/crates/ty_project/resources/test/corpus/97_global_nonlocal_store.py b/crates/ty_python_semantic/resources/corpus/97_global_nonlocal_store.py similarity index 100% rename from crates/ty_project/resources/test/corpus/97_global_nonlocal_store.py rename to crates/ty_python_semantic/resources/corpus/97_global_nonlocal_store.py diff --git a/crates/ty_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py b/crates/ty_python_semantic/resources/corpus/98_ann_assign_annotation_future_annotations.py similarity index 100% rename from crates/ty_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py rename to crates/ty_python_semantic/resources/corpus/98_ann_assign_annotation_future_annotations.py diff --git a/crates/ty_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py b/crates/ty_python_semantic/resources/corpus/98_ann_assign_annotation_wrong_future.py similarity index 100% rename from crates/ty_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py rename to crates/ty_python_semantic/resources/corpus/98_ann_assign_annotation_wrong_future.py diff --git a/crates/ty_project/resources/test/corpus/98_ann_assign_simple_annotation.py b/crates/ty_python_semantic/resources/corpus/98_ann_assign_simple_annotation.py similarity index 100% rename from crates/ty_project/resources/test/corpus/98_ann_assign_simple_annotation.py rename to crates/ty_python_semantic/resources/corpus/98_ann_assign_simple_annotation.py diff --git a/crates/ty_project/resources/test/corpus/99_empty_jump_target_insts.py b/crates/ty_python_semantic/resources/corpus/99_empty_jump_target_insts.py similarity index 100% rename from crates/ty_project/resources/test/corpus/99_empty_jump_target_insts.py rename to crates/ty_python_semantic/resources/corpus/99_empty_jump_target_insts.py diff --git a/crates/ty_project/resources/test/corpus/callable_with_concatenate.py b/crates/ty_python_semantic/resources/corpus/callable_with_concatenate.py similarity index 100% rename from crates/ty_project/resources/test/corpus/callable_with_concatenate.py rename to crates/ty_python_semantic/resources/corpus/callable_with_concatenate.py diff --git a/crates/ty_project/resources/test/corpus/cycle_narrowing_constraints.py b/crates/ty_python_semantic/resources/corpus/cycle_narrowing_constraints.py similarity index 100% rename from crates/ty_project/resources/test/corpus/cycle_narrowing_constraints.py rename to crates/ty_python_semantic/resources/corpus/cycle_narrowing_constraints.py diff --git a/crates/ty_project/resources/test/corpus/cycle_negative_narrowing_constraints.py b/crates/ty_python_semantic/resources/corpus/cycle_negative_narrowing_constraints.py similarity index 100% rename from crates/ty_project/resources/test/corpus/cycle_negative_narrowing_constraints.py rename to crates/ty_python_semantic/resources/corpus/cycle_negative_narrowing_constraints.py diff --git a/crates/ty_project/resources/test/corpus/except_handler_with_Any_bound_typevar.py b/crates/ty_python_semantic/resources/corpus/except_handler_with_Any_bound_typevar.py similarity index 100% rename from crates/ty_project/resources/test/corpus/except_handler_with_Any_bound_typevar.py rename to crates/ty_python_semantic/resources/corpus/except_handler_with_Any_bound_typevar.py diff --git a/crates/ty_project/resources/test/corpus/literal_slices.py b/crates/ty_python_semantic/resources/corpus/literal_slices.py similarity index 100% rename from crates/ty_project/resources/test/corpus/literal_slices.py rename to crates/ty_python_semantic/resources/corpus/literal_slices.py diff --git a/crates/ty_project/resources/test/corpus/self_referential_function_annotation.py b/crates/ty_python_semantic/resources/corpus/self_referential_function_annotation.py similarity index 100% rename from crates/ty_project/resources/test/corpus/self_referential_function_annotation.py rename to crates/ty_python_semantic/resources/corpus/self_referential_function_annotation.py diff --git a/crates/ty_project/resources/test/corpus/sub_exprs_not_found_in_evaluate_expr_compare.py b/crates/ty_python_semantic/resources/corpus/sub_exprs_not_found_in_evaluate_expr_compare.py similarity index 100% rename from crates/ty_project/resources/test/corpus/sub_exprs_not_found_in_evaluate_expr_compare.py rename to crates/ty_python_semantic/resources/corpus/sub_exprs_not_found_in_evaluate_expr_compare.py diff --git a/crates/ty_project/resources/test/corpus/ty_extensions.py b/crates/ty_python_semantic/resources/corpus/ty_extensions.py similarity index 100% rename from crates/ty_project/resources/test/corpus/ty_extensions.py rename to crates/ty_python_semantic/resources/corpus/ty_extensions.py diff --git a/crates/ty_project/tests/check.rs b/crates/ty_python_semantic/tests/corpus.rs similarity index 73% rename from crates/ty_project/tests/check.rs rename to crates/ty_python_semantic/tests/corpus.rs index 93a4f727fd376..6880dac918ff9 100644 --- a/crates/ty_project/tests/check.rs +++ b/crates/ty_python_semantic/tests/corpus.rs @@ -1,19 +1,20 @@ use anyhow::{Context, anyhow}; -use ruff_db::files::{File, system_path_to_file}; +use ruff_db::Upcast; +use ruff_db::files::{File, Files, system_path_to_file}; use ruff_db::parsed::parsed_module; -use ruff_db::system::{SystemPath, SystemPathBuf, TestSystem}; +use ruff_db::system::{DbWithTestSystem, System, SystemPath, SystemPathBuf, TestSystem}; +use ruff_db::vendored::VendoredFileSystem; use ruff_python_ast::visitor::source_order; use ruff_python_ast::visitor::source_order::SourceOrderVisitor; use ruff_python_ast::{ - self as ast, Alias, Comprehension, Expr, Parameter, ParameterWithDefault, Stmt, + self as ast, Alias, Comprehension, Expr, Parameter, ParameterWithDefault, PythonVersion, Stmt, }; -use ty_project::{ProjectDatabase, ProjectMetadata}; -use ty_python_semantic::{HasType, SemanticModel}; -fn setup_db(project_root: &SystemPath, system: TestSystem) -> anyhow::Result { - let project = ProjectMetadata::discover(project_root, &system)?; - ProjectDatabase::new(project, system) -} +use ty_python_semantic::lint::{LintRegistry, RuleSelection}; +use ty_python_semantic::{ + Db, HasType, Program, ProgramSettings, PythonPlatform, PythonVersionSource, + PythonVersionWithSource, SearchPathSettings, SemanticModel, default_lint_registry, +}; fn get_cargo_workspace_root() -> anyhow::Result { Ok(SystemPathBuf::from(String::from_utf8( @@ -31,7 +32,7 @@ fn get_cargo_workspace_root() -> anyhow::Result { #[test] fn corpus_no_panic() -> anyhow::Result<()> { let crate_root = String::from(env!("CARGO_MANIFEST_DIR")); - run_corpus_tests(&format!("{crate_root}/resources/test/corpus/**/*.py")) + run_corpus_tests(&format!("{crate_root}/resources/corpus/**/*.py")) } #[test] @@ -78,11 +79,9 @@ fn typeshed_no_panic() -> anyhow::Result<()> { fn run_corpus_tests(pattern: &str) -> anyhow::Result<()> { let root = SystemPathBuf::from("/src"); - let system = TestSystem::default(); - let memory_fs = system.memory_file_system(); - memory_fs.create_directory_all(root.as_ref())?; - - let mut db = setup_db(&root, system.clone())?; + let mut db = CorpusDb::new(); + db.memory_file_system() + .create_directory_all(root.as_ref())?; let workspace_root = get_cargo_workspace_root()?; let workspace_root = workspace_root.to_string(); @@ -114,7 +113,8 @@ fn run_corpus_tests(pattern: &str) -> anyhow::Result<()> { let source = path.as_path(); let source_filename = source.file_name().unwrap(); - let code = std::fs::read_to_string(source)?; + let code = std::fs::read_to_string(source) + .with_context(|| format!("Failed to read test file: {path}"))?; let mut check_with_file_name = |path: &SystemPath| { if relative_path.file_name() == Some("types.pyi") { @@ -124,7 +124,7 @@ fn run_corpus_tests(pattern: &str) -> anyhow::Result<()> { return; } - memory_fs.write_file_all(path, &code).unwrap(); + db.memory_file_system().write_file_all(path, &code).unwrap(); File::sync_path(&mut db, path); // this test is only asserting that we can pull every expression type without a panic @@ -152,7 +152,7 @@ fn run_corpus_tests(pattern: &str) -> anyhow::Result<()> { ); } - memory_fs.remove_file(path).unwrap(); + db.memory_file_system().remove_file(path).unwrap(); file.sync(&mut db); }; @@ -174,10 +174,10 @@ fn run_corpus_tests(pattern: &str) -> anyhow::Result<()> { Ok(()) } -fn pull_types(db: &ProjectDatabase, file: File) { +fn pull_types(db: &dyn Db, file: File) { let mut visitor = PullTypesVisitor::new(db, file); - let ast = parsed_module(db, file).load(db); + let ast = parsed_module(db.upcast(), file).load(db.upcast()); visitor.visit_body(ast.suite()); } @@ -187,7 +187,7 @@ struct PullTypesVisitor<'db> { } impl<'db> PullTypesVisitor<'db> { - fn new(db: &'db ProjectDatabase, file: File) -> Self { + fn new(db: &'db dyn Db, file: File) -> Self { Self { model: SemanticModel::new(db, file), } @@ -304,3 +304,97 @@ const KNOWN_FAILURES: &[(&str, bool, bool)] = &[ // type alias, see https://github.com/astral-sh/ty/issues/256 ("crates/ruff_linter/resources/test/fixtures/pyflakes/F401_34.py", true, true), ]; + +#[salsa::db] +#[derive(Clone)] +pub struct CorpusDb { + storage: salsa::Storage, + files: Files, + rule_selection: RuleSelection, + system: TestSystem, + vendored: VendoredFileSystem, +} + +impl CorpusDb { + #[expect(clippy::new_without_default)] + pub fn new() -> Self { + let db = Self { + storage: salsa::Storage::new(None), + system: TestSystem::default(), + vendored: ty_vendored::file_system().clone(), + rule_selection: RuleSelection::from_registry(default_lint_registry()), + files: Files::default(), + }; + + Program::from_settings( + &db, + ProgramSettings { + python_version: Some(PythonVersionWithSource { + version: PythonVersion::latest_ty(), + source: PythonVersionSource::default(), + }), + python_platform: PythonPlatform::default(), + search_paths: SearchPathSettings::new(vec![]), + }, + ) + .unwrap(); + + db + } +} + +impl DbWithTestSystem for CorpusDb { + fn test_system(&self) -> &TestSystem { + &self.system + } + + fn test_system_mut(&mut self) -> &mut TestSystem { + &mut self.system + } +} + +#[salsa::db] +impl ruff_db::Db for CorpusDb { + fn vendored(&self) -> &VendoredFileSystem { + &self.vendored + } + + fn system(&self) -> &dyn System { + &self.system + } + + fn files(&self) -> &Files { + &self.files + } + + fn python_version(&self) -> PythonVersion { + Program::get(self).python_version(self) + } +} + +impl Upcast for CorpusDb { + fn upcast(&self) -> &(dyn ruff_db::Db + 'static) { + self + } + fn upcast_mut(&mut self) -> &mut (dyn ruff_db::Db + 'static) { + self + } +} + +#[salsa::db] +impl ty_python_semantic::Db for CorpusDb { + fn is_file_open(&self, file: File) -> bool { + !file.path(self).is_vendored_path() + } + + fn rule_selection(&self) -> &RuleSelection { + &self.rule_selection + } + + fn lint_registry(&self) -> &LintRegistry { + default_lint_registry() + } +} + +#[salsa::db] +impl salsa::Database for CorpusDb {}