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

Skip to content

Commit b6c80e2

Browse files
xybAlexWaygood
andauthored
Fix typos in comments and docstring (#122720)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 98dba73 commit b6c80e2

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

Lib/enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __get__(self, instance, ownerclass=None):
207207
# use previous enum.property
208208
return self.fget(instance)
209209
elif self._attr_type == 'attr':
210-
# look up previous attibute
210+
# look up previous attribute
211211
return getattr(self._cls_type, self.name)
212212
elif self._attr_type == 'desc':
213213
# use previous descriptor

Lib/mimetypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def guess_type(self, url, strict=True):
151151
def guess_file_type(self, path, *, strict=True):
152152
"""Guess the type of a file based on its path.
153153
154-
Similar to guess_type(), but takes file path istead of URL.
154+
Similar to guess_type(), but takes file path instead of URL.
155155
"""
156156
path = os.fsdecode(path)
157157
path = os.path.splitdrive(path)[1]
@@ -325,7 +325,7 @@ def guess_type(url, strict=True):
325325
def guess_file_type(path, *, strict=True):
326326
"""Guess the type of a file based on its path.
327327
328-
Similar to guess_type(), but takes file path istead of URL.
328+
Similar to guess_type(), but takes file path instead of URL.
329329
"""
330330
if _db is None:
331331
init()

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def interaction(self, frame, tb_or_exc):
614614
# We should print the stack entry if and only if the user input
615615
# is expected, and we should print it right before the user input.
616616
# We achieve this by appending _pdbcmd_print_frame_status to the
617-
# command queue. If cmdqueue is not exausted, the user input is
617+
# command queue. If cmdqueue is not exhausted, the user input is
618618
# not expected and we will not print the stack entry.
619619
self.cmdqueue.append('_pdbcmd_print_frame_status')
620620
self._cmdloop()

Lib/shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _fastcopy_sendfile(fsrc, fdst):
149149
try:
150150
sent = os.sendfile(outfd, infd, offset, blocksize)
151151
except OSError as err:
152-
# ...in oder to have a more informative exception.
152+
# ...in order to have a more informative exception.
153153
err.filename = fsrc.name
154154
err.filename2 = fdst.name
155155

Lib/test/datetimetester.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3367,8 +3367,8 @@ def test_fromisoformat_fails_datetime(self):
33673367
'2009-04-19T12:', # Ends with time separator
33683368
'2009-04-19T12:30:', # Ends with time separator
33693369
'2009-04-19T12:30:45.', # Ends with time separator
3370-
'2009-04-19T12:30:45.123456+', # Ends with timzone separator
3371-
'2009-04-19T12:30:45.123456-', # Ends with timzone separator
3370+
'2009-04-19T12:30:45.123456+', # Ends with timezone separator
3371+
'2009-04-19T12:30:45.123456-', # Ends with timezone separator
33723372
'2009-04-19T12:30:45.123456-05:00a', # Extra text
33733373
'2009-04-19T12:30:45.123-05:00a', # Extra text
33743374
'2009-04-19T12:30:45-05:00a', # Extra text

Lib/test/test__interpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _run_output(interp, request):
4343
def _wait_for_interp_to_run(interp, timeout=None):
4444
# bpo-37224: Running this test file in multiprocesses will fail randomly.
4545
# The failure reason is that the thread can't acquire the cpu to
46-
# run subinterpreter eariler than the main thread in multiprocess.
46+
# run subinterpreter earlier than the main thread in multiprocess.
4747
if timeout is None:
4848
timeout = support.SHORT_TIMEOUT
4949
for _ in support.sleeping_retry(timeout, error=False):

Lib/test/test_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def test_byteswap(self):
14921492
if a.itemsize==1:
14931493
self.assertEqual(a, b)
14941494
else:
1495-
# On alphas treating the byte swapped bit patters as
1495+
# On alphas treating the byte swapped bit patterns as
14961496
# floats/doubles results in floating-point exceptions
14971497
# => compare the 8bit string values instead
14981498
self.assertNotEqual(a.tobytes(), b.tobytes())

Lib/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ def evaluate_forward_ref(
10541054
evaluating the forward reference. This parameter must be provided (though
10551055
it may be an empty tuple) if *owner* is not given and the forward reference
10561056
does not already have an owner set. *format* specifies the format of the
1057-
annotation and is a member of the annoations.Format enum.
1057+
annotation and is a member of the annotationlib.Format enum.
10581058
10591059
"""
10601060
if type_params is _sentinel:

Lib/uuid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def _get_command_stdout(command, *args):
374374
# for are actually localized, but in theory some system could do so.)
375375
env = dict(os.environ)
376376
env['LC_ALL'] = 'C'
377-
# Empty strings will be quoted by popen so we should just ommit it
377+
# Empty strings will be quoted by popen so we should just omit it
378378
if args != ('',):
379379
command = (executable, *args)
380380
else:

0 commit comments

Comments
 (0)