From 0ebfa2b258b60d70f733bebe3aad835df0e88913 Mon Sep 17 00:00:00 2001 From: Riley Flynn Date: Sun, 29 Dec 2024 16:47:31 -0330 Subject: [PATCH] Add TypeVar to deprecate_kwarg_name to preserve type information (#1733) Co-authored-by: Herbert Rusznak --- cadquery/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cadquery/utils.py b/cadquery/utils.py index efa9e494f..c473db677 100644 --- a/cadquery/utils.py +++ b/cadquery/utils.py @@ -58,7 +58,7 @@ def __init__(self, name, new_name): self.name = name self.new_name = new_name - def __call__(self, f): + def __call__(self, f: TCallable) -> TCallable: @wraps(f) def wrapped(*args, **kwargs): @@ -70,7 +70,7 @@ def wrapped(*args, **kwargs): return f(*args, **kwargs) - return wrapped + return cast(TCallable, wrapped) def get_arity(f: TCallable) -> int: