From 9ac76af05ae58e874dbed34fe45d630afc84a626 Mon Sep 17 00:00:00 2001 From: Mark Koch <48097969+mark-koch@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:20:15 +0100 Subject: [PATCH] chore: Remove old decorator used in tests (#73) It's no longer needed since the regular decorator can do the same job --- tests/error/errors_on_usage/and_not_defined.py | 2 +- tests/error/errors_on_usage/else_expr_not_defined.py | 2 +- tests/error/errors_on_usage/else_expr_type_change.py | 2 +- tests/error/errors_on_usage/else_not_defined.py | 2 +- .../error/errors_on_usage/else_not_defined_functional.py | 2 +- tests/error/errors_on_usage/else_type_change.py | 2 +- .../error/errors_on_usage/else_type_change_functional.py | 2 +- tests/error/errors_on_usage/if_different_types.py | 2 +- .../errors_on_usage/if_different_types_functional.py | 2 +- tests/error/errors_on_usage/if_expr_cond_type_change.py | 2 +- tests/error/errors_on_usage/if_expr_not_defined.py | 2 +- tests/error/errors_on_usage/if_expr_type_change.py | 2 +- tests/error/errors_on_usage/if_expr_type_conflict.py | 2 +- tests/error/errors_on_usage/if_not_defined.py | 2 +- tests/error/errors_on_usage/if_not_defined_functional.py | 2 +- tests/error/errors_on_usage/if_type_change.py | 2 +- tests/error/errors_on_usage/if_type_change_functional.py | 2 +- tests/error/errors_on_usage/or_not_defined.py | 2 +- tests/error/errors_on_usage/while_new_var.py | 2 +- tests/error/errors_on_usage/while_new_var_functional.py | 2 +- tests/error/errors_on_usage/while_type_change.py | 2 +- .../error/errors_on_usage/while_type_change_functional.py | 2 +- tests/error/misc_errors/arg_not_annotated.py | 2 +- tests/error/misc_errors/functional_break.py | 2 +- tests/error/misc_errors/functional_continue.py | 2 +- tests/error/misc_errors/functional_return.py | 2 +- tests/error/misc_errors/nested_functional.py | 2 +- tests/error/misc_errors/no_return.py | 2 +- tests/error/misc_errors/return_not_annotated.py | 2 +- tests/error/misc_errors/return_not_annotated_none1.py | 2 +- tests/error/misc_errors/return_not_annotated_none2.py | 2 +- tests/error/misc_errors/undefined_var.py | 2 +- tests/error/misc_errors/unreachable_1.py | 2 +- tests/error/misc_errors/unreachable_2.py | 2 +- tests/error/misc_errors/unreachable_3.py | 2 +- tests/error/misc_errors/unreachable_4.py | 2 +- tests/error/misc_errors/unreachable_5.py | 2 +- tests/error/nested_errors/different_types_if.py | 2 +- tests/error/nested_errors/not_defined_if.py | 2 +- tests/error/nested_errors/reassign_capture_1.py | 2 +- tests/error/nested_errors/reassign_capture_2.py | 2 +- tests/error/nested_errors/reassign_capture_3.py | 2 +- tests/error/nested_errors/var_not_defined.py | 2 +- tests/error/type_errors/binary_not_arith_left.py | 2 +- tests/error/type_errors/binary_not_arith_right.py | 2 +- tests/error/type_errors/call_missing_arg.py | 2 +- tests/error/type_errors/call_not_function.py | 2 +- tests/error/type_errors/call_unexpected_arg.py | 2 +- tests/error/type_errors/call_wrong_arg.py | 2 +- tests/error/type_errors/fun_ty_mismatch_1.py | 2 +- tests/error/type_errors/fun_ty_mismatch_2.py | 2 +- tests/error/type_errors/fun_ty_mismatch_3.py | 2 +- tests/error/type_errors/if_not_bool_functional.py | 2 +- tests/error/type_errors/invert_not_int.py | 2 +- tests/error/type_errors/return_mismatch.py | 2 +- tests/error/type_errors/unary_not_arith.py | 2 +- tests/error/type_errors/unpack_not_enough.py | 2 +- tests/error/type_errors/unpack_too_many.py | 2 +- tests/error/type_errors/while_not_bool_functional.py | 2 +- tests/error/util.py | 8 -------- 60 files changed, 59 insertions(+), 67 deletions(-) diff --git a/tests/error/errors_on_usage/and_not_defined.py b/tests/error/errors_on_usage/and_not_defined.py index 35411e4b..0f29fa58 100644 --- a/tests/error/errors_on_usage/and_not_defined.py +++ b/tests/error/errors_on_usage/and_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_expr_not_defined.py b/tests/error/errors_on_usage/else_expr_not_defined.py index a21d1100..04aec300 100644 --- a/tests/error/errors_on_usage/else_expr_not_defined.py +++ b/tests/error/errors_on_usage/else_expr_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_expr_type_change.py b/tests/error/errors_on_usage/else_expr_type_change.py index 6580f9b2..0f77ff1e 100644 --- a/tests/error/errors_on_usage/else_expr_type_change.py +++ b/tests/error/errors_on_usage/else_expr_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_not_defined.py b/tests/error/errors_on_usage/else_not_defined.py index 94c13b87..a86d6cec 100644 --- a/tests/error/errors_on_usage/else_not_defined.py +++ b/tests/error/errors_on_usage/else_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_not_defined_functional.py b/tests/error/errors_on_usage/else_not_defined_functional.py index c1c19baa..eac88f1b 100644 --- a/tests/error/errors_on_usage/else_not_defined_functional.py +++ b/tests/error/errors_on_usage/else_not_defined_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_type_change.py b/tests/error/errors_on_usage/else_type_change.py index a195b439..ac3638a5 100644 --- a/tests/error/errors_on_usage/else_type_change.py +++ b/tests/error/errors_on_usage/else_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/else_type_change_functional.py b/tests/error/errors_on_usage/else_type_change_functional.py index 56de562c..34a7a61d 100644 --- a/tests/error/errors_on_usage/else_type_change_functional.py +++ b/tests/error/errors_on_usage/else_type_change_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_different_types.py b/tests/error/errors_on_usage/if_different_types.py index 143056a6..5a871696 100644 --- a/tests/error/errors_on_usage/if_different_types.py +++ b/tests/error/errors_on_usage/if_different_types.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_different_types_functional.py b/tests/error/errors_on_usage/if_different_types_functional.py index 1876ff30..efe65c51 100644 --- a/tests/error/errors_on_usage/if_different_types_functional.py +++ b/tests/error/errors_on_usage/if_different_types_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_expr_cond_type_change.py b/tests/error/errors_on_usage/if_expr_cond_type_change.py index d108fb78..46af4085 100644 --- a/tests/error/errors_on_usage/if_expr_cond_type_change.py +++ b/tests/error/errors_on_usage/if_expr_cond_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_expr_not_defined.py b/tests/error/errors_on_usage/if_expr_not_defined.py index e9de6f72..b8b7f21f 100644 --- a/tests/error/errors_on_usage/if_expr_not_defined.py +++ b/tests/error/errors_on_usage/if_expr_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_expr_type_change.py b/tests/error/errors_on_usage/if_expr_type_change.py index 8ceedfaa..96e57658 100644 --- a/tests/error/errors_on_usage/if_expr_type_change.py +++ b/tests/error/errors_on_usage/if_expr_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_expr_type_conflict.py b/tests/error/errors_on_usage/if_expr_type_conflict.py index e4d2a796..f2e921da 100644 --- a/tests/error/errors_on_usage/if_expr_type_conflict.py +++ b/tests/error/errors_on_usage/if_expr_type_conflict.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_not_defined.py b/tests/error/errors_on_usage/if_not_defined.py index 6e7493fe..f613e168 100644 --- a/tests/error/errors_on_usage/if_not_defined.py +++ b/tests/error/errors_on_usage/if_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_not_defined_functional.py b/tests/error/errors_on_usage/if_not_defined_functional.py index fdf868c4..47aff403 100644 --- a/tests/error/errors_on_usage/if_not_defined_functional.py +++ b/tests/error/errors_on_usage/if_not_defined_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_type_change.py b/tests/error/errors_on_usage/if_type_change.py index 554338b0..1e688b5b 100644 --- a/tests/error/errors_on_usage/if_type_change.py +++ b/tests/error/errors_on_usage/if_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/if_type_change_functional.py b/tests/error/errors_on_usage/if_type_change_functional.py index 0715149c..58ed7baa 100644 --- a/tests/error/errors_on_usage/if_type_change_functional.py +++ b/tests/error/errors_on_usage/if_type_change_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/or_not_defined.py b/tests/error/errors_on_usage/or_not_defined.py index 18bc9829..2435f624 100644 --- a/tests/error/errors_on_usage/or_not_defined.py +++ b/tests/error/errors_on_usage/or_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/while_new_var.py b/tests/error/errors_on_usage/while_new_var.py index 5d5f1001..28a63a58 100644 --- a/tests/error/errors_on_usage/while_new_var.py +++ b/tests/error/errors_on_usage/while_new_var.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/while_new_var_functional.py b/tests/error/errors_on_usage/while_new_var_functional.py index 2b40b8e6..d596834c 100644 --- a/tests/error/errors_on_usage/while_new_var_functional.py +++ b/tests/error/errors_on_usage/while_new_var_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/while_type_change.py b/tests/error/errors_on_usage/while_type_change.py index a293a069..c8e565b1 100644 --- a/tests/error/errors_on_usage/while_type_change.py +++ b/tests/error/errors_on_usage/while_type_change.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/errors_on_usage/while_type_change_functional.py b/tests/error/errors_on_usage/while_type_change_functional.py index b56035c4..343e4433 100644 --- a/tests/error/errors_on_usage/while_type_change_functional.py +++ b/tests/error/errors_on_usage/while_type_change_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/arg_not_annotated.py b/tests/error/misc_errors/arg_not_annotated.py index 55d1ddd1..503393af 100644 --- a/tests/error/misc_errors/arg_not_annotated.py +++ b/tests/error/misc_errors/arg_not_annotated.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/functional_break.py b/tests/error/misc_errors/functional_break.py index a70202b3..2b03e316 100644 --- a/tests/error/misc_errors/functional_break.py +++ b/tests/error/misc_errors/functional_break.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/functional_continue.py b/tests/error/misc_errors/functional_continue.py index e5ab5d25..eced5d96 100644 --- a/tests/error/misc_errors/functional_continue.py +++ b/tests/error/misc_errors/functional_continue.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/functional_return.py b/tests/error/misc_errors/functional_return.py index f6b3e769..1821020e 100644 --- a/tests/error/misc_errors/functional_return.py +++ b/tests/error/misc_errors/functional_return.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/nested_functional.py b/tests/error/misc_errors/nested_functional.py index 03f4b767..7094903c 100644 --- a/tests/error/misc_errors/nested_functional.py +++ b/tests/error/misc_errors/nested_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/no_return.py b/tests/error/misc_errors/no_return.py index 3d80b79a..3f70926a 100644 --- a/tests/error/misc_errors/no_return.py +++ b/tests/error/misc_errors/no_return.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/return_not_annotated.py b/tests/error/misc_errors/return_not_annotated.py index fa3b25bf..43ce1a8c 100644 --- a/tests/error/misc_errors/return_not_annotated.py +++ b/tests/error/misc_errors/return_not_annotated.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/return_not_annotated_none1.py b/tests/error/misc_errors/return_not_annotated_none1.py index d5245943..b85e6de1 100644 --- a/tests/error/misc_errors/return_not_annotated_none1.py +++ b/tests/error/misc_errors/return_not_annotated_none1.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/return_not_annotated_none2.py b/tests/error/misc_errors/return_not_annotated_none2.py index de5ce459..ffd09c8c 100644 --- a/tests/error/misc_errors/return_not_annotated_none2.py +++ b/tests/error/misc_errors/return_not_annotated_none2.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/undefined_var.py b/tests/error/misc_errors/undefined_var.py index 0150b267..6ff8e942 100644 --- a/tests/error/misc_errors/undefined_var.py +++ b/tests/error/misc_errors/undefined_var.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/unreachable_1.py b/tests/error/misc_errors/unreachable_1.py index 489b1814..bf4948e5 100644 --- a/tests/error/misc_errors/unreachable_1.py +++ b/tests/error/misc_errors/unreachable_1.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/unreachable_2.py b/tests/error/misc_errors/unreachable_2.py index fa571030..1a9722fd 100644 --- a/tests/error/misc_errors/unreachable_2.py +++ b/tests/error/misc_errors/unreachable_2.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/unreachable_3.py b/tests/error/misc_errors/unreachable_3.py index 47d49353..9bf3265e 100644 --- a/tests/error/misc_errors/unreachable_3.py +++ b/tests/error/misc_errors/unreachable_3.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/unreachable_4.py b/tests/error/misc_errors/unreachable_4.py index dd42a92d..076c4e68 100644 --- a/tests/error/misc_errors/unreachable_4.py +++ b/tests/error/misc_errors/unreachable_4.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/misc_errors/unreachable_5.py b/tests/error/misc_errors/unreachable_5.py index ab6b709a..ba3e5740 100644 --- a/tests/error/misc_errors/unreachable_5.py +++ b/tests/error/misc_errors/unreachable_5.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/different_types_if.py b/tests/error/nested_errors/different_types_if.py index 2eebce38..7641d715 100644 --- a/tests/error/nested_errors/different_types_if.py +++ b/tests/error/nested_errors/different_types_if.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/not_defined_if.py b/tests/error/nested_errors/not_defined_if.py index 8798212d..40b0833d 100644 --- a/tests/error/nested_errors/not_defined_if.py +++ b/tests/error/nested_errors/not_defined_if.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/reassign_capture_1.py b/tests/error/nested_errors/reassign_capture_1.py index bf8da199..33151d92 100644 --- a/tests/error/nested_errors/reassign_capture_1.py +++ b/tests/error/nested_errors/reassign_capture_1.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/reassign_capture_2.py b/tests/error/nested_errors/reassign_capture_2.py index 7317bdf5..83769889 100644 --- a/tests/error/nested_errors/reassign_capture_2.py +++ b/tests/error/nested_errors/reassign_capture_2.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/reassign_capture_3.py b/tests/error/nested_errors/reassign_capture_3.py index 4648f379..b26fdd89 100644 --- a/tests/error/nested_errors/reassign_capture_3.py +++ b/tests/error/nested_errors/reassign_capture_3.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/nested_errors/var_not_defined.py b/tests/error/nested_errors/var_not_defined.py index d18b305e..8d7abb7e 100644 --- a/tests/error/nested_errors/var_not_defined.py +++ b/tests/error/nested_errors/var_not_defined.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/binary_not_arith_left.py b/tests/error/type_errors/binary_not_arith_left.py index e11e4d36..fd79799c 100644 --- a/tests/error/type_errors/binary_not_arith_left.py +++ b/tests/error/type_errors/binary_not_arith_left.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/binary_not_arith_right.py b/tests/error/type_errors/binary_not_arith_right.py index 7ed69717..8240774c 100644 --- a/tests/error/type_errors/binary_not_arith_right.py +++ b/tests/error/type_errors/binary_not_arith_right.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/call_missing_arg.py b/tests/error/type_errors/call_missing_arg.py index 9b93062b..26160fbd 100644 --- a/tests/error/type_errors/call_missing_arg.py +++ b/tests/error/type_errors/call_missing_arg.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/call_not_function.py b/tests/error/type_errors/call_not_function.py index ac1875fa..0dde7dc9 100644 --- a/tests/error/type_errors/call_not_function.py +++ b/tests/error/type_errors/call_not_function.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/call_unexpected_arg.py b/tests/error/type_errors/call_unexpected_arg.py index 82b43478..0d1f7975 100644 --- a/tests/error/type_errors/call_unexpected_arg.py +++ b/tests/error/type_errors/call_unexpected_arg.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/call_wrong_arg.py b/tests/error/type_errors/call_wrong_arg.py index e9e1290f..78d37c70 100644 --- a/tests/error/type_errors/call_wrong_arg.py +++ b/tests/error/type_errors/call_wrong_arg.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/fun_ty_mismatch_1.py b/tests/error/type_errors/fun_ty_mismatch_1.py index 159825b6..69ba1cfc 100644 --- a/tests/error/type_errors/fun_ty_mismatch_1.py +++ b/tests/error/type_errors/fun_ty_mismatch_1.py @@ -1,6 +1,6 @@ from collections.abc import Callable -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/fun_ty_mismatch_2.py b/tests/error/type_errors/fun_ty_mismatch_2.py index 8d98dc01..602c00f6 100644 --- a/tests/error/type_errors/fun_ty_mismatch_2.py +++ b/tests/error/type_errors/fun_ty_mismatch_2.py @@ -1,6 +1,6 @@ from collections.abc import Callable -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/fun_ty_mismatch_3.py b/tests/error/type_errors/fun_ty_mismatch_3.py index bbb4f428..bfe5b742 100644 --- a/tests/error/type_errors/fun_ty_mismatch_3.py +++ b/tests/error/type_errors/fun_ty_mismatch_3.py @@ -1,6 +1,6 @@ from collections.abc import Callable -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/if_not_bool_functional.py b/tests/error/type_errors/if_not_bool_functional.py index 24b08ac3..09ecd285 100644 --- a/tests/error/type_errors/if_not_bool_functional.py +++ b/tests/error/type_errors/if_not_bool_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/invert_not_int.py b/tests/error/type_errors/invert_not_int.py index 46569370..c18fd4e1 100644 --- a/tests/error/type_errors/invert_not_int.py +++ b/tests/error/type_errors/invert_not_int.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/return_mismatch.py b/tests/error/type_errors/return_mismatch.py index 0b574f33..ca2fd8b5 100644 --- a/tests/error/type_errors/return_mismatch.py +++ b/tests/error/type_errors/return_mismatch.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/unary_not_arith.py b/tests/error/type_errors/unary_not_arith.py index 0f6d06c7..81134390 100644 --- a/tests/error/type_errors/unary_not_arith.py +++ b/tests/error/type_errors/unary_not_arith.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/unpack_not_enough.py b/tests/error/type_errors/unpack_not_enough.py index 5b25fae4..c022b692 100644 --- a/tests/error/type_errors/unpack_not_enough.py +++ b/tests/error/type_errors/unpack_not_enough.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/unpack_too_many.py b/tests/error/type_errors/unpack_too_many.py index 9b809f14..71946970 100644 --- a/tests/error/type_errors/unpack_too_many.py +++ b/tests/error/type_errors/unpack_too_many.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/type_errors/while_not_bool_functional.py b/tests/error/type_errors/while_not_bool_functional.py index 4730bba8..53c53bf1 100644 --- a/tests/error/type_errors/while_not_bool_functional.py +++ b/tests/error/type_errors/while_not_bool_functional.py @@ -1,4 +1,4 @@ -from tests.error.util import guppy +from guppy.decorator import guppy @guppy diff --git a/tests/error/util.py b/tests/error/util.py index c7d207d8..0f452c08 100644 --- a/tests/error/util.py +++ b/tests/error/util.py @@ -8,18 +8,10 @@ from guppy.hugr import tys from guppy.hugr.tys import TypeBound from guppy.module import GuppyModule -from guppy.hugr.hugr import Hugr import guppy.decorator as decorator -def guppy(f: Callable[..., Any]) -> Hugr | None: - """Decorator to compile functions outside of modules for testing.""" - module = GuppyModule("module") - module.register_func_def(f) - return module.compile() - - def run_error_test(file, capsys): file = pathlib.Path(file) spec = importlib.util.spec_from_file_location("test_module", file)