Skip to content

Commit 57e2ced

Browse files
authored
Merge pull request #2473 from ApaDoctor/docs-fixes
docs: Create links for objects to show the api
2 parents 5ee9793 + 80944e3 commit 57e2ced

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

_pytest/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def _prepareconfig(args=None, plugins=None):
169169

170170
class PytestPluginManager(PluginManager):
171171
"""
172-
Overwrites :py:class:`pluggy.PluginManager` to add pytest-specific
172+
Overwrites :py:class:`pluggy.PluginManager <_pytest.vendored_packages.pluggy.PluginManager>` to add pytest-specific
173173
functionality:
174174
175175
* loading plugins from the command line, ``PYTEST_PLUGIN`` env variable and
@@ -206,7 +206,7 @@ def addhooks(self, module_or_class):
206206
"""
207207
.. deprecated:: 2.8
208208
209-
Use :py:meth:`pluggy.PluginManager.add_hookspecs` instead.
209+
Use :py:meth:`pluggy.PluginManager.add_hookspecs <_pytest.vendored_packages.pluggy.PluginManager.add_hookspecs>` instead.
210210
"""
211211
warning = dict(code="I2",
212212
fslocation=_pytest._code.getfslineno(sys._getframe(1)),
@@ -1130,7 +1130,7 @@ def addinivalue_line(self, name, line):
11301130
def getini(self, name):
11311131
""" return configuration value from an :ref:`ini file <inifiles>`. If the
11321132
specified name hasn't been registered through a prior
1133-
:py:func:`parser.addini <pytest.config.Parser.addini>`
1133+
:py:func:`parser.addini <_pytest.config.Parser.addini>`
11341134
call (usually from a plugin), a ValueError is raised. """
11351135
try:
11361136
return self._inicache[name]

_pytest/hookspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def pytest_runtest_teardown(item, nextitem):
213213
@hookspec(firstresult=True)
214214
def pytest_runtest_makereport(item, call):
215215
""" return a :py:class:`_pytest.runner.TestReport` object
216-
for the given :py:class:`pytest.Item` and
216+
for the given :py:class:`pytest.Item <_pytest.main.Item>` and
217217
:py:class:`_pytest.runner.CallInfo`.
218218
"""
219219

_pytest/vendored_packages/pluggy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def add_hookcall_monitoring(self, before, after):
540540
of HookImpl instances and the keyword arguments for the hook call.
541541
542542
``after(outcome, hook_name, hook_impls, kwargs)`` receives the
543-
same arguments as ``before`` but also a :py:class:`_CallOutcome`` object
543+
same arguments as ``before`` but also a :py:class:`_CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` object
544544
which represents the result of the overall hook call.
545545
"""
546546
return _TracedHookExecution(self, before, after).undo

changelog/2331.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix internal API links to ``pluggy`` objects.

doc/en/writing_plugins.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ hook wrappers and passes the same arguments as to the regular hooks.
383383

384384
At the yield point of the hook wrapper pytest will execute the next hook
385385
implementations and return their result to the yield point in the form of
386-
a :py:class:`CallOutcome` instance which encapsulates a result or
386+
a :py:class:`CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` instance which encapsulates a result or
387387
exception info. The yield point itself will thus typically not raise
388388
exceptions (unless there are bugs).
389389

@@ -448,7 +448,7 @@ Here is the order of execution:
448448
Plugin1).
449449

450450
4. Plugin3's pytest_collection_modifyitems then executing the code after the yield
451-
point. The yield receives a :py:class:`CallOutcome` instance which encapsulates
451+
point. The yield receives a :py:class:`CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` instance which encapsulates
452452
the result from calling the non-wrappers. Wrappers shall not modify the result.
453453

454454
It's possible to use ``tryfirst`` and ``trylast`` also in conjunction with
@@ -525,7 +525,7 @@ Initialization, command line and configuration hooks
525525
Generic "runtest" hooks
526526
-----------------------
527527

528-
All runtest related hooks receive a :py:class:`pytest.Item` object.
528+
All runtest related hooks receive a :py:class:`pytest.Item <_pytest.main.Item>` object.
529529

530530
.. autofunction:: pytest_runtest_protocol
531531
.. autofunction:: pytest_runtest_setup

0 commit comments

Comments
 (0)