Skip to content

Commit 924f818

Browse files
authored
Fix typos (#18317)
Found few misspellings. Please help me if it comes to deprecation or failing tests. This is the best spellchecker out there: https://github.com/crate-ci/typos
1 parent 0901689 commit 924f818

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+106
-106
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ This was contributed by Marc Mueller (PR [18014](https://github.com/python/mypy/
184184
* Improve contributor documentation for Windows (ag-tafe, PR [18097](https://github.com/python/mypy/pull/18097))
185185
* Correct note about `--disallow-any-generics` flag in documentation (Abel Sen, PR [18055](https://github.com/python/mypy/pull/18055))
186186
* Further caution against `--follow-imports=skip` (Shantanu, PR [18048](https://github.com/python/mypy/pull/18048))
187-
* Fix the edit page buttton link in documentation (Kanishk Pachauri, PR [17933](https://github.com/python/mypy/pull/17933))
187+
* Fix the edit page button link in documentation (Kanishk Pachauri, PR [17933](https://github.com/python/mypy/pull/17933))
188188

189189
### Other Notables Fixes and Improvements
190190

@@ -751,7 +751,7 @@ This feature was contributed by Jukka Lehtosalo (PR [17404](https://github.com/p
751751

752752
### Mypyc Improvements
753753

754-
Mypyc now supports the new syntax for generics introduced in Python 3.12 (see above). Another notable improvement is signficantly faster basic operations on `int` values.
754+
Mypyc now supports the new syntax for generics introduced in Python 3.12 (see above). Another notable improvement is significantly faster basic operations on `int` values.
755755

756756
* Support Python 3.12 syntax for generic functions and classes (Jukka Lehtosalo, PR [17357](https://github.com/python/mypy/pull/17357))
757757
* Support Python 3.12 type alias syntax (Jukka Lehtosalo, PR [17384](https://github.com/python/mypy/pull/17384))

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ articulated in the [Python Community Code of Conduct](https://www.python.org/psf
1818

1919
#### (1) Fork the mypy repository
2020

21-
Within Github, navigate to <https://github.com/python/mypy> and fork the repository.
21+
Within GitHub, navigate to <https://github.com/python/mypy> and fork the repository.
2222

2323
#### (2) Clone the mypy repository and enter into it
2424

docs/source/common_issues.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ type check such code. Consider this example:
757757
x: int = 'abc' # Unreachable -- no error
758758
759759
It's easy to see that any statement after ``return`` is unreachable,
760-
and hence mypy will not complain about the mis-typed code below
760+
and hence mypy will not complain about the mistyped code below
761761
it. For a more subtle example, consider this code:
762762

763763
.. code-block:: python

misc/docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Why use Docker?
1212
Mypyc tests can be significantly faster in a Docker container than
1313
running natively on macOS.
1414

15-
Also, if it's inconvient to install the necessary dependencies on the
15+
Also, if it's inconvenient to install the necessary dependencies on the
1616
host operating system, or there are issues getting some tests to pass
1717
on the host operating system, using a container can be an easy
1818
workaround.

misc/trigger_wheel_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Trigger a build of mypyc compiled mypy wheels by updating the mypy
44
# submodule in the git repo that drives those builds.
55

6-
# $WHEELS_PUSH_TOKEN is stored in Github Settings and is an API token
6+
# $WHEELS_PUSH_TOKEN is stored in GitHub Settings and is an API token
77
# for the mypy-build-bot account.
88

99
git config --global user.email "nobody"

mypy/checker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,7 @@ def check_enum(self, defn: ClassDef) -> None:
25972597
if isinstance(sym.node, Var) and sym.node.has_explicit_value:
25982598
# `__members__` will always be overwritten by `Enum` and is considered
25992599
# read-only so we disallow assigning a value to it
2600-
self.fail(message_registry.ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDEN, sym.node)
2600+
self.fail(message_registry.ENUM_MEMBERS_ATTR_WILL_BE_OVERRIDDEN, sym.node)
26012601
for base in defn.info.mro[1:-1]: # we don't need self and `object`
26022602
if base.is_enum and base.fullname not in ENUM_BASES:
26032603
self.check_final_enum(defn, base)
@@ -3645,7 +3645,7 @@ def is_assignable_slot(self, lvalue: Lvalue, typ: Type | None) -> bool:
36453645

36463646
typ = get_proper_type(typ)
36473647
if typ is None or isinstance(typ, AnyType):
3648-
return True # Any can be literally anything, like `@propery`
3648+
return True # Any can be literally anything, like `@property`
36493649
if isinstance(typ, Instance):
36503650
# When working with instances, we need to know if they contain
36513651
# `__set__` special method. Like `@property` does.
@@ -8524,7 +8524,7 @@ def group_comparison_operands(
85248524
85258525
x0 == x1 == x2 < x3 < x4 is x5 is x6 is not x7 is not x8
85268526
8527-
If we get these expressions in a pairwise way (e.g. by calling ComparisionExpr's
8527+
If we get these expressions in a pairwise way (e.g. by calling ComparisonExpr's
85288528
'pairwise()' method), we get the following as input:
85298529
85308530
[('==', x0, x1), ('==', x1, x2), ('<', x2, x3), ('<', x3, x4),

mypy/checkexpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def validate_typeddict_kwargs(
844844
# Having an optional key not explicitly declared by a ** unpacked
845845
# TypedDict is unsafe, it may be an (incompatible) subtype at runtime.
846846
# TODO: catch the cases where a declared key is overridden by a subsequent
847-
# ** item without it (and not again overriden with complete ** item).
847+
# ** item without it (and not again overridden with complete ** item).
848848
self.msg.non_required_keys_absent_with_star(absent_keys, last_star_found)
849849
return result, always_present_keys
850850

@@ -5349,7 +5349,7 @@ def visit_lambda_expr(self, e: LambdaExpr) -> Type:
53495349
can_skip=True, fall_through=0
53505350
), self.chk.scope.push_function(e):
53515351
# Lambdas can have more than one element in body,
5352-
# when we add "fictional" AssigmentStatement nodes, like in:
5352+
# when we add "fictional" AssignmentStatement nodes, like in:
53535353
# `lambda (a, b): a`
53545354
for stmt in e.body.body[:-1]:
53555355
stmt.accept(self.chk)

mypy/dmypy_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def refresh_file(module: str, path: str) -> list[str]:
714714
find_changes_time=t1 - t0,
715715
fg_update_time=t2 - t1,
716716
refresh_suppressed_time=t3 - t2,
717-
find_added_supressed_time=t4 - t3,
717+
find_added_suppressed_time=t4 - t3,
718718
cleanup_time=t5 - t4,
719719
)
720720

mypy/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Errors:
268268
show_column_numbers: bool = False
269269

270270
# Set to True to show end line and end column in error messages.
271-
# Ths implies `show_column_numbers`.
271+
# This implies `show_column_numbers`.
272272
show_error_end: bool = False
273273

274274
# Set to True to show absolute file paths in error messages.

mypy/inspections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def expr_attrs(self, expression: Expression) -> tuple[str, bool]:
335335
node = expression.node
336336
names = sorted(node.names)
337337
if "__builtins__" in names:
338-
# This is just to make tests stable. No one will really need ths name.
338+
# This is just to make tests stable. No one will really need this name.
339339
names.remove("__builtins__")
340340
mod_dict = {f'"<{node.fullname}>"': [f'"{name}"' for name in names]}
341341
else:

0 commit comments

Comments
 (0)