Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 536d70e

Browse files
committed
Fix grammar, typos and markup in documentation and code comments
* Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
1 parent b71c095 commit 536d70e

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ArgumentParser objects
174174
* conflict_handler_ - The strategy for resolving conflicting optionals
175175
(usually unnecessary)
176176

177-
* add_help_ - Add a -h/--help option to the parser (default: ``True``)
177+
* add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)
178178

179179
* allow_abbrev_ - Allows long options to be abbreviated if the
180180
abbreviation is unambiguous. (default: ``True``)
@@ -211,7 +211,7 @@ The help for this program will display ``myprogram.py`` as the program name
211211
-h, --help show this help message and exit
212212
--foo FOO foo help
213213
$ cd ..
214-
$ python subdir\myprogram.py --help
214+
$ python subdir/myprogram.py --help
215215
usage: myprogram.py [-h] [--foo FOO]
216216
217217
optional arguments:

Doc/library/unittest.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,11 +1637,11 @@ Loading and running tests
16371637

16381638
The method optionally resolves *name* relative to the given *module*.
16391639

1640-
.. versionchanged:: 3.5
1641-
If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing
1642-
*name* then a synthetic test that raises that error when run will be
1643-
returned. These errors are included in the errors accumulated by
1644-
self.errors.
1640+
.. versionchanged:: 3.5
1641+
If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing
1642+
*name* then a synthetic test that raises that error when run will be
1643+
returned. These errors are included in the errors accumulated by
1644+
self.errors.
16451645

16461646

16471647
.. method:: loadTestsFromNames(names, module=None)

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Library
189189
WeakValueDictionary.pop() when a GC collection happens in another
190190
thread.
191191

192-
- Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that
192+
- Issue #20191: Fixed a crash in resource.prlimit() when passing a sequence that
193193
doesn't own its elements as limits.
194194

195195
- Issue #28779: multiprocessing.set_forkserver_preload() would crash the

Modules/_collectionsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ static PyTypeObject defdict_type = {
21692169
PyDoc_STRVAR(_count_elements_doc,
21702170
"_count_elements(mapping, iterable) -> None\n\
21712171
\n\
2172-
Count elements in the iterable, updating the mappping");
2172+
Count elements in the iterable, updating the mapping");
21732173

21742174
static PyObject *
21752175
_count_elements(PyObject *self, PyObject *args)

Modules/_io/textio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
10121012
errors);
10131013
if (self->encoder == NULL)
10141014
goto error;
1015-
/* Get the normalized named of the codec */
1015+
/* Get the normalized name of the codec */
10161016
res = _PyObject_GetAttrId(codec_info, &PyId_name);
10171017
if (res == NULL) {
10181018
if (PyErr_ExceptionMatches(PyExc_AttributeError))

Objects/odictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2237,7 +2237,7 @@ odictvalues_new(PyObject *od)
22372237

22382238

22392239
/* ----------------------------------------------
2240-
MutableMappping implementations
2240+
MutableMapping implementations
22412241
22422242
Mapping:
22432243

0 commit comments

Comments
 (0)