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"
117117
118118[tool .mypy ]
119119mypy_path = " src"
120+ python =" 3.9"
120121check_untyped_defs = true
121122# Hopefully we can set this someday!
122123# disallow_any_expr = true
Original file line number Diff line number Diff line change 3838
3939_T_HookImpl = TypeVar ("_T_HookImpl" , bound = "HookImpl" )
4040
41+
4142# 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 ]: ...
4651
4752
4853def _insert_hookimpl_into_list (
You can’t perform that action at this time.
0 commit comments