Skip to content

Commit

Permalink
Add TypeVar to deprecate_kwarg_name to preserve type information (#1733)
Browse files Browse the repository at this point in the history
Co-authored-by: Herbert Rusznak <[email protected]>
  • Loading branch information
nint8835 and thelittlebug authored Dec 29, 2024
1 parent 29fbe38 commit 0ebfa2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cadquery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

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

return f(*args, **kwargs)

return wrapped
return cast(TCallable, wrapped)


def get_arity(f: TCallable) -> int:
Expand Down

0 comments on commit 0ebfa2b

Please sign in to comment.