Skip to content

Commit eb50379

Browse files
authored
Sort mypy.options.PER_MODULE_OPTIONS and fix typo (#9469)
1 parent f632cbd commit eb50379

18 files changed

+21
-21
lines changed

docs/source/error_code_list.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Example:
2525
def __init__(self, name: str) -> None:
2626
self.name = name
2727
28-
r = Resouce('x')
28+
r = Resource('x')
2929
print(r.name) # OK
3030
print(r.id) # Error: "Resource" has no attribute "id" [attr-defined]
3131
r.id = 5 # Error: "Resource" has no attribute "id" [attr-defined]

docs/source/literal_types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ type. Then, you can discriminate between each kind of TypedDict by checking the
256256
print(event["job_id"])
257257
258258
While this feature is mostly useful when working with TypedDicts, you can also
259-
use the same technique wih regular objects, tuples, or namedtuples.
259+
use the same technique with regular objects, tuples, or namedtuples.
260260

261261
Similarly, tags do not need to be specifically str Literals: they can be any type
262262
you can normally narrow within ``if`` statements and the like. For example, you

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5460,7 +5460,7 @@ def visit_uninhabited_type(self, t: UninhabitedType) -> Type:
54605460
return t
54615461

54625462
def visit_type_alias_type(self, t: TypeAliasType) -> Type:
5463-
# Target of the alias cannot by an ambigous <nothing>, so we just
5463+
# Target of the alias cannot by an ambiguous <nothing>, so we just
54645464
# replace the arguments.
54655465
return t.copy_modified(args=[a.accept(self) for a in t.args])
54665466

mypy/options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ class BuildType:
2121

2222
PER_MODULE_OPTIONS = {
2323
# Please keep this list sorted
24-
"allow_untyped_globals",
2524
"allow_redefinition",
26-
"strict_equality",
25+
"allow_untyped_globals",
2726
"always_false",
2827
"always_true",
2928
"check_untyped_defs",
@@ -42,11 +41,12 @@ class BuildType:
4241
"follow_imports_for_stubs",
4342
"ignore_errors",
4443
"ignore_missing_imports",
44+
"implicit_reexport",
4545
"local_partial_types",
4646
"mypyc",
4747
"no_implicit_optional",
48-
"implicit_reexport",
4948
"show_none_errors",
49+
"strict_equality",
5050
"strict_optional",
5151
"strict_optional_whitelist",
5252
"warn_no_return",

mypy/renaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def flush_refs(self) -> None:
249249
is_func = self.scope_kinds[-1] == FUNCTION
250250
for name, refs in self.refs[-1].items():
251251
if len(refs) == 1:
252-
# Only one definition -- no renaming neeed.
252+
# Only one definition -- no renaming needed.
253253
continue
254254
if is_func:
255255
# In a function, don't rename the first definition, as it

mypy/test/testinfer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def test_single_pair(self) -> None:
452452

453453
def test_empty_pair_list(self) -> None:
454454
# This case should never occur in practice -- ComparisionExprs
455-
# always contain at least one comparision. But in case it does...
455+
# always contain at least one comparison. But in case it does...
456456

457457
self.assertEqual(group_comparison_operands([], {}, set()), [])
458458
self.assertEqual(group_comparison_operands([], {}, {'=='}), [])

mypyc/doc/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ arbitary third-party libraries, including C extensions.
116116
often requires only minor changes to compile using mypyc.
117117

118118
**No need to wait for compilation.** Compiled code also runs as normal
119-
Python code. You can use intepreted Python during development, with
119+
Python code. You can use interpreted Python during development, with
120120
familiar workflows.
121121

122122
**Runtime type safety.** Mypyc aims to protect you from segfaults and

mypyc/ir/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def accept(self, visitor: 'OpVisitor[T]') -> T:
567567

568568

569569
class DecRef(RegisterOp):
570-
"""Decrease referece count and free object if zero (dec_ref r).
570+
"""Decrease reference count and free object if zero (dec_ref r).
571571
572572
The is_xdec flag says to use an XDECREF, which checks if the
573573
pointer is NULL first.

mypyc/ir/rtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class RVoid(RType):
132132
"""The void type (no value).
133133
134134
This is a singleton -- use void_rtype (below) to refer to this instead of
135-
constructing a new instace.
135+
constructing a new instance.
136136
"""
137137

138138
is_unboxed = False
@@ -515,7 +515,7 @@ def compute_aligned_offsets_and_size(types: List[RType]) -> Tuple[List[int], int
515515
current_offset += cur_size
516516
next_alignment = alignments[i + 1]
517517
# compute aligned offset,
518-
# check https://en.wikipedia.org/wiki/Data_structure_alignment for more infomation
518+
# check https://en.wikipedia.org/wiki/Data_structure_alignment for more information
519519
current_offset = (current_offset + (next_alignment - 1)) & -next_alignment
520520
else:
521521
struct_alignment = max(alignments)

mypyc/test-data/run-classes.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ class B(A):
10591059
return 10
10601060

10611061
# This is just to make sure that this stuff works even when the
1062-
# methods might be overriden.
1062+
# methods might be overridden.
10631063
class C(B):
10641064
@classmethod
10651065
def foo(cls, *, y: int = 0, x: int = 0) -> None:

0 commit comments

Comments
 (0)