3535
3636 from ._result import Result
3737
38-
3938 _T = TypeVar ("_T" )
4039 _F = TypeVar ("_F" , bound = Callable [..., object ])
4140 _Namespace = Union [ModuleType , type ]
4645 _HookImplFunction = Callable [..., Union [_T , Generator [None , Result [_T ], None ]]]
4746 _CallHistory = List [Tuple [Mapping [str , object ], Optional [Callable [[Any ], None ]]]]
4847
49-
5048 class HookspecOpts (TypedDict ):
5149 """Options for a hook specification."""
5250
@@ -62,7 +60,6 @@ class HookspecOpts(TypedDict):
6260 #: .. versionadded:: 1.5
6361 warn_on_impl_args : Mapping [str , Warning ] | None
6462
65-
6663 class HookimplOpts (TypedDict ):
6764 """Options for a hook implementation."""
6865
@@ -84,11 +81,11 @@ class HookimplOpts(TypedDict):
8481 specname : str | None
8582
8683else :
84+
8785 def final (func : _F ) -> _F :
8886 return func
89- overload = final
90-
9187
88+ overload = final
9289
9390
9491@final
@@ -388,6 +385,7 @@ def __init__(self) -> None:
388385
389386 def __getattr__ (self , name : str ) -> HookCaller : ...
390387
388+ _CallHistory = List [Tuple [Mapping [str , object ], Optional [Callable [[Any ], None ]]]]
391389
392390# Historical name (pluggy<=1.2), kept for backward compatibility.
393391_HookRelay = HookRelay
0 commit comments