From d2e9fd5b4685dd0fe8d6db26f16ddf6a3c88cf72 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 2 Oct 2021 17:00:01 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ran Benita --- doc/en/deprecations.rst | 6 +++--- src/_pytest/deprecated.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index 0befed85d22..a7a1b361cba 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -24,11 +24,11 @@ Below is a complete list of all pytest features which are considered deprecated. configuring hook specs/impls using markers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before pluggy was a own package and had a clear api, +Before pluggy, pytest's plugin library, was its own package and had a clear API, pytest just used ``pytest.mark`` to configure hooks. The :py:func:`pytest.hookimpl` and :py:func:`pytest.hookspec` decorators -have been available since years and should be used. +have been available since years and should be used instead. .. code-block:: python @@ -44,7 +44,7 @@ have been available since years and should be used. pytest_runtest_call.tryfirst = True -This now is declared as: +should be changed to: .. code-block:: python diff --git a/src/_pytest/deprecated.py b/src/_pytest/deprecated.py index c2b7b0a1ef0..12c72320020 100644 --- a/src/_pytest/deprecated.py +++ b/src/_pytest/deprecated.py @@ -110,9 +110,9 @@ HOOK_LEGACY_MARKING = UnformattedWarning( PytestDeprecationWarning, "The hook{type} {fullname} uses old-style configuration options (marks or attributes).\n" - " please use the pytest.hook{type}({hook_opts}) decorator instead of pytest.mark \n" + "Please use the pytest.hook{type}({hook_opts}) decorator instead\n" " to configure the hooks.\n" - " see https://docs.pytest.org/en/latest/deprecations.html" + " See https://docs.pytest.org/en/latest/deprecations.html" "#configuring-hook-specs-impls-using-markers", )