reykit 1.1.61__py3-none-any.whl → 1.1.62__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reykit/rbase.py +1 -1
- reykit/rwrap.py +12 -13
- {reykit-1.1.61.dist-info → reykit-1.1.62.dist-info}/METADATA +1 -1
- {reykit-1.1.61.dist-info → reykit-1.1.62.dist-info}/RECORD +6 -6
- {reykit-1.1.61.dist-info → reykit-1.1.62.dist-info}/WHEEL +0 -0
- {reykit-1.1.61.dist-info → reykit-1.1.62.dist-info}/licenses/LICENSE +0 -0
reykit/rbase.py
CHANGED
reykit/rwrap.py
CHANGED
@@ -42,7 +42,7 @@ type Decorated = Callable
|
|
42
42
|
type Decorator = Callable[..., Decorated]
|
43
43
|
|
44
44
|
|
45
|
-
def wrap_wrap(decorator: Decorator) -> Decorator:
|
45
|
+
def wrap_wrap(decorator: Decorator | None = None) -> Decorator:
|
46
46
|
"""
|
47
47
|
Decorate decorator.
|
48
48
|
|
@@ -102,8 +102,13 @@ def wrap_wrap(decorator: Decorator) -> Decorator:
|
|
102
102
|
Decorated function or decorated self.
|
103
103
|
"""
|
104
104
|
|
105
|
-
#
|
106
|
-
if func is
|
105
|
+
# Has decorator parameter.
|
106
|
+
if func is None:
|
107
|
+
__wrap = functools_partial(_wrap, **wrap_kwargs)
|
108
|
+
return __wrap
|
109
|
+
|
110
|
+
# No decorator parameter.
|
111
|
+
else:
|
107
112
|
|
108
113
|
|
109
114
|
@functools_wraps(func)
|
@@ -121,7 +126,7 @@ def wrap_wrap(decorator: Decorator) -> Decorator:
|
|
121
126
|
Function return.
|
122
127
|
"""
|
123
128
|
|
124
|
-
#
|
129
|
+
# Excute.
|
125
130
|
result = decorator(func, args, kwargs, **wrap_kwargs)
|
126
131
|
|
127
132
|
return result
|
@@ -130,12 +135,6 @@ def wrap_wrap(decorator: Decorator) -> Decorator:
|
|
130
135
|
return _func
|
131
136
|
|
132
137
|
|
133
|
-
# Method two and four.
|
134
|
-
else:
|
135
|
-
__wrap = functools_partial(_wrap, **wrap_kwargs)
|
136
|
-
return __wrap
|
137
|
-
|
138
|
-
|
139
138
|
return _wrap
|
140
139
|
|
141
140
|
|
@@ -323,7 +322,7 @@ def wrap_exc(
|
|
323
322
|
def wrap_retry(
|
324
323
|
func: Callable[..., T],
|
325
324
|
total: int = 1,
|
326
|
-
handler: Callable[[tuple[str,
|
325
|
+
handler: Callable[[tuple[str, BaseException, StackSummary]], Any] | None = None,
|
327
326
|
exception: BaseException | tuple[BaseException, ...] = BaseException
|
328
327
|
) -> Callable[..., T]: ...
|
329
328
|
|
@@ -331,7 +330,7 @@ def wrap_retry(
|
|
331
330
|
def wrap_retry(
|
332
331
|
*,
|
333
332
|
total: int = 1,
|
334
|
-
handler: Callable[[tuple[str,
|
333
|
+
handler: Callable[[tuple[str, BaseException, StackSummary]], Any] | None = None,
|
335
334
|
exception: BaseException | tuple[BaseException, ...] = BaseException
|
336
335
|
) -> Callable[[Callable[..., T]], T]: ...
|
337
336
|
|
@@ -341,7 +340,7 @@ def wrap_retry(
|
|
341
340
|
args: Any,
|
342
341
|
kwargs: Any,
|
343
342
|
total: int = 2,
|
344
|
-
handler: Callable[[tuple[str,
|
343
|
+
handler: Callable[[tuple[str, BaseException, StackSummary]], Any] | None = None,
|
345
344
|
exception: BaseException | tuple[BaseException, ...] = BaseException
|
346
345
|
) -> T:
|
347
346
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
reykit/__init__.py,sha256=V86CHqPAAVkooVx3_QIOKpDIFVneQCTTSwfJ-uWgBno,788
|
2
2
|
reykit/rall.py,sha256=7Hip02YOkIDm3_xkoSDjvvYV2LhdBV2r4UKzWWnIfIo,628
|
3
|
-
reykit/rbase.py,sha256=
|
3
|
+
reykit/rbase.py,sha256=tMLDwFACHQN9SDK-1dsGIAXZGw6FSnKf_5-aZUFCFpg,21698
|
4
4
|
reykit/rdata.py,sha256=NmOY_h4w2PY5xBbYNmOnb55w7PGsvvCzOBnxPjQ08qw,10293
|
5
5
|
reykit/remail.py,sha256=l4HGKXdfHNBxyBT3YxeZyQhfecbElqTqSAGInwWhap8,6723
|
6
6
|
reykit/rimage.py,sha256=lNN2iMpvSMqh-nPTpxrA9yHy43EA5WoYdxKYhqPwMgk,6154
|
@@ -18,11 +18,11 @@ reykit/rtable.py,sha256=YuDH2GL9Lwr5LljRDm5hzHrsvaXOs4-X89XVwFD-b0g,12221
|
|
18
18
|
reykit/rtask.py,sha256=NUTngUUDUZy3TqEHiuiKy17FcE0F1zS118KnKTsBjng,22838
|
19
19
|
reykit/rtext.py,sha256=cWHy19lDcJvpX7LU95kmRVsDimpAUaz5TbKC1h83gB4,13254
|
20
20
|
reykit/rtime.py,sha256=8QJ6YNiC0JUDiW1xc1tkzQUMPYOFT7d7dKCYRuYt9co,17635
|
21
|
-
reykit/rwrap.py,sha256=
|
21
|
+
reykit/rwrap.py,sha256=FEmeK_fboJ-OyXeJf8bilc7U2ph8xIbZGNHb6fLCy2c,15063
|
22
22
|
reykit/rzip.py,sha256=BGEONswuBZxQ-zcgd_xp2fcvYesC9AmKaaXWvnT3bTI,3456
|
23
23
|
reykit/rdll/__init__.py,sha256=nLSb8onBm2ilyoxzpDzUeGfSCKwkLEesIhzK3LiJ8mk,701
|
24
24
|
reykit/rdll/rdll_core.py,sha256=o6-rKcTQgxZQe0kD3GnwyNb3KL9IogzgCQNOmYLMm7A,5086
|
25
|
-
reykit-1.1.
|
26
|
-
reykit-1.1.
|
27
|
-
reykit-1.1.
|
28
|
-
reykit-1.1.
|
25
|
+
reykit-1.1.62.dist-info/METADATA,sha256=s4p04lHvez_YiMGAV6x3pttHztluRZcZ86SbzxcjATg,1872
|
26
|
+
reykit-1.1.62.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
27
|
+
reykit-1.1.62.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
28
|
+
reykit-1.1.62.dist-info/RECORD,,
|
File without changes
|
File without changes
|