Skip to content

Commit ecc13c8

Browse files
cdce8pcclauss
andauthored
Fix spelling (#18642)
Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 29ffa3e commit ecc13c8

19 files changed

+23
-23
lines changed

docs/source/generics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ similarly supported via generics (Python 3.12 syntax):
999999

10001000
.. code-block:: python
10011001
1002-
from colletions.abc import Callable
1002+
from collections.abc import Callable
10031003
from typing import Any
10041004
10051005
def route[F: Callable[..., Any]](url: str) -> Callable[[F], F]:

docs/source/more_types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ program:
390390
The ``summarize([])`` call matches both variants: an empty list could
391391
be either a ``list[int]`` or a ``list[str]``. In this case, mypy
392392
will break the tie by picking the first matching variant: ``output``
393-
will have an inferred type of ``float``. The implementor is responsible
393+
will have an inferred type of ``float``. The implementer is responsible
394394
for making sure ``summarize`` breaks ties in the same way at runtime.
395395

396396
However, there are two exceptions to the "pick the first match" rule.

docs/source/runtime_troubles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ libraries if types are generic only in stubs.
274274
Using types defined in stubs but not at runtime
275275
-----------------------------------------------
276276

277-
Sometimes stubs that you're using may define types you wish to re-use that do
277+
Sometimes stubs that you're using may define types you wish to reuse that do
278278
not exist at runtime. Importing these types naively will cause your code to fail
279279
at runtime with ``ImportError`` or ``ModuleNotFoundError``. Similar to previous
280280
sections, these can be dealt with by using :ref:`typing.TYPE_CHECKING

mypy/argmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def expand_actual_type(
220220
self.tuple_index += 1
221221
item = actual_type.items[self.tuple_index - 1]
222222
if isinstance(item, UnpackType) and not allow_unpack:
223-
# An upack item that doesn't have special handling, use upper bound as above.
223+
# An unpack item that doesn't have special handling, use upper bound as above.
224224
unpacked = get_proper_type(item.type)
225225
if isinstance(unpacked, TypeVarTupleType):
226226
fallback = get_proper_type(unpacked.upper_bound)

mypy/checkexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,7 @@ def combine_function_signatures(self, types: list[ProperType]) -> AnyType | Call
31843184
new_type_narrowers.append(target.type_is)
31853185

31863186
if new_type_guards and new_type_narrowers:
3187-
# They cannot be definined at the same time,
3187+
# They cannot be defined at the same time,
31883188
# declaring this function as too complex!
31893189
too_complex = True
31903190
union_type_guard = None

mypy/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def _infer_constraints(
385385
res = []
386386
for a_item in actual.items:
387387
# `orig_template` has to be preserved intact in case it's recursive.
388-
# If we unwraped ``type[...]`` previously, wrap the item back again,
388+
# If we unwrapped ``type[...]`` previously, wrap the item back again,
389389
# as ``type[...]`` can't be removed from `orig_template`.
390390
if type_type_unwrapped:
391391
a_item = TypeType.make_normalized(a_item)

mypy/inspections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def run_inspection(
564564
) -> dict[str, object]:
565565
"""Top-level logic to inspect expression(s) at a location.
566566
567-
This can be re-used by various simple inspections.
567+
This can be reused by various simple inspections.
568568
"""
569569
try:
570570
file, pos = parse_location(location)

mypy/join.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def join_tuples(self, s: TupleType, t: TupleType) -> list[Type] | None:
451451
return items
452452
return None
453453
if s_unpack_index is not None and t_unpack_index is not None:
454-
# The most complex case: both tuples have an upack item.
454+
# The most complex case: both tuples have an unpack item.
455455
s_unpack = s.items[s_unpack_index]
456456
assert isinstance(s_unpack, UnpackType)
457457
s_unpacked = get_proper_type(s_unpack.type)

mypy/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def are_type_names_disabled(self) -> bool:
215215
def prefer_simple_messages(self) -> bool:
216216
"""Should we generate simple/fast error messages?
217217
218-
If errors aren't shown to the user, we don't want to waste cyles producing
218+
If errors aren't shown to the user, we don't want to waste cycles producing
219219
complex error messages.
220220
"""
221221
return self.errors.prefer_simple_messages()

mypy/semanal_namedtuple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def check_namedtuple_classdef(
198198
# Something is incomplete. We need to defer this named tuple.
199199
return None
200200
types.append(analyzed)
201-
# ...despite possible minor failures that allow further analyzis.
201+
# ...despite possible minor failures that allow further analysis.
202202
if name.startswith("_"):
203203
self.fail(
204204
f"NamedTuple field name cannot start with an underscore: {name}", stmt

0 commit comments

Comments
 (0)