Skip to content

Commit b09a68a

Browse files
ambvmohamadmansourX
authored andcommitted
[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)
Co-authored-by: Terry Jan Reedy <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 8f943ca) Co-authored-by: Mohamad Mansour <[email protected]>
1 parent b2a8a30 commit b09a68a

29 files changed

+38
-31
lines changed

Doc/library/cgi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ To get at submitted form data, use the :class:`FieldStorage` class. If the form
8989
contains non-ASCII characters, use the *encoding* keyword parameter set to the
9090
value of the encoding defined for the document. It is usually contained in the
9191
META tag in the HEAD section of the HTML document or by the
92-
:mailheader:`Content-Type` header). This reads the form contents from the
92+
:mailheader:`Content-Type` header. This reads the form contents from the
9393
standard input or the environment (depending on the value of various
9494
environment variables set according to the CGI standard). Since it may consume
9595
standard input, it should be instantiated only once.

Doc/library/logging.config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in
168168
:func:`listen` socket and sending a configuration which runs whatever
169169
code the attacker wants to have executed in the victim's process. This is
170170
especially easy to do if the default port is used, but not hard even if a
171-
different port is used). To avoid the risk of this happening, use the
171+
different port is used. To avoid the risk of this happening, use the
172172
``verify`` argument to :func:`listen` to prevent unrecognised
173173
configurations from being applied.
174174

Doc/library/urllib.request.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ OpenerDirector Objects
655655
optional *timeout* parameter specifies a timeout in seconds for blocking
656656
operations like the connection attempt (if not specified, the global default
657657
timeout setting will be used). The timeout feature actually works only for
658-
HTTP, HTTPS and FTP connections).
658+
HTTP, HTTPS and FTP connections.
659659

660660

661661
.. method:: OpenerDirector.error(proto, *args)

Doc/reference/compound_stmts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ subject value:
10551055
patterns using the :data:`~object.__match_args__` attribute on the class
10561056
``name_or_attr`` before matching:
10571057

1058-
I. The equivalent of ``getattr(cls, "__match_args__", ()))`` is called.
1058+
I. The equivalent of ``getattr(cls, "__match_args__", ())`` is called.
10591059

10601060
* If this raises an exception, the exception bubbles up.
10611061

Include/cpython/unicodeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ enum PyUnicode_Kind {
416416

417417

418418
/* Fast check to determine whether an object is ready. Equivalent to
419-
PyUnicode_IS_COMPACT(op) || ((PyUnicodeObject*)(op))->data.any) */
419+
PyUnicode_IS_COMPACT(op) || ((PyUnicodeObject*)(op))->data.any */
420420

421421
#define PyUnicode_IS_READY(op) (((PyASCIIObject*)op)->state.ready)
422422

Include/internal/pycore_object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ _PyObject_IS_GC(PyObject *obj)
168168
// Fast inlined version of PyType_IS_GC()
169169
#define _PyType_IS_GC(t) _PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
170170

171-
// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL)));
171+
// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL));
172172
extern int _Py_CheckSlotResult(
173173
PyObject *obj,
174174
const char *slot_name,

Lib/_osx_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def customize_compiler(_config_vars):
481481
482482
This customization is performed when the first
483483
extension module build is requested
484-
in distutils.sysconfig.customize_compiler).
484+
in distutils.sysconfig.customize_compiler.
485485
"""
486486

487487
# Find a compiler to use for extension module builds

Lib/distutils/command/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def check_metadata(self):
8383
name, version, URL
8484
8585
Recommended fields:
86-
(author and author_email) or (maintainer and maintainer_email))
86+
(author and author_email) or (maintainer and maintainer_email)
8787
8888
Warns if any are missing.
8989
"""

Lib/distutils/msvc9compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def manifest_get_embed_info(self, target_desc, ld_args):
673673
# If a manifest should be embedded, return a tuple of
674674
# (manifest_filename, resource_id). Returns None if no manifest
675675
# should be embedded. See http://bugs.python.org/issue7833 for why
676-
# we want to avoid any manifest for extension modules if we can)
676+
# we want to avoid any manifest for extension modules if we can.
677677
for arg in ld_args:
678678
if arg.startswith("/MANIFESTFILE:"):
679679
temp_manifest = arg.split(":", 1)[1]

Lib/graphlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, node):
1717
self.npredecessors = 0
1818

1919
# List of successor nodes. The list can contain duplicated elements as
20-
# long as they're all reflected in the successor's npredecessors attribute).
20+
# long as they're all reflected in the successor's npredecessors attribute.
2121
self.successors = []
2222

2323

0 commit comments

Comments
 (0)