@@ -99,8 +99,8 @@ def __call__(
9999 warn_on_impl_args : Mapping [str , Warning ] | None = None ,
100100 ) -> _F : ...
101101
102- @overload # noqa: F811
103- def __call__ ( # noqa: F811
102+ @overload
103+ def __call__ (
104104 self ,
105105 function : None = ...,
106106 firstresult : bool = ...,
@@ -109,7 +109,7 @@ def __call__( # noqa: F811
109109 warn_on_impl_args : Mapping [str , Warning ] | None = ...,
110110 ) -> Callable [[_F ], _F ]: ...
111111
112- def __call__ ( # noqa: F811
112+ def __call__ (
113113 self ,
114114 function : _F | None = None ,
115115 firstresult : bool = False ,
@@ -188,8 +188,8 @@ def __call__(
188188 wrapper : bool = ...,
189189 ) -> _F : ...
190190
191- @overload # noqa: F811
192- def __call__ ( # noqa: F811
191+ @overload
192+ def __call__ (
193193 self ,
194194 function : None = ...,
195195 hookwrapper : bool = ...,
@@ -200,7 +200,7 @@ def __call__( # noqa: F811
200200 wrapper : bool = ...,
201201 ) -> Callable [[_F ], _F ]: ...
202202
203- def __call__ ( # noqa: F811
203+ def __call__ (
204204 self ,
205205 function : _F | None = None ,
206206 hookwrapper : bool = False ,
@@ -366,9 +366,7 @@ def varnames(
366366 _tail = qualname .rsplit ("<locals>." , maxsplit = 1 )[- 1 ]
367367 _is_class_method = "." in _tail
368368 if args :
369- if is_bound :
370- args = args [1 :]
371- elif _is_class_method and args [0 ] in _IMPLICIT_NAMES :
369+ if is_bound or _is_class_method and args [0 ] in _IMPLICIT_NAMES :
372370 args = args [1 :]
373371 elif _is_class_method and legacy_noself :
374372 if _tail not in _NOSELF_WARN_SUPPRESS :
@@ -412,11 +410,11 @@ class HookCaller:
412410 """A caller of all registered implementations of a hook specification."""
413411
414412 __slots__ = (
415- "name" ,
416- "spec" ,
413+ "_call_history" ,
417414 "_hookexec" ,
418415 "_hookimpls" ,
419- "_call_history" ,
416+ "name" ,
417+ "spec" ,
420418 )
421419
422420 def __init__ (
@@ -669,17 +667,17 @@ class HookImpl:
669667 """A hook implementation in a :class:`HookCaller`."""
670668
671669 __slots__ = (
672- "function" ,
673670 "argnames" ,
671+ "function" ,
672+ "hookwrapper" ,
674673 "kwargnames" ,
675- "plugin " ,
674+ "optionalhook " ,
676675 "opts" ,
676+ "plugin" ,
677677 "plugin_name" ,
678- "wrapper" ,
679- "hookwrapper" ,
680- "optionalhook" ,
681678 "tryfirst" ,
682679 "trylast" ,
680+ "wrapper" ,
683681 )
684682
685683 def __init__ (
@@ -725,11 +723,11 @@ def __repr__(self) -> str:
725723@final
726724class HookSpec :
727725 __slots__ = (
728- "namespace" ,
729- "function" ,
730- "name" ,
731726 "argnames" ,
727+ "function" ,
732728 "kwargnames" ,
729+ "name" ,
730+ "namespace" ,
733731 "opts" ,
734732 "warn_on_impl" ,
735733 "warn_on_impl_args" ,
0 commit comments