We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f515d2c commit 8bb7a25Copy full SHA for 8bb7a25
cadquery/utils.py
@@ -1,17 +1,20 @@
1
from functools import wraps
2
from inspect import signature
3
+from typing import TypeVar, Callable, cast
4
from warnings import warn
5
6
from multimethod import multimethod, DispatchError
7
8
+TCallable = TypeVar("TCallable", bound=Callable)
9
+
10
11
class deprecate_kwarg:
12
def __init__(self, name, new_value):
13
14
self.name = name
15
self.new_value = new_value
16
- def __call__(self, f):
17
+ def __call__(self, f: TCallable) -> TCallable:
18
@wraps(f)
19
def wrapped(*args, **kwargs):
20
@@ -25,7 +28,7 @@ def wrapped(*args, **kwargs):
25
28
26
29
return f(*args, **kwargs)
27
30
- return wrapped
31
+ return cast(TCallable, wrapped)
32
33
34
class deprecate:
0 commit comments