Skip to content

Commit 909ec85

Browse files
authored
Fix typos (#12495)
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,whet,wont,zar`
1 parent 7b2f861 commit 909ec85

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

docs/source/common_issues.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ method signature. E.g.:
607607
608608
The third line elicits an error because mypy sees the argument type
609609
``bytes`` as a reference to the method by that name. Other than
610-
renaming the method, a work-around is to use an alias:
610+
renaming the method, a workaround is to use an alias:
611611

612612
.. code-block:: python
613613

docs/source/literal_types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ You can use enums to annotate types as you would expect:
431431
self.speed = speed
432432
433433
Movement(Direction.up, 5.0) # ok
434-
Movement('up', 5.0) # E: Argument 1 to "Movemement" has incompatible type "str"; expected "Direction"
434+
Movement('up', 5.0) # E: Argument 1 to "Movement" has incompatible type "str"; expected "Direction"
435435
436436
Exhaustiveness checking
437437
***********************
@@ -505,7 +505,7 @@ the same way Python's runtime does:
505505
left = 'left'
506506
right = 'right'
507507
508-
- All ``Enum`` fields are implictly ``final`` as well.
508+
- All ``Enum`` fields are implicitly ``final`` as well.
509509

510510
.. code-block:: python
511511

mypy/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Since mypy still changes, the API was kept utterly simple and non-intrusive.
44
It just mimics command line activation without starting a new interpreter.
55
So the normal docs about the mypy command line apply.
6-
Changes in the command line version of mypy will be immediately useable.
6+
Changes in the command line version of mypy will be immediately usable.
77
88
Just import this module and then call the 'run' function with a parameter of
99
type List[str], containing what normally would have been the command line

mypy/message_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def format(self, *args: object, **kwargs: object) -> "ErrorMessage":
211211

212212
# Enum
213213
ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDEN: Final = ErrorMessage(
214-
'Assigned "__members__" will be overriden by "Enum" internally'
214+
'Assigned "__members__" will be overridden by "Enum" internally'
215215
)
216216

217217
# ClassVar

mypyc/doc/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Mypyc uses several techniques to produce fast code:
139139
* Mypyc treats compiled functions, classes, and attributes declared
140140
``Final`` as immutable.
141141

142-
* Mypyc has memory-efficient, unboxed representions for integers and
142+
* Mypyc has memory-efficient, unboxed representations for integers and
143143
booleans.
144144

145145
Development status

mypyc/test-data/run-classes.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ class B(A):
18161816
def x(self, val : int) -> None:
18171817
self._x = val + 1
18181818

1819-
#Inerits base property setters and getters
1819+
# Inherits base property setters and getters
18201820
class C(A):
18211821
def __init__(self) -> None:
18221822
A.__init__(self)

test-data/unit/check-enum.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ import typing
20642064
from enum import Enum
20652065

20662066
class WritingMembers(Enum):
2067-
__members__: typing.Dict[Enum, Enum] = {} # E: Assigned "__members__" will be overriden by "Enum" internally
2067+
__members__: typing.Dict[Enum, Enum] = {} # E: Assigned "__members__" will be overridden by "Enum" internally
20682068

20692069
class OnlyAnnotatedMembers(Enum):
20702070
__members__: typing.Dict[Enum, Enum]

test-data/unit/check-unions.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ reveal_type(u(1, C())) # N: Revealed type is "Union[__main__.C, builtins.int]"
273273
reveal_type(u(1, a)) # N: Revealed type is "Union[Any, builtins.int]"
274274
reveal_type(u(a, 1)) # N: Revealed type is "Union[builtins.int, Any]"
275275

276-
# Any and base-class-Any, no simplificaiton
276+
# Any and base-class-Any, no simplification
277277
reveal_type(u(C(), a)) # N: Revealed type is "Union[Any, __main__.C]"
278278
reveal_type(u(a, C())) # N: Revealed type is "Union[__main__.C, Any]"
279279

0 commit comments

Comments
 (0)