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: ...

mypy/typeshed/stdlib/builtins.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class type(object):
153153
def __new__(cls: Type[_TT], name: str, bases: Tuple[type, ...], namespace: dict[str, Any], **kwds: Any) -> _TT: ...
154154
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
155155
def __subclasses__(self: _TT) -> list[_TT]: ...
156-
# Note: the documentation doesnt specify what the return type is, the standard
156+
# Note: the documentation doesn't specify what the return type is, the standard
157157
# implementation seems to be returning a list.
158158
def mro(self) -> list[type]: ...
159159
def __instancecheck__(self, instance: Any) -> bool: ...

mypy/typeshed/stdlib/multiprocessing/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ _SemaphoreType = synchronize.Semaphore
5353
# multiprocessing.context.BaseContext's methods, so the two signatures should
5454
# be identical (modulo self).
5555

56-
# Sychronization primitives
56+
# Synchronization primitives
5757
_LockLike = Union[synchronize.Lock, synchronize.RLock]
5858
RawValue = context._default_context.RawValue
5959
RawArray = context._default_context.RawArray

mypy/typeshed/stdlib/os/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class PathLike(Protocol[_AnyStr_co]):
315315
_FdOrAnyPath = Union[int, StrOrBytesPath]
316316

317317
class DirEntry(Generic[AnyStr]):
318-
# This is what the scandir interator yields
318+
# This is what the scandir iterator yields
319319
# The constructor is hidden
320320

321321
name: AnyStr

mypy/typeshed/stdlib/tkinter/__init__.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ class Pack:
730730
forget = pack_forget
731731
propagate = Misc.pack_propagate
732732
# commented out to avoid mypy getting confused with multiple
733-
# inheritance and how things get overrided with different things
733+
# inheritance and how things get overridden with different things
734734
# info = pack_info
735735
# pack_propagate = Misc.pack_propagate
736736
# configure = pack_configure
@@ -774,7 +774,7 @@ class Place:
774774
place = place_configure
775775
info = place_info
776776
# commented out to avoid mypy getting confused with multiple
777-
# inheritance and how things get overrided with different things
777+
# inheritance and how things get overridden with different things
778778
# config = place_configure
779779
# configure = place_configure
780780
# forget = place_forget
@@ -816,7 +816,7 @@ class Grid:
816816
location = Misc.grid_location
817817
size = Misc.grid_size
818818
# commented out to avoid mypy getting confused with multiple
819-
# inheritance and how things get overrided with different things
819+
# inheritance and how things get overridden with different things
820820
# bbox = Misc.grid_bbox
821821
# grid_bbox = Misc.grid_bbox
822822
# forget = grid_forget
@@ -2960,7 +2960,7 @@ class OptionMenu(Menubutton):
29602960
command: Callable[[StringVar], Any] | None = ...,
29612961
) -> None: ...
29622962
# configure, config, cget are inherited from Menubutton
2963-
# destroy and __getitem__ are overrided, signature does not change
2963+
# destroy and __getitem__ are overridden, signature does not change
29642964

29652965
class _Image(Protocol):
29662966
tk: _tkinter.TkappType

mypy/typeshed/stdlib/tkinter/ttk.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ class LabeledScale(Frame):
11221122
compound: Literal["top"] | Literal["bottom"] = ...,
11231123
**kw: Any,
11241124
) -> None: ...
1125-
# destroy is overrided, signature does not change
1125+
# destroy is overridden, signature does not change
11261126
value: Any
11271127

11281128
class OptionMenu(Menubutton):
@@ -1138,5 +1138,5 @@ class OptionMenu(Menubutton):
11381138
command: Callable[[tkinter.StringVar], Any] | None = ...,
11391139
) -> None: ...
11401140
# configure, config, cget, destroy are inherited from Menubutton
1141-
# destroy and __setitem__ are overrided, signature does not change
1141+
# destroy and __setitem__ are overridden, signature does not change
11421142
def set_menu(self, default: Any | None = ..., *values): ...

test-data/stdlib-samples/3.2/shutil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ReadError(EnvironmentError):
5858
"""Raised when an archive cannot be read"""
5959

6060
class RegistryError(Exception):
61-
"""Raised when a registery operation with the archiving
61+
"""Raised when a registry operation with the archiving
6262
and unpacking registeries fails"""
6363

6464

@@ -676,7 +676,7 @@ def register_unpack_format(name: str, extensions: List[str], function: Any,
676676
_UNPACK_FORMATS[name] = extensions, function, extra_args, description
677677

678678
def unregister_unpack_format(name: str) -> None:
679-
"""Removes the pack format from the registery."""
679+
"""Removes the pack format from the registry."""
680680
del _UNPACK_FORMATS[name]
681681

682682
def _ensure_directory(path: str) -> None:

test-data/unit/hacks.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ y = '' # This could be valid if a new 'y' is defined here
3939
```
4040

4141
Note that some of the checks may turn out to be redundant, as the
42-
exact rules for what constitues a redefinition are still up for
42+
exact rules for what constitutes a redefinition are still up for
4343
debate. This is okay since the extra if statements generally don't
4444
otherwise affect semantics.
4545

0 commit comments

Comments
 (0)