Skip to content

Commit 56ef703

Browse files
committed
Merge branch 'main' into docs/pep750-first-pass
2 parents 8484b81 + c419af9 commit 56ef703

File tree

75 files changed

+1649
-460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1649
-460
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ repos:
3434
name: Run Black on Tools/jit/
3535
files: ^Tools/jit/
3636

37+
- repo: https://github.com/Lucas-C/pre-commit-hooks
38+
rev: v1.5.5
39+
hooks:
40+
- id: remove-tabs
41+
types: [python]
42+
exclude: ^Tools/c-analyzer/cpython/_parser.py
43+
3744
- repo: https://github.com/pre-commit/pre-commit-hooks
3845
rev: v5.0.0
3946
hooks:

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
12501250
.. c:function:: void PyInterpreterState_Clear(PyInterpreterState *interp)
12511251
12521252
Reset all information in an interpreter state object. There must be
1253-
an :term:`attached thread state` for the the interpreter.
1253+
an :term:`attached thread state` for the interpreter.
12541254
12551255
.. audit-event:: cpython.PyInterpreterState_Clear "" c.PyInterpreterState_Clear
12561256

Doc/c-api/long.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
439439
All *n_bytes* of the buffer are written: large buffers are padded with
440440
zeroes.
441441
442-
If the returned value is greater than than *n_bytes*, the value was
442+
If the returned value is greater than *n_bytes*, the value was
443443
truncated: as many of the lowest bits of the value as could fit are written,
444444
and the higher bits are ignored. This matches the typical behavior
445445
of a C-style downcast.

Doc/extending/newtypes_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ be an instance of a subclass.
277277
The explicit cast to ``CustomObject *`` above is needed because we defined
278278
``Custom_dealloc`` to take a ``PyObject *`` argument, as the ``tp_dealloc``
279279
function pointer expects to receive a ``PyObject *`` argument.
280-
By assigning to the the ``tp_dealloc`` slot of a type, we declare
280+
By assigning to the ``tp_dealloc`` slot of a type, we declare
281281
that it can only be called with instances of our ``CustomObject``
282282
class, so the cast to ``(CustomObject *)`` is safe.
283283
This is object-oriented polymorphism, in C!

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2965,7 +2965,7 @@ fields, or any other data types containing pointer type fields.
29652965
.. attribute:: is_anonymous
29662966

29672967
True if this field is anonymous, that is, it contains nested sub-fields
2968-
that should be be merged into a containing structure or union.
2968+
that should be merged into a containing structure or union.
29692969

29702970

29712971
.. _ctypes-arrays-pointers:

Doc/library/email.header.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ The :mod:`email.header` module also provides the following convenient functions.
206206

207207
.. note::
208208

209-
This function exists for for backwards compatibility only. For
209+
This function exists for backwards compatibility only. For
210210
new code, we recommend using :class:`email.headerregistry.HeaderRegistry`.
211211

212212

@@ -225,5 +225,5 @@ The :mod:`email.header` module also provides the following convenient functions.
225225

226226
.. note::
227227

228-
This function exists for for backwards compatibility only, and is
228+
This function exists for backwards compatibility only, and is
229229
not recommended for use in new code.

Doc/library/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ their subgroups based on the types of the contained exceptions.
10481048
subclasses that need a different constructor signature need to
10491049
override that rather than :meth:`~object.__init__`. For example, the following
10501050
defines an exception group subclass which accepts an exit_code and
1051-
and constructs the group's message from it. ::
1051+
constructs the group's message from it. ::
10521052

10531053
class Errors(ExceptionGroup):
10541054
def __new__(cls, errors, exit_code):

Doc/library/faulthandler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ An error will be printed instead of the stack.
9090

9191
Additionally, some compilers do not support :term:`CPython's <CPython>`
9292
implementation of C stack dumps. As a result, a different error may be printed
93-
instead of the stack, even if the the operating system supports dumping stacks.
93+
instead of the stack, even if the operating system supports dumping stacks.
9494

9595
.. note::
9696

Doc/library/mmap.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
269269

270270
Resizing a map created with *access* of :const:`ACCESS_READ` or
271271
:const:`ACCESS_COPY`, will raise a :exc:`TypeError` exception.
272-
Resizing a map created with with *trackfd* set to ``False``,
272+
Resizing a map created with *trackfd* set to ``False``,
273273
will raise a :exc:`ValueError` exception.
274274

275275
**On Windows**: Resizing the map will raise an :exc:`OSError` if there are other

Doc/library/pathlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ The :mod:`pathlib.types` module provides types for static type checking.
19851985

19861986
If *follow_symlinks* is ``False``, return ``True`` only if the path
19871987
is a file (without following symlinks); return ``False`` if the path
1988-
is a directory or other other non-file, or if it doesn't exist.
1988+
is a directory or other non-file, or if it doesn't exist.
19891989

19901990
.. method:: is_symlink()
19911991

0 commit comments

Comments
 (0)