File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ template = "changelog/_template.rst"
117
117
118
118
[tool .mypy ]
119
119
mypy_path = " src"
120
+ python =" 3.9"
120
121
check_untyped_defs = true
121
122
# Hopefully we can set this someday!
122
123
# disallow_any_expr = true
Original file line number Diff line number Diff line change 38
38
39
39
_T_HookImpl = TypeVar ("_T_HookImpl" , bound = "HookImpl" )
40
40
41
+
41
42
# Type alias for completion hook functions
42
- CompletionHook = Callable [
43
- [object | list [object ] | None , BaseException | None ],
44
- tuple [object | list [object ] | None , BaseException | None ],
45
- ]
43
+ class CompletionHook (Protocol ):
44
+ """completion hooks are used to express the teardown of hookwrappers
45
+ as python has no builtin way to change the result using a
46
+ """
47
+
48
+ def __call__ (
49
+ self , result : object | list [object ] | None , exception : BaseException | None
50
+ ) -> tuple [object | list [object ] | None , BaseException | None ]: ...
46
51
47
52
48
53
def _insert_hookimpl_into_list (
You can’t perform that action at this time.
0 commit comments