Skip to content

Commit 0ebfa2b

Browse files
Add TypeVar to deprecate_kwarg_name to preserve type information (#1733)
Co-authored-by: Herbert Rusznak <[email protected]>
1 parent 29fbe38 commit 0ebfa2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cadquery/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, name, new_name):
5858
self.name = name
5959
self.new_name = new_name
6060

61-
def __call__(self, f):
61+
def __call__(self, f: TCallable) -> TCallable:
6262
@wraps(f)
6363
def wrapped(*args, **kwargs):
6464

@@ -70,7 +70,7 @@ def wrapped(*args, **kwargs):
7070

7171
return f(*args, **kwargs)
7272

73-
return wrapped
73+
return cast(TCallable, wrapped)
7474

7575

7676
def get_arity(f: TCallable) -> int:

0 commit comments

Comments
 (0)