Skip to content

Commit

Permalink
Fix typos (#12495)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
luzpaz committed Mar 30, 2022
1 parent 7b2f861 commit 909ec85
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ method signature. E.g.:
The third line elicits an error because mypy sees the argument type
``bytes`` as a reference to the method by that name. Other than
renaming the method, a work-around is to use an alias:
renaming the method, a workaround is to use an alias:

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions docs/source/literal_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ You can use enums to annotate types as you would expect:
self.speed = speed
Movement(Direction.up, 5.0) # ok
Movement('up', 5.0) # E: Argument 1 to "Movemement" has incompatible type "str"; expected "Direction"
Movement('up', 5.0) # E: Argument 1 to "Movement" has incompatible type "str"; expected "Direction"
Exhaustiveness checking
***********************
Expand Down Expand Up @@ -505,7 +505,7 @@ the same way Python's runtime does:
left = 'left'
right = 'right'
- All ``Enum`` fields are implictly ``final`` as well.
- All ``Enum`` fields are implicitly ``final`` as well.

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion mypy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Since mypy still changes, the API was kept utterly simple and non-intrusive.
It just mimics command line activation without starting a new interpreter.
So the normal docs about the mypy command line apply.
Changes in the command line version of mypy will be immediately useable.
Changes in the command line version of mypy will be immediately usable.
Just import this module and then call the 'run' function with a parameter of
type List[str], containing what normally would have been the command line
Expand Down
2 changes: 1 addition & 1 deletion mypy/message_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def format(self, *args: object, **kwargs: object) -> "ErrorMessage":

# Enum
ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDEN: Final = ErrorMessage(
'Assigned "__members__" will be overriden by "Enum" internally'
'Assigned "__members__" will be overridden by "Enum" internally'
)

# ClassVar
Expand Down
2 changes: 1 addition & 1 deletion mypyc/doc/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Mypyc uses several techniques to produce fast code:
* Mypyc treats compiled functions, classes, and attributes declared
``Final`` as immutable.

* Mypyc has memory-efficient, unboxed representions for integers and
* Mypyc has memory-efficient, unboxed representations for integers and
booleans.

Development status
Expand Down
2 changes: 1 addition & 1 deletion mypyc/test-data/run-classes.test
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ class B(A):
def x(self, val : int) -> None:
self._x = val + 1

#Inerits base property setters and getters
# Inherits base property setters and getters
class C(A):
def __init__(self) -> None:
A.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion test-data/unit/check-enum.test
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ import typing
from enum import Enum

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

class OnlyAnnotatedMembers(Enum):
__members__: typing.Dict[Enum, Enum]
Expand Down
2 changes: 1 addition & 1 deletion test-data/unit/check-unions.test
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ reveal_type(u(1, C())) # N: Revealed type is "Union[__main__.C, builtins.int]"
reveal_type(u(1, a)) # N: Revealed type is "Union[Any, builtins.int]"
reveal_type(u(a, 1)) # N: Revealed type is "Union[builtins.int, Any]"

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

Expand Down

0 comments on commit 909ec85

Please sign in to comment.