Skip to content

Commit 488464f

Browse files
committed
FIx various typos
Found via `codespell -q 3 -S ./mypyc/external/googletest -L alo,ans,asend,ba,bre,dne,fo,haa,ist,larg,myu,nams,spawnve,statics,thow,ure,wont`
1 parent 2907a4d commit 488464f

File tree

17 files changed

+22
-22
lines changed

17 files changed

+22
-22
lines changed

docs/source/error_code_list.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ Check instantiation of abstract classes [abstract]
545545
--------------------------------------------------
546546

547547
Mypy generates an error if you try to instantiate an abstract base
548-
class (ABC). An abtract base class is a class with at least one
548+
class (ABC). An abstract base class is a class with at least one
549549
abstract method or attribute. (See also :py:mod:`abc` module documentation)
550550

551551
Sometimes a class is made accidentally abstract, often due to an

docs/source/extending_mypy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ when the configuration for a module changes, we want to invalidate
246246
mypy's cache for that module so that it can be rechecked. This hook
247247
should be used to report to mypy any relevant configuration data,
248248
so that mypy knows to recheck the module if the configuration changes.
249-
The hooks hould return data encodable as JSON.
249+
The hooks should return data encodable as JSON.
250250

251251
Notes about the semantic analyzer
252252
*********************************

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,7 @@ def check_final(self,
25582558
name = lv.node.name
25592559
cls = self.scope.active_class()
25602560
if cls is not None:
2561-
# Theses additional checks exist to give more error messages
2561+
# These additional checks exist to give more error messages
25622562
# even if the final attribute was overridden with a new symbol
25632563
# (which is itself an error)...
25642564
for base in cls.mro[1:]:

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ def set_strict_flags() -> None:
10101010
process_cache_map(parser, special_opts, options)
10111011

10121012
# An explicitly specified cache_fine_grained implies local_partial_types
1013-
# (because otherwise the cache is not compatiable with dmypy)
1013+
# (because otherwise the cache is not compatible with dmypy)
10141014
if options.cache_fine_grained:
10151015
options.local_partial_types = True
10161016

mypy/plugins/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def add_slots(self,
217217
)
218218
return
219219
if info.slots is not None or info.names.get('__slots__'):
220-
# This means we have a slots confict.
220+
# This means we have a slots conflict.
221221
# Class explicitly specifies `__slots__` field.
222222
# And `@dataclass(slots=True)` is used.
223223
# In runtime this raises a type error.

mypy/plugins/singledispatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def singledispatch_register_callback(ctx: MethodContext) -> Type:
123123
# TODO: check that there's only one argument
124124
first_arg_type = get_proper_type(get_first_arg(ctx.arg_types))
125125
if isinstance(first_arg_type, (CallableType, Overloaded)) and first_arg_type.is_type_obj():
126-
# HACK: We receieved a class as an argument to register. We need to be able
126+
# HACK: We received a class as an argument to register. We need to be able
127127
# to access the function that register is being applied to, and the typeshed definition
128128
# of register has it return a generic Callable, so we create a new
129129
# SingleDispatchRegisterCallable class, define a __call__ method, and then add a

mypy/semanal_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def process_top_level_function(analyzer: 'SemanticAnalyzer',
249249
"""Analyze single top-level function or method.
250250
251251
Process the body of the function (including nested functions) again and again,
252-
until all names have been resolved (ot iteration limit reached).
252+
until all names have been resolved (or iteration limit reached).
253253
"""
254254
# We need one more iteration after incomplete is False (e.g. to report errors, if any).
255255
final_iteration = False

mypy/server/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def not_found() -> None:
10771077
# A ClassDef target covers the body of the class and everything defined
10781078
# within it. To get the body we include the entire surrounding target,
10791079
# typically a module top-level, since we don't support processing class
1080-
# bodies as separate entitites for simplicity.
1080+
# bodies as separate entities for simplicity.
10811081
assert file is not None
10821082
if node.fullname != target:
10831083
# This is a reference to a different TypeInfo, likely due to a stale dependency.

mypy/typeshed/stdlib/@python2/__builtin__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class type(object):
121121
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
122122
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
123123
def __subclasses__(self: _TT) -> List[_TT]: ...
124-
# Note: the documentation doesnt specify what the return type is, the standard
124+
# Note: the documentation doesn't specify what the return type is, the standard
125125
# implementation seems to be returning a list.
126126
def mro(self) -> List[type]: ...
127127
def __instancecheck__(self, instance: Any) -> bool: ...

mypy/typeshed/stdlib/@python2/builtins.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class type(object):
121121
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
122122
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
123123
def __subclasses__(self: _TT) -> List[_TT]: ...
124-
# Note: the documentation doesnt specify what the return type is, the standard
124+
# Note: the documentation doesn't specify what the return type is, the standard
125125
# implementation seems to be returning a list.
126126
def mro(self) -> List[type]: ...
127127
def __instancecheck__(self, instance: Any) -> bool: ...

0 commit comments

Comments
 (0)