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 e3f2bee commit 2b33075Copy full SHA for 2b33075
stdlib/@tests/test_cases/check_functools.py
@@ -11,6 +11,7 @@
11
# Tests for @wraps
12
#
13
14
+
15
def my_decorator(func: Callable[P, T_co]) -> Callable[P, T_co]:
16
@wraps(func)
17
def wrapper(*args: P.args, **kwargs: P.kwargs) -> T_co:
@@ -56,10 +57,12 @@ def func_wrapper(x: int) -> None: ...
56
57
# Wrapper().method(3)
58
func_wrapper(3)
59
60
61
62
# Tests for @cache
63
64
65
66
@cache
67
def check_cached(x: int) -> int:
68
return x * 2
@@ -77,6 +80,7 @@ def check_cached(x: int) -> int:
77
80
# Tests for @cached_property
78
81
79
82
83
84
class A:
85
def __init__(self, x: int):
86
self.x = x
0 commit comments