diff --git a/reacton/utils.py b/reacton/utils.py index f11c0d3..a66b6c4 100644 --- a/reacton/utils.py +++ b/reacton/utils.py @@ -19,7 +19,7 @@ def without_default(func: Callable, kwargs): return non_default_kwargs -def implements(f: Callable[P, T]): +def implements(f: Callable[P, T]) -> Callable[[Callable], Callable[P, T]]: def caster(fimpl: Callable) -> Callable[P, T]: # wraps gives us the right signature at runtime (such as Jupyter) return cast(Callable[P, T], functools.wraps(f)(fimpl)) diff --git a/reacton/utils_test.py b/reacton/utils_test.py index 646d0dd..d3bfd74 100644 --- a/reacton/utils_test.py +++ b/reacton/utils_test.py @@ -118,7 +118,7 @@ def make_el(a): def on_click(): pass - return w.Button(on_click=on_click, label=f"{a}") + return w.Button(on_click=on_click, description=f"{a}") el1 = make_el(1) el2 = make_el(1)