summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2021-09-22 01:33:59 +0200
committerGitHub <noreply@github.com>2021-09-22 01:33:59 +0200
commit8c1e1da565bca9cec792323eb728e288715ef7c4 (patch)
tree4b78b148f1e5573f68ca0150838a2d80d48cde7f /Lib
parentc800e390941e91a9a276191d2f41b7e0e6e23e9e (diff)
downloadcpython-git-8c1e1da565bca9cec792323eb728e288715ef7c4.tar.gz
[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29) Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_osx_support.py2
-rw-r--r--Lib/distutils/command/check.py2
-rw-r--r--Lib/distutils/msvc9compiler.py2
-rw-r--r--Lib/graphlib.py2
-rw-r--r--Lib/idlelib/idle_test/test_config_key.py2
-rw-r--r--Lib/idlelib/idle_test/test_query.py2
-rw-r--r--Lib/msilib/schema.py2
-rw-r--r--Lib/pkgutil.py2
-rw-r--r--Lib/pydoc_data/topics.py2
-rw-r--r--Lib/test/support/__init__.py4
-rw-r--r--Lib/test/test_format.py2
-rw-r--r--Lib/test/test_importlib/source/test_source_encoding.py2
-rw-r--r--Lib/test/test_winreg.py2
13 files changed, 14 insertions, 14 deletions
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
index 326b36d611..aa66c8b9f4 100644
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -481,7 +481,7 @@ def customize_compiler(_config_vars):
This customization is performed when the first
extension module build is requested
- in distutils.sysconfig.customize_compiler).
+ in distutils.sysconfig.customize_compiler.
"""
# Find a compiler to use for extension module builds
diff --git a/Lib/distutils/command/check.py b/Lib/distutils/command/check.py
index ada2500646..73a30f3afd 100644
--- a/Lib/distutils/command/check.py
+++ b/Lib/distutils/command/check.py
@@ -83,7 +83,7 @@ class check(Command):
name, version, URL
Recommended fields:
- (author and author_email) or (maintainer and maintainer_email))
+ (author and author_email) or (maintainer and maintainer_email)
Warns if any are missing.
"""
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
index 6934e964ab..a7976fbe3e 100644
--- a/Lib/distutils/msvc9compiler.py
+++ b/Lib/distutils/msvc9compiler.py
@@ -673,7 +673,7 @@ class MSVCCompiler(CCompiler) :
# If a manifest should be embedded, return a tuple of
# (manifest_filename, resource_id). Returns None if no manifest
# should be embedded. See http://bugs.python.org/issue7833 for why
- # we want to avoid any manifest for extension modules if we can)
+ # we want to avoid any manifest for extension modules if we can.
for arg in ld_args:
if arg.startswith("/MANIFESTFILE:"):
temp_manifest = arg.split(":", 1)[1]
diff --git a/Lib/graphlib.py b/Lib/graphlib.py
index d0e7a4814c..1c5d9a413c 100644
--- a/Lib/graphlib.py
+++ b/Lib/graphlib.py
@@ -17,7 +17,7 @@ class _NodeInfo:
self.npredecessors = 0
# List of successor nodes. The list can contain duplicated elements as
- # long as they're all reflected in the successor's npredecessors attribute).
+ # long as they're all reflected in the successor's npredecessors attribute.
self.successors = []
diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py
index b7fe7fd6b5..bf66cadf57 100644
--- a/Lib/idlelib/idle_test/test_config_key.py
+++ b/Lib/idlelib/idle_test/test_config_key.py
@@ -2,7 +2,7 @@
Coverage is effectively 100%. Tkinter dialog is mocked, Mac-only line
may be skipped, and dummy function in bind test should not be called.
-Not tested: exit with 'self.advanced or self.keys_ok(keys)) ...' False.
+Not tested: exit with 'self.advanced or self.keys_ok(keys) ...' False.
"""
from idlelib import config_key
diff --git a/Lib/idlelib/idle_test/test_query.py b/Lib/idlelib/idle_test/test_query.py
index 41905111b7..bb12b2b086 100644
--- a/Lib/idlelib/idle_test/test_query.py
+++ b/Lib/idlelib/idle_test/test_query.py
@@ -1,4 +1,4 @@
-"""Test query, coverage 93%).
+"""Test query, coverage 93%.
Non-gui tests for Query, SectionName, ModuleName, and HelpSource use
dummy versions that extract the non-gui methods and add other needed
diff --git a/Lib/msilib/schema.py b/Lib/msilib/schema.py
index eeb3ecd27a..9f5745cfb1 100644
--- a/Lib/msilib/schema.py
+++ b/Lib/msilib/schema.py
@@ -664,7 +664,7 @@ _Validation_records = [
('Class','Component_','N',None, None, 'Component',1,'Identifier',None, 'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
('Class','Context','N',None, None, None, None, 'Identifier',None, 'The numeric server context for this server. CLSCTX_xxxx',),
('Class','DefInprocHandler','Y',None, None, None, None, 'Filename','1;2;3','Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"',),
-('Class','FileTypeMask','Y',None, None, None, None, 'Text',None, 'Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...',),
+('Class','FileTypeMask','Y',None, None, None, None, 'Text',None, 'Optional string containing information for the HKCRthis CLSID key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...',),
('Class','Icon_','Y',None, None, 'Icon',1,'Identifier',None, 'Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key.',),
('Class','IconIndex','Y',-32767,32767,None, None, None, None, 'Optional icon index.',),
('Class','ProgId_Default','Y',None, None, 'ProgId',1,'Text',None, 'Optional ProgId associated with this CLSID.',),
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py
index 2c3429856b..8e010c79c1 100644
--- a/Lib/pkgutil.py
+++ b/Lib/pkgutil.py
@@ -671,7 +671,7 @@ def resolve_name(name):
ValueError - if `name` isn't in a recognised format
ImportError - if an import failed when it shouldn't have
AttributeError - if a failure occurred when traversing the object hierarchy
- within the imported package to get to the desired object)
+ within the imported package to get to the desired object.
"""
global _NAME_PATTERN
if _NAME_PATTERN is None:
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index a1a81cb687..e80f49ef1e 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -3417,7 +3417,7 @@ topics = {'assert': 'The "assert" statement\n'
'class\n'
' "name_or_attr" before matching:\n'
'\n'
- ' I. The equivalent of "getattr(cls, "__match_args__", ()))" '
+ ' I. The equivalent of "getattr(cls, "__match_args__", ())" '
'is\n'
' called.\n'
'\n'
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index ca61bd62e7..44c5bd5820 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -390,8 +390,8 @@ PIPE_MAX_SIZE = 4 * 1024 * 1024 + 1
# A constant likely larger than the underlying OS socket buffer size, to make
# writes blocking.
# The socket buffer sizes can usually be tuned system-wide (e.g. through sysctl
-# on Linux), or on a per-socket basis (SO_SNDBUF/SO_RCVBUF). See issue #18643
-# for a discussion of this number).
+# on Linux), or on a per-socket basis (SO_SNDBUF/SO_RCVBUF). See issue #18643
+# for a discussion of this number.
SOCK_MAX_SIZE = 16 * 1024 * 1024 + 1
# decorator for skipping tests on non-IEEE 754 platforms
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index 6679bd3d88..ae0d4f7308 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -249,7 +249,7 @@ class FormatTest(unittest.TestCase):
# base marker shouldn't change the size
testcommon("%0#35.33o", big, "0o012345670123456701234567012345670")
- # Some small ints, in both Python int and flavors).
+ # Some small ints, in both Python int and flavors.
testcommon("%d", 42, "42")
testcommon("%d", -42, "-42")
testcommon("%d", 42.0, "42")
diff --git a/Lib/test/test_importlib/source/test_source_encoding.py b/Lib/test/test_importlib/source/test_source_encoding.py
index 980855fe1a..c0b9b03126 100644
--- a/Lib/test/test_importlib/source/test_source_encoding.py
+++ b/Lib/test/test_importlib/source/test_source_encoding.py
@@ -23,7 +23,7 @@ class EncodingTest:
PEP 263 specifies how that can change on a per-file basis. Either the first
or second line can contain the encoding line [encoding first line]
- encoding second line]. If the file has the BOM marker it is considered UTF-8
+ [encoding second line]. If the file has the BOM marker it is considered UTF-8
implicitly [BOM]. If any encoding is specified it must be UTF-8, else it is
an error [BOM and utf-8][BOM conflict].
diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py
index fedfbe9b44..8157c2da6e 100644
--- a/Lib/test/test_winreg.py
+++ b/Lib/test/test_winreg.py
@@ -45,7 +45,7 @@ test_data = [
("Raw Data", b"binary\x00data", REG_BINARY),
("Big String", "x"*(2**14-1), REG_SZ),
("Big Binary", b"x"*(2**14), REG_BINARY),
- # Two and three kanjis, meaning: "Japan" and "Japanese")
+ # Two and three kanjis, meaning: "Japan" and "Japanese".
("Japanese 日本", "日本語", REG_SZ),
]