From af1029f9e3ec1b28eb138725a218a6474d758c1e Mon Sep 17 00:00:00 2001 From: William Bruns Date: Fri, 18 Sep 2026 02:18:15 +0000 Subject: [PATCH] just fixing some typos in comments or test case names --- mypy/binder.py | 2 +- mypy/test/data.py | 2 +- mypyc/doc/dev-intro.md | 2 +- mypyc/doc/future.md | 2 +- .../googletest/include/gtest/internal/gtest-filepath.h | 2 +- .../googletest/include/gtest/internal/gtest-internal.h | 2 +- mypyc/ir/pprint.py | 2 +- mypyc/lib-rt/list_ops.c | 2 +- mypyc/transform/refcount.py | 2 +- test-data/unit/check-formatting.test | 2 +- test-data/unit/check-protocols.test | 4 ++-- test-data/unit/check-redefine2.test | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mypy/binder.py b/mypy/binder.py index 20e50f3c97e6..fb35d96b7ae7 100644 --- a/mypy/binder.py +++ b/mypy/binder.py @@ -57,7 +57,7 @@ class Frame: operations. It also records whether it is possible to reach that point at all. - We add a new frame wherenever there is a new scope or control flow + We add a new frame whenever there is a new scope or control flow branching. This information is not copied into a new Frame when it is pushed diff --git a/mypy/test/data.py b/mypy/test/data.py index 989a39a0297b..574a343fa3f3 100644 --- a/mypy/test/data.py +++ b/mypy/test/data.py @@ -426,7 +426,7 @@ def find_steps(self) -> list[list[FileOperation]]: second step, etc. Each operation can either be a file modification/creation (UpdateFile) or deletion (DeleteFile). - Defaults to having two steps if there aern't any operations. + Defaults to having two steps if there aren't any operations. """ return self.steps diff --git a/mypyc/doc/dev-intro.md b/mypyc/doc/dev-intro.md index 5b248214a3eb..5dfaf8487776 100644 --- a/mypyc/doc/dev-intro.md +++ b/mypyc/doc/dev-intro.md @@ -368,7 +368,7 @@ def test_concat_empty_lists() -> None: There is one test case, `testConcatenateLists`. It has two sub-cases, `test_concat_lists` and `test_concat_empty_lists`. Note that you can -use the pytest -k argument to only run `testConcetanateLists`, but you +use the pytest -k argument to only run `testConcatenateLists`, but you can't filter tests at the sub-case level. It's recommended to have multiple sub-cases per test case, since each diff --git a/mypyc/doc/future.md b/mypyc/doc/future.md index 2d8a454e94a0..c60275a104ac 100644 --- a/mypyc/doc/future.md +++ b/mypyc/doc/future.md @@ -19,7 +19,7 @@ replaced with more efficient operations. Examples: intermediate single-character string object `s[i]` but just compare the character value to `ord('x')`. -* `a + ':' + b` (two string concetenations) can be implemented as +* `a + ':' + b` (two string concatenations) can be implemented as single three-operand concatenation that doesn't construct an intermediate object. diff --git a/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h b/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h index 7a13b4b0de60..184450686c51 100644 --- a/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h +++ b/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h @@ -192,7 +192,7 @@ class GTEST_API_ FilePath { void Normalize(); - // Returns a pointer to the last occurence of a valid path separator in + // Returns a pointer to the last occurrence of a valid path separator in // the FilePath. On Windows, for example, both '/' and '\' are valid path // separators. Returns NULL if no path separator was found. const char* FindLastPathSeparator() const; diff --git a/mypyc/external/googletest/include/gtest/internal/gtest-internal.h b/mypyc/external/googletest/include/gtest/internal/gtest-internal.h index ebd1cf615de0..422654b5f19a 100644 --- a/mypyc/external/googletest/include/gtest/internal/gtest-internal.h +++ b/mypyc/external/googletest/include/gtest/internal/gtest-internal.h @@ -476,7 +476,7 @@ class TestFactoryBase { GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); }; -// This class provides implementation of TeastFactoryBase interface. +// This class provides implementation of TestFactoryBase interface. // It is used in TEST and TEST_F macros. template class TestFactoryImpl : public TestFactoryBase { diff --git a/mypyc/ir/pprint.py b/mypyc/ir/pprint.py index 734426ca42de..7ec89e934f0a 100644 --- a/mypyc/ir/pprint.py +++ b/mypyc/ir/pprint.py @@ -432,7 +432,7 @@ def format_blocks( and not source_to_error.get(ops[-1], []) ): # Hide the last goto if it just goes to the next basic block, - # and there are no assocatiated errors with the op. + # and there are no associated errors with the op. ops = ops[:-1] for op in ops: line = " " + op.accept(visitor) diff --git a/mypyc/lib-rt/list_ops.c b/mypyc/lib-rt/list_ops.c index e8fd061ada68..c0c6ece9da15 100644 --- a/mypyc/lib-rt/list_ops.c +++ b/mypyc/lib-rt/list_ops.c @@ -283,7 +283,7 @@ PyObject *CPyList_PopLast(PyObject *list) Py_ssize_t index = PyList_GET_SIZE(list) - 1; return list_pop_index(list, index); #else - // I tried a specalized version of pop_impl for just removing the + // I tried a specialized version of pop_impl for just removing the // last element and it wasn't any faster in microbenchmarks than // the generic one so I ditched it. return list_pop_impl((PyListObject *)list, -1); diff --git a/mypyc/transform/refcount.py b/mypyc/transform/refcount.py index beacb409edfb..c37f17a949a3 100644 --- a/mypyc/transform/refcount.py +++ b/mypyc/transform/refcount.py @@ -1,4 +1,4 @@ -"""Transformation for inserting refrecence count inc/dec opcodes. +"""Transformation for inserting reference count inc/dec opcodes. This transformation happens towards the end of compilation. Before this transformation, reference count management is not explicitly handled at all. diff --git a/test-data/unit/check-formatting.test b/test-data/unit/check-formatting.test index 204445440016..6ff01f499fbf 100644 --- a/test-data/unit/check-formatting.test +++ b/test-data/unit/check-formatting.test @@ -485,7 +485,7 @@ class D(bytes): '{}'.format(D()) [builtins fixtures/primitives.pyi] -[case testNoSpuriousFormattingErrorsDuringFailedOverlodMatch] +[case testNoSpuriousFormattingErrorsDuringFailedOverloadMatch] from typing import overload, Callable @overload diff --git a/test-data/unit/check-protocols.test b/test-data/unit/check-protocols.test index 6e86507eb48d..7d1eec6cc9cb 100644 --- a/test-data/unit/check-protocols.test +++ b/test-data/unit/check-protocols.test @@ -667,7 +667,7 @@ def fun4(x: U, y: P[U, U]) -> U: pass reveal_type(fun4('a', C())) # N: Revealed type is "builtins.object" -[case testUnrealtedGenericProtocolsEquivalent] +[case testUnrelatedGenericProtocolsEquivalent] from typing import TypeVar, Protocol T = TypeVar('T') @@ -954,7 +954,7 @@ if int(): [builtins fixtures/list.pyi] [typing fixtures/typing-medium.pyi] -[case testMutuallyRecursiveProtocolsTypesWithSubteMismatch] +[case testMutuallyRecursiveProtocolsTypesWithSubtleMismatch] from typing import Protocol, Sequence, List class P1(Protocol): diff --git a/test-data/unit/check-redefine2.test b/test-data/unit/check-redefine2.test index 2af6959dd21a..b7c4e17183c1 100644 --- a/test-data/unit/check-redefine2.test +++ b/test-data/unit/check-redefine2.test @@ -657,7 +657,7 @@ def f3(x) -> None: reveal_type(x) # N: Revealed type is "builtins.int" reveal_type(x) # N: Revealed type is "Any | builtins.int" -[case tetNewRedefineDel] +[case testNewRedefineDel] # flags: --allow-redefinition def f1() -> None: x = ""