From f2aa686aa8b62fa658a3b3c59aa819fa84726059 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Tue, 1 Jun 2021 11:20:00 +0200 Subject: [PATCH] fixed typechecked() --- scilog/snippet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scilog/snippet.py b/scilog/snippet.py index 8aa4df2..906b4b6 100644 --- a/scilog/snippet.py +++ b/scilog/snippet.py @@ -8,7 +8,7 @@ def typechecked(func): def typechecked_call(obj, *args, **kwargs): type_hints = get_type_hints(func) del type_hints["return"] - for arg, dtype in zip(args, type_hints): + for arg, dtype in zip(args, type_hints.values()): arg_type = type(arg) if dtype != arg_type: raise TypeError(f"{func} expected to receive input of type {dtype.__name__} but received {arg_type.__name__}")