File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,10 @@ def call_extra(
403
403
) -> Any :
404
404
"""Call the hook with some additional temporarily participating
405
405
methods using the specified ``kwargs`` as call parameters."""
406
+ assert (
407
+ not self .is_historic ()
408
+ ), "Cannot directly call a historic hook - use call_historic instead."
409
+ self ._verify_all_args_are_provided (kwargs )
406
410
old = list (self ._nonwrappers ), list (self ._wrappers )
407
411
for method in methods :
408
412
opts : "_HookImplOpts" = {
@@ -414,8 +418,9 @@ def call_extra(
414
418
}
415
419
hookimpl = HookImpl (None , "<temp>" , method , opts )
416
420
self ._add_hookimpl (hookimpl )
421
+ firstresult = self .spec .opts .get ("firstresult" , False ) if self .spec else False
417
422
try :
418
- return self ( ** kwargs )
423
+ return self . _hookexec ( self . name , self . get_hookimpls (), kwargs , firstresult )
419
424
finally :
420
425
self ._nonwrappers , self ._wrappers = old
421
426
You can’t perform that action at this time.
0 commit comments