Skip to content

Commit 2b1a5d4

Browse files
committed
gh-156226: Fix doubled-word typos in docs and comments
- Doc/library/difflib.rst: 'produced in in various formats' - Lib/multiprocessing/resource_tracker.py: 'we encode encode the raw name bytes' - Lib/test/test_exception_group.py: 'Is is also used' -> 'It is also used' - Lib/test/test_unittest/testmock/testhelpers.py: 'isn't isn't callable'
1 parent f74cdf8 commit 2b1a5d4

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/difflib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This module provides classes and functions for comparing sequences.
1717
Most of them compare sequences of text lines (for example lists of strings,
1818
or :term:`file objects <file object>`) and
1919
produce :dfn:`diffs` -- reports on the differences.
20-
Diffs can be produced in in various formats, including HTML and context
20+
Diffs can be produced in various formats, including HTML and context
2121
and unified diffs -- formats produced by tools like
2222
:manpage:`diff <diff(1)>` and :manpage:`git diff <git-diff(1)>`.
2323

Lib/multiprocessing/resource_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def _send(self, cmd, name, rtype):
359359
# With json.dump(..., ensure_ascii=True) every non-ASCII byte becomes a 6-char
360360
# escape like \uDC80.
361361
# As we want the overall message to be kept atomic and therefore smaller than 512,
362-
# we encode encode the raw name bytes with URL-safe Base64 - so a 255 long name
362+
# we encode the raw name bytes with URL-safe Base64 - so a 255 long name
363363
# will not exceed 340 bytes.
364364
b = name.encode('utf-8', 'surrogateescape')
365365
if len(b) > 255:

Lib/test/test_exception_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def leaf_generator(exc, tbs=None):
583583

584584
class LeafGeneratorTest(unittest.TestCase):
585585
# The leaf_generator is mentioned in PEP 654 as a suggestion
586-
# on how to iterate over leaf nodes of an EG. Is is also
586+
# on how to iterate over leaf nodes of an EG. It is also
587587
# used below as a test utility. So we test it here.
588588

589589
def test_leaf_generator(self):

Lib/test/test_unittest/testmock/testhelpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ def f(self, y): pass
687687
self.assertRaises(TypeError, instance_mock.a, 'foo', 'bar')
688688
self.assertRaises(AttributeError, getattr, instance_mock, 'b')
689689

690-
# The return value isn't isn't callable
690+
# The return value isn't callable
691691
self.assertRaises(TypeError, instance_mock)
692692

693693
instance_mock.Bar.f(6)

0 commit comments

Comments
 (0)