@@ -607,6 +607,8 @@ def __repr__(self) -> str:
607
607
608
608
609
609
class HookImpl :
610
+ """A hook implementation in a :class:`HookCaller`."""
611
+
610
612
__slots__ = (
611
613
"function" ,
612
614
"argnames" ,
@@ -628,15 +630,33 @@ def __init__(
628
630
function : _HookImplFunction [object ],
629
631
hook_impl_opts : HookimplOpts ,
630
632
) -> None :
633
+ """:meta private:"""
634
+ #: The hook implementation function.
631
635
self .function : Final = function
632
- self .argnames , self .kwargnames = varnames (self .function )
636
+ argnames , kwargnames = varnames (self .function )
637
+ #: The positional parameter names of ``function```.
638
+ self .argnames = argnames
639
+ #: The keyword parameter names of ``function```.
640
+ self .kwargnames = kwargnames
641
+ #: The plugin which defined this hook implementation.
633
642
self .plugin = plugin
643
+ #: The :class:`HookimplOpts` used to configure this hook implementation.
634
644
self .opts = hook_impl_opts
645
+ #: The name of the plugin which defined this hook implementation.
635
646
self .plugin_name = plugin_name
647
+ #: Whether the hook implementation is a :ref:`wrapper <hookwrapper>`.
636
648
self .wrapper = hook_impl_opts ["wrapper" ]
649
+ #: Whether the hook implementation is an :ref:`old-style wrapper
650
+ #: <old_style_hookwrappers>`.
637
651
self .hookwrapper = hook_impl_opts ["hookwrapper" ]
652
+ #: Whether validation against a hook specification is :ref:`optional
653
+ #: <optionalhook>`.
638
654
self .optionalhook = hook_impl_opts ["optionalhook" ]
655
+ #: Whether to try to order this hook implementation :ref:`first
656
+ #: <callorder>`.
639
657
self .tryfirst = hook_impl_opts ["tryfirst" ]
658
+ #: Whether to try to order this hook implementation :ref:`last
659
+ #: <callorder>`.
640
660
self .trylast = hook_impl_opts ["trylast" ]
641
661
642
662
def __repr__ (self ) -> str :
0 commit comments