@@ -395,11 +395,11 @@ be implemented as generator function with a single ``yield`` in its body:
395
395
if config.use_defaults:
396
396
outcome.force_result(defaults)
397
397
398
- The generator is :py:meth: `sent <python:generator.send> ` a :py:class: `pluggy.callers ._Result ` object which can
398
+ The generator is :py:meth: `sent <python:generator.send> ` a :py:class: `pluggy._callers ._Result ` object which can
399
399
be assigned in the ``yield `` expression and used to override or inspect
400
400
the final result(s) returned back to the caller using the
401
- :py:meth: `~pluggy.callers ._Result.force_result ` or
402
- :py:meth: `~pluggy.callers ._Result.get_result ` methods.
401
+ :py:meth: `~pluggy._callers ._Result.force_result ` or
402
+ :py:meth: `~pluggy._callers ._Result.get_result ` methods.
403
403
404
404
.. note ::
405
405
Hook wrappers can **not ** return results (as per generator function
@@ -533,7 +533,7 @@ Also see the :ref:`pytest:firstresult` section in the ``pytest`` docs.
533
533
Historic hooks
534
534
^^^^^^^^^^^^^^
535
535
You can mark a *hookspec * as being *historic * meaning that the hook
536
- can be called with :py:meth: `~pluggy.hooks ._HookCaller.call_historic() ` **before **
536
+ can be called with :py:meth: `~pluggy._hooks ._HookCaller.call_historic() ` **before **
537
537
having been registered:
538
538
539
539
.. code-block :: python
@@ -655,13 +655,13 @@ The core functionality of ``pluggy`` enables an extension provider
655
655
to override function calls made at certain points throughout a program.
656
656
657
657
A particular *hook * is invoked by calling an instance of
658
- a :py:class: `pluggy.hooks ._HookCaller ` which in turn *loops * through the
658
+ a :py:class: `pluggy._hooks ._HookCaller ` which in turn *loops * through the
659
659
``1:N `` registered *hookimpls * and calls them in sequence.
660
660
661
661
Every :py:class: `~pluggy.PluginManager ` has a ``hook `` attribute
662
- which is an instance of this :py:class: `pluggy.hooks ._HookRelay `.
663
- The :py:class: `~pluggy.hooks ._HookRelay ` itself contains references
664
- (by hook name) to each registered *hookimpl *'s :py:class: `~pluggy.hooks ._HookCaller ` instance.
662
+ which is an instance of this :py:class: `pluggy._hooks ._HookRelay `.
663
+ The :py:class: `~pluggy._hooks ._HookRelay ` itself contains references
664
+ (by hook name) to each registered *hookimpl *'s :py:class: `~pluggy._hooks ._HookCaller ` instance.
665
665
666
666
More practically you call a *hook * like so:
667
667
@@ -801,7 +801,7 @@ only useful if you expect that some *hookimpls* may be registered **after** the
801
801
hook is initially invoked.
802
802
803
803
Historic hooks must be :ref: `specially marked <historic >` and called
804
- using the :py:meth: `~pluggy.hooks ._HookCaller.call_historic() ` method:
804
+ using the :py:meth: `~pluggy._hooks ._HookCaller.call_historic() ` method:
805
805
806
806
.. code-block :: python
807
807
@@ -822,8 +822,8 @@ using the :py:meth:`~pluggy.hooks._HookCaller.call_historic()` method:
822
822
# historic callback is invoked here
823
823
pm.register(mylateplugin)
824
824
825
- Note that if you :py:meth: `~pluggy.hooks ._HookCaller.call_historic() `
826
- the :py:class: `~pluggy.hooks ._HookCaller ` (and thus your calling code)
825
+ Note that if you :py:meth: `~pluggy._hooks ._HookCaller.call_historic() `
826
+ the :py:class: `~pluggy.__hooks ._HookCaller ` (and thus your calling code)
827
827
can not receive results back from the underlying *hookimpl * functions.
828
828
Instead you can provide a *callback * for processing results (like the
829
829
``callback `` function above) which will be called as each new plugin
@@ -838,19 +838,19 @@ Calling with extras
838
838
-------------------
839
839
You can call a hook with temporarily participating *implementation * functions
840
840
(that aren't in the registry) using the
841
- :py:meth: `pluggy.hooks ._HookCaller.call_extra() ` method.
841
+ :py:meth: `pluggy.__hooks ._HookCaller.call_extra() ` method.
842
842
843
843
844
844
Calling with a subset of registered plugins
845
845
-------------------------------------------
846
846
You can make a call using a subset of plugins by asking the
847
847
:py:class: `~pluggy.PluginManager ` first for a
848
- :py:class: `~pluggy.hooks ._HookCaller ` with those plugins removed
848
+ :py:class: `~pluggy.__hooks ._HookCaller ` with those plugins removed
849
849
using the :py:meth: `pluggy.PluginManager.subset_hook_caller() ` method.
850
850
851
- You then can use that :py:class: `_HookCaller <pluggy.hooks ._HookCaller> `
852
- to make normal, :py:meth: `~pluggy.hooks ._HookCaller.call_historic `, or
853
- :py:meth: `~pluggy.hooks ._HookCaller.call_extra ` calls as necessary.
851
+ You then can use that :py:class: `_HookCaller <pluggy.__hooks ._HookCaller> `
852
+ to make normal, :py:meth: `~pluggy.__hooks ._HookCaller.call_historic `, or
853
+ :py:meth: `~pluggy.__hooks ._HookCaller.call_extra ` calls as necessary.
854
854
855
855
Built-in tracing
856
856
****************
0 commit comments