Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 682d7e0

Browse files
committed
Fix errors found by "make suspicious".
1 parent fa4f7f9 commit 682d7e0

14 files changed

Lines changed: 30 additions & 28 deletions

File tree

Doc/distutils/apiref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ This module supplies the abstract base class :class:`Command`.
18451845

18461846
to your setup.py, and later::
18471847

1848-
cmdclass = {'build_py':build_py}
1848+
cmdclass = {'build_py': build_py}
18491849

18501850
to the invocation of setup().
18511851

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ information about the cause of the error to be lost: most operations can fail
162162
for a variety of reasons.)
163163

164164
To ignore an exception set by a function call that failed, the exception
165-
c:ondition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The only
165+
condition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The only
166166
time C code should call :c:func:`PyErr_Clear` is if it doesn't want to pass the
167167
error on to the interpreter but wants to handle it completely by itself
168168
(possibly by trying something else, or pretending nothing went wrong).

Doc/faq/library.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ To rename a file, use ``os.rename(old_path, new_path)``.
460460

461461
To truncate a file, open it using ``f = open(filename, "rb+")``, and use
462462
``f.truncate(offset)``; offset defaults to the current seek position. There's
463-
also ```os.ftruncate(fd, offset)`` for files opened with :func:`os.open`, where
463+
also ``os.ftruncate(fd, offset)`` for files opened with :func:`os.open`, where
464464
``fd`` is the file descriptor (a small integer).
465465

466466
The :mod:`shutil` module also contains a number of functions to work on files

Doc/faq/windows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ Warning about CTL3D32 version from installer
598598

599599
The Python installer issues a warning like this::
600600

601-
This version uses ``CTL3D32.DLL`` which is not the correct version.
601+
This version uses CTL3D32.DLL which is not the correct version.
602602
This version is used for windows NT applications only.
603603

604604
Tim Peters:

Doc/howto/cporting.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ Python 3.0's :func:`str` (``PyString_*`` functions in C) type is equivalent to
4747
2.x's :func:`unicode` (``PyUnicode_*``). The old 8-bit string type has become
4848
:func:`bytes`. Python 2.6 and later provide a compatibility header,
4949
:file:`bytesobject.h`, mapping ``PyBytes`` names to ``PyString`` ones. For best
50-
c:ompatibility with 3.0, :c:type:`PyUnicode` should be used for textual data and
50+
compatibility with 3.0, :c:type:`PyUnicode` should be used for textual data and
5151
:c:type:`PyBytes` for binary data. It's also important to remember that
5252
:c:type:`PyBytes` and :c:type:`PyUnicode` in 3.0 are not interchangeable like
53-
:c:type:`PyString` and :c:type:`PyString` are in 2.x. The following example shows
54-
best practices with regards to :c:type:`PyUnicode`, :c:type:`PyString`, and
55-
:c:type:`PyBytes`. ::
53+
:c:type:`PyString` and :c:type:`PyString` are in 2.x. The following example
54+
shows best practices with regards to :c:type:`PyUnicode`, :c:type:`PyString`,
55+
and :c:type:`PyBytes`. ::
5656

5757
#include "stdlib.h"
5858
#include "Python.h"

Doc/library/argparse.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -737,14 +737,14 @@ values are:
737737
* N (an integer). N args from the command-line will be gathered together into a
738738
list. For example::
739739

740-
>>> parser = argparse.ArgumentParser()
741-
>>> parser.add_argument('--foo', nargs=2)
742-
>>> parser.add_argument('bar', nargs=1)
743-
>>> parser.parse_args('c --foo a b'.split())
744-
Namespace(bar=['c'], foo=['a', 'b'])
740+
>>> parser = argparse.ArgumentParser()
741+
>>> parser.add_argument('--foo', nargs=2)
742+
>>> parser.add_argument('bar', nargs=1)
743+
>>> parser.parse_args('c --foo a b'.split())
744+
Namespace(bar=['c'], foo=['a', 'b'])
745745

746-
Note that ``nargs=1`` produces a list of one item. This is different from
747-
the default, in which the item is produced by itself.
746+
Note that ``nargs=1`` produces a list of one item. This is different from
747+
the default, in which the item is produced by itself.
748748

749749
* ``'?'``. One arg will be consumed from the command-line if possible, and
750750
produced as a single item. If no command-line arg is present, the value from

Doc/library/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ Instance methods:
979979
d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within
980980
the current year starting with ``1`` for January 1st. The :attr:`tm_isdst` flag
981981
of the result is set according to the :meth:`dst` method: :attr:`tzinfo` is
982-
``None`` or :meth:`dst`` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
982+
``None`` or :meth:`dst` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
983983
else if :meth:`dst` returns a non-zero value, :attr:`tm_isdst` is set to ``1``;
984984
else :attr:`tm_isdst` is set to ``0``.
985985

Doc/library/functions.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,9 @@ are always available. They are listed here in alphabetical order.
634634
The optional keyword-only *key* argument specifies a one-argument ordering
635635
function like that used for :meth:`list.sort`.
636636

637-
If multiple items are maximal, the function returns the first one encountered.
638-
This is consistent with other sort-stability preserving tools such as
639-
``sorted(iterable, key=keyfunc, reverse=True)[0]` and
637+
If multiple items are maximal, the function returns the first one
638+
encountered. This is consistent with other sort-stability preserving tools
639+
such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
640640
``heapq.nlargest(1, iterable, key=keyfunc)``.
641641

642642
.. function:: memoryview(obj)
@@ -655,10 +655,10 @@ are always available. They are listed here in alphabetical order.
655655
The optional keyword-only *key* argument specifies a one-argument ordering
656656
function like that used for :meth:`list.sort`.
657657

658-
If multiple items are minimal, the function returns the first one encountered.
659-
This is consistent with other sort-stability preserving tools such as
660-
``sorted(iterable, key=keyfunc)[0]` and
661-
``heapq.nsmallest(1, iterable, key=keyfunc)``.
658+
If multiple items are minimal, the function returns the first one
659+
encountered. This is consistent with other sort-stability preserving tools
660+
such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1,
661+
iterable, key=keyfunc)``.
662662

663663
.. function:: next(iterator[, default])
664664

Doc/library/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The :class:`BufferedIOBase` ABC deals with buffering on a raw byte stream
179179
:class:`BufferedReader`, and :class:`BufferedRWPair` buffer streams that are
180180
readable, writable, and both readable and writable. :class:`BufferedRandom`
181181
provides a buffered interface to random access streams. Another
182-
:class`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory
182+
:class:`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory
183183
bytes.
184184

185185
The :class:`TextIOBase` ABC, another subclass of :class:`IOBase`, deals with

Doc/library/optparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ error message.
12121212
:func:`float` and :func:`complex`, with similar error-handling.
12131213

12141214
``"choice"`` options are a subtype of ``"string"`` options. The
1215-
:attr:`~Option.choices`` option attribute (a sequence of strings) defines the
1215+
:attr:`~Option.choices` option attribute (a sequence of strings) defines the
12161216
set of allowed option arguments. :func:`optparse.check_choice` compares
12171217
user-supplied option arguments against this master list and raises
12181218
:exc:`OptionValueError` if an invalid string is given.

0 commit comments

Comments
 (0)