Skip to content

Commit 24f3ba0

Browse files
authored
Fixes typos in mypyc (#10800)
1 parent a9f3b5e commit 24f3ba0

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

mypyc/analysis/dataflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def analyze_live_regs(blocks: List[BasicBlock],
448448
MAYBE_ANALYSIS = 1
449449

450450

451-
# TODO the return type of this function is too complicated. Abtract it into its
451+
# TODO the return type of this function is too complicated. Abstract it into its
452452
# own class.
453453

454454
def run_analysis(blocks: List[BasicBlock],

mypyc/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def mypycify(
494494
setup_mypycify_vars()
495495

496496
# Create a compiler object so we can make decisions based on what
497-
# compiler is being used. typeshed is missing some attribues on the
497+
# compiler is being used. typeshed is missing some attributes on the
498498
# compiler object so we give it type Any
499499
compiler: Any = ccompiler.new_compiler()
500500
sysconfig.customize_compiler(compiler)

mypyc/codegen/emit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def emit_unbox(self,
635635
borrow: bool = False) -> None:
636636
"""Emit code for unboxing a value of given type (from PyObject *).
637637
638-
By default, assing error value to dest if the value has an
638+
By default, assign error value to dest if the value has an
639639
incompatible type and raise TypeError. These can be customized
640640
using 'error' and 'raise_exception'.
641641

mypyc/ir/class_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __init__(self, name: str, module_name: str, is_trait: bool = False,
145145
# base_mro is the chain of concrete (non-trait) ancestors
146146
self.base_mro: List[ClassIR] = [self]
147147

148-
# Direct subclasses of this class (use subclasses() to also incude non-direct ones)
148+
# Direct subclasses of this class (use subclasses() to also include non-direct ones)
149149
# None if separate compilation prevents this from working
150150
self.children: Optional[List[ClassIR]] = []
151151

mypyc/ir/func_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def all_values_full(args: List[Register], blocks: List[BasicBlock]) -> List[Valu
260260
for block in blocks:
261261
for op in block.ops:
262262
for source in op.sources():
263-
# Look for unitialized registers that are accessed. Ignore
263+
# Look for uninitialized registers that are accessed. Ignore
264264
# non-registers since we don't allow ops outside basic blocks.
265265
if isinstance(source, Register) and source not in seen_registers:
266266
values.append(source)

mypyc/ir/rtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def accept(self, visitor: 'RTypeVisitor[T]') -> T:
614614
return visitor.visit_rstruct(self)
615615

616616
def __str__(self) -> str:
617-
# if not tuple(unamed structs)
617+
# if not tuple(unnamed structs)
618618
return '%s{%s}' % (self.name, ', '.join(name + ":" + str(typ)
619619
for name, typ in zip(self.names, self.types)))
620620

mypyc/irbuild/classdef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def transform_class_def(builder: IRBuilder, cdef: ClassDef) -> None:
155155
non_ext_class
156156
], cdef.line)
157157

158-
# Cache any cachable class attributes
158+
# Cache any cacheable class attributes
159159
cache_class_attrs(builder, attrs_to_cache, cdef)
160160

161161

mypyc/irbuild/for_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def gen_step(self) -> None:
498498

499499
def gen_cleanup(self) -> None:
500500
# We set the branch to go here if the conditional evaluates to true. If
501-
# an exception was raised during the loop, then err_reg wil be set to
501+
# an exception was raised during the loop, then err_reg will be set to
502502
# True. If no_err_occurred_op returns False, then the exception will be
503503
# propagated using the ERR_FALSE flag.
504504
self.builder.call_c(no_err_occurred_op, [], self.line)

mypyc/lib-rt/pythonsupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ _PyDict_GetItemStringWithError(PyObject *v, const char *key)
322322

323323
#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION < 6
324324
/* _PyUnicode_EqualToASCIIString got added in 3.5.3 (argh!) so we can't actually know
325-
* whether it will be precent at runtime, so we just assume we don't have it in 3.5. */
325+
* whether it will be present at runtime, so we just assume we don't have it in 3.5. */
326326
#define CPyUnicode_EqualToASCIIString(x, y) (PyUnicode_CompareWithASCIIString((x), (y)) == 0)
327327
#elif PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6
328328
#define CPyUnicode_EqualToASCIIString(x, y) _PyUnicode_EqualToASCIIString(x, y)

mypyc/test/testutil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def use_custom_builtins(builtins_path: str, testcase: DataDrivenTestCase) -> Ite
5555
shutil.copyfile(builtins_path, builtins)
5656
default_builtins = True
5757

58-
# Actually peform the test case.
58+
# Actually perform the test case.
5959
try:
6060
yield None
6161
finally:
@@ -76,7 +76,7 @@ def perform_test(func: Callable[[DataDrivenTestCase], None],
7676
shutil.copyfile(builtins_path, builtins)
7777
default_builtins = True
7878

79-
# Actually peform the test case.
79+
# Actually perform the test case.
8080
func(testcase)
8181

8282
if default_builtins:

0 commit comments

Comments
 (0)