Skip to content

Commit ca5deb4

Browse files
committed
doc: fix ~75 typos and grammar issues across documentation (#14179)
Fix typos, grammar errors, and broken RST directives found across 37 documentation files including how-to guides, reference docs, examples, explanations, and project root files. Notable fixes: - Broken RST directives (``.. note:`` → ``.. note::``) - Subject-verb agreement errors - Missing/incorrect articles and prepositions - Incorrect verb forms ("teared down" → "torn down") - Duplicate words and extra spaces - Wrong URL in changelog (pytest → pytest-xdist) - Ordinal typo ("3th" → "3rd") (cherry picked from commit b2310f2)
1 parent 11557b2 commit ca5deb4

36 files changed

Lines changed: 79 additions & 80 deletions

CONTRIBUTING.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ the following:
146146
- PyPI presence with packaging metadata that contains a ``pytest-``
147147
prefixed name, version number, authors, short and long description.
148148

149-
- a `tox configuration <https://tox.readthedocs.io/en/latest/config.html#configuration-discovery>`_
149+
- a `tox configuration <https://tox.readthedocs.io/en/latest/config.html#configuration-discovery>`_
150150
for running tests using `tox <https://tox.readthedocs.io>`_.
151151

152152
- a ``README`` describing how to use the plugin and on which
@@ -280,7 +280,7 @@ Here is a simple overview, with pytest-specific bits:
280280
#. You can now edit your local working copy and run the tests again as necessary. Please follow `PEP-8 <https://www.python.org/dev/peps/pep-0008/>`_ for naming.
281281

282282
You can pass different options to ``tox``. For example, to run tests on Python 3.13 and pass options to pytest
283-
(e.g. enter pdb on failure) to pytest you can do::
283+
(e.g. enter pdb on failure) you can do::
284284

285285
$ tox -e py313 -- --pdb
286286

@@ -346,7 +346,7 @@ For example, to ensure a simple test passes you can write:
346346
result.assert_outcomes(failed=0, passed=1)
347347
348348
349-
Alternatively, it is possible to make checks based on the actual output of the termal using
349+
Alternatively, it is possible to make checks based on the actual output of the terminal using
350350
*glob-like* expressions:
351351

352352
.. code-block:: python
@@ -479,10 +479,10 @@ above?
479479
to do the backport.
480480
2. However, often the merge is done by another maintainer, in which case it is nice of them to
481481
do the backport procedure if they have the time.
482-
3. For bugs submitted by non-maintainers, it is expected that a core developer will to do
482+
3. For bugs submitted by non-maintainers, it is expected that a core developer will do
483483
the backport, normally the one that merged the PR on ``main``.
484-
4. If a non-maintainers notices a bug which is fixed on ``main`` but has not been backported
485-
(due to maintainers forgetting to apply the *needs backport* label, or just plain missing it),
484+
4. If a non-maintainer notices a bug which is fixed on ``main`` but has not been backported
485+
(due to maintainers forgetting to apply the *needs backport* or *backport x.x.x* labels, or just plain missing it),
486486
they are also welcome to open a PR with the backport. The procedure is simple and really
487487
helps with the maintenance of the project.
488488

@@ -512,7 +512,7 @@ can always reopen the issue/pull request in their own time later if it makes sen
512512
When to close
513513
~~~~~~~~~~~~~
514514

515-
Here are a few general rules the maintainers use deciding when to close issues/PRs because
515+
Here are a few general rules the maintainers use to decide when to close issues/PRs because
516516
of lack of inactivity:
517517

518518
* Issues labeled ``question`` or ``needs information``: closed after 14 days inactive.
@@ -524,15 +524,15 @@ The above are **not hard rules**, but merely **guidelines**, and can be (and oft
524524
Closing pull requests
525525
~~~~~~~~~~~~~~~~~~~~~
526526

527-
When closing a Pull Request, it needs to be acknowledging the time, effort, and interest demonstrated by the person which submitted it. As mentioned previously, it is not the intent of the team to dismiss a stalled pull request entirely but to merely to clear up our queue, so a message like the one below is warranted when closing a pull request that went stale:
527+
When closing a Pull Request, we should acknowledge the time, effort, and interest demonstrated by the person who submitted it. As mentioned previously, it is not the intent of the team to dismiss a stalled pull request entirely but to merely to clear up our queue, so a message like the one below is warranted when closing a pull request that went stale:
528528

529529
Hi <contributor>,
530530

531531
First of all, we would like to thank you for your time and effort on working on this, the pytest team deeply appreciates it.
532532

533533
We noticed it has been awhile since you have updated this PR, however. pytest is a high activity project, with many issues/PRs being opened daily, so it is hard for us maintainers to track which PRs are ready for merging, for review, or need more attention.
534534

535-
So for those reasons we, think it is best to close the PR for now, but with the only intention to clean up our queue, it is by no means a rejection of your changes. We still encourage you to re-open this PR (it is just a click of a button away) when you are ready to get back to it.
535+
So for those reasons, we think it is best to close the PR for now, but with the only intention to clean up our queue, it is by no means a rejection of your changes. We still encourage you to re-open this PR (it is just a click of a button away) when you are ready to get back to it.
536536

537537
Again we appreciate your time for working on this, and hope you might get back to this at a later time!
538538

RELEASING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ To release a version ``MAJOR.MINOR.PATCH``, follow these steps:
117117

118118
#. Create a branch ``release-MAJOR.MINOR.PATCH`` from the ``MAJOR.MINOR.x`` branch.
119119

120-
Ensure your are updated and in a clean working tree.
120+
Ensure your local checkout is up to date and in a clean working tree.
121121

122122
#. Using ``tox``, generate docs, changelog, announcements::
123123

changelog/12444.bugfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fixed :func:`pytest.approx` which now correctly takes account Mapping keys order to compare them.
1+
Fixed :func:`pytest.approx` which now correctly takes into account :class:`~collections.abc.Mapping` keys order to compare them.

changelog/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
1616
* ``feature``: new user facing features, like new command-line options and new behavior.
1717
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junit-xml``, improved colors in terminal, etc).
1818
* ``bugfix``: fixes a bug.
19-
* ``doc``: documentation improvement, like rewording an entire session or adding missing docs.
19+
* ``doc``: documentation improvement, like rewording an entire section or adding missing docs.
2020
* ``deprecation``: feature deprecation.
2121
* ``breaking``: a change which may break existing suites, such as feature removal or behavior change.
2222
* ``vendor``: changes in packages vendored in pytest.
2323
* ``packaging``: notes for downstreams about unobvious side effects
24-
and tooling. changes in the test invocation considerations and
24+
and tooling. Changes in the test invocation considerations and
2525
runtime assumptions.
2626
* ``contrib``: stuff that affects the contributor experience. e.g.
2727
Running tests, building the docs, setting up the development

doc/en/backwards-compatibility.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ History
5353
=========
5454

5555

56-
Focus primary on smooth transition - stance (pre 6.0)
57-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56+
Focus primarily on smooth transition - stance (pre 6.0)
57+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5858

5959
Keeping backwards compatibility has a very high priority in the pytest project. Although we have deprecated functionality over the years, most of it is still supported. All deprecations in pytest were done because simpler or more efficient ways of accomplishing the same tasks have emerged, making the old way of doing things unnecessary.
6060

doc/en/deprecations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ In ``8.2`` the ``exc_type`` parameter has been added, giving users the ability o
139139
to skip tests only if the module cannot really be found, and not because of some other error.
140140

141141
Catching only :class:`ModuleNotFoundError` by default (and letting other errors propagate) would be the best solution,
142-
however for backward compatibility, pytest will keep the existing behavior but raise an warning if:
142+
however for backward compatibility, pytest will keep the existing behavior but raise a warning if:
143143

144144
1. The captured exception is of type :class:`ImportError`, and:
145145
2. The user does not pass ``exc_type`` explicitly.
@@ -358,7 +358,7 @@ The ``yield_fixture`` function/decorator
358358

359359
``pytest.yield_fixture`` is a deprecated alias for :func:`pytest.fixture`.
360360

361-
It has been so for a very long time, so can be search/replaced safely.
361+
It has been so for a very long time, so it can be searched/replaced safely.
362362

363363

364364
Removed Features and Breaking Changes
@@ -774,7 +774,7 @@ The ``pytest._fillfuncargs`` function
774774

775775
This function was kept for backward compatibility with an older plugin.
776776

777-
It's functionality is not meant to be used directly, but if you must replace
777+
Its functionality is not meant to be used directly, but if you must replace
778778
it, use `function._request._fillfixtures()` instead, though note this is not
779779
a public API and may break in the future.
780780

@@ -805,7 +805,7 @@ The ``--result-log`` option produces a stream of test reports which can be
805805
analysed at runtime, but it uses a custom format which requires users to implement their own
806806
parser.
807807

808-
The `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin provides a ``--report-log`` option, a more standard and extensible alternative, producing
808+
The :pypi:`pytest-reportlog` plugin provides a ``--report-log`` option, a more standard and extensible alternative, producing
809809
one JSON object per-line, and should cover the same use cases. Please try it out and provide feedback.
810810

811811
The ``pytest-reportlog`` plugin might even be merged into the core

doc/en/example/attic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ decorate its result. This mechanism allows us to stay
7575
ignorant of how/where the function argument is provided -
7676
in our example from a `conftest plugin`_.
7777

78-
sidenote: the temporary directory used here are instances of
78+
Side note: the temporary directories used here are instances of
7979
the `py.path.local`_ class which provides many of the os.path
8080
methods in a convenient way.
8181

doc/en/example/customdirectory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can create a ``manifest.json`` file and some test files:
3636
.. include:: customdirectory/tests/test_third.py
3737
:literal:
3838

39-
An you can now execute the test specification:
39+
And you can now execute the test specification:
4040

4141
.. code-block:: pytest
4242

doc/en/example/markers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ A test file using this local plugin:
411411
def test_basic_db_operation():
412412
pass
413413
414-
and an example invocations specifying a different environment than what
414+
and an example invocation specifying a different environment than what
415415
the test needs:
416416

417417
.. code-block:: pytest

doc/en/example/parametrize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Parametrizing tests
55
=================================================
66

7-
``pytest`` allows to easily parametrize test functions.
7+
``pytest`` allows you to easily parametrize test functions.
88
For basic docs, see :ref:`parametrize-basics`.
99

1010
In the following we provide some examples using
@@ -642,7 +642,7 @@ As the result:
642642

643643
- Four tests were collected
644644
- One test was deselected because it doesn't have the ``basic`` mark.
645-
- Three tests with the ``basic`` mark was selected.
645+
- Three tests with the ``basic`` mark were selected.
646646
- The test ``test_eval[1+7-8]`` passed, but the name is autogenerated and confusing.
647647
- The test ``test_eval[basic_2+4]`` passed.
648648
- The test ``test_eval[basic_6*9]`` was expected to fail and did fail.

0 commit comments

Comments
 (0)