From 3c26b44cccfeea354e98d07a38eceb324acf1ec4 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 14:55:41 +0000 Subject: [PATCH 01/17] Add pinned dev version of ast_serialize to CI --- .github/workflows/test.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92aa38f437db4..f071795845053 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -213,6 +213,28 @@ jobs: pip install -r test-requirements.txt CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e . + # To speed-up process until ast_serialize is on PyPI. + - name: Checkout pinned ast_serialize + uses: actions/checkout@v4 + with: + persist-credentials: false + repository: mypyc/ast_serialize + ref: 038d30db8c3428310a5d69c151feeebf31160a08 + path: ast_serialize + + - run: | + cd ast_serialize + + - name: Install development version of ast_serialize + uses: PyO3/maturin-action@v1 + with: + command: develop + args: --release + + - run: | + cd .. + python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' + - name: Setup tox environment run: | tox run -e ${{ matrix.toxenv }} --notest From 51fa0edd31ff433bb12b336ffdc0c24a4a38fb53 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:22:00 +0000 Subject: [PATCH 02/17] Try a different way --- .github/workflows/test.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f071795845053..92b22b3a9d0d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -215,6 +215,7 @@ jobs: # To speed-up process until ast_serialize is on PyPI. - name: Checkout pinned ast_serialize + if: ${{ matrix.os == 'ubuntu-24.04-arm' }} uses: actions/checkout@v4 with: persist-credentials: false @@ -222,16 +223,21 @@ jobs: ref: 038d30db8c3428310a5d69c151feeebf31160a08 path: ast_serialize - - run: | + - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} + run: | cd ast_serialize - name: Install development version of ast_serialize + іf: ${{ matrix.os == 'ubuntu-24.04-arm' }} uses: PyO3/maturin-action@v1 with: - command: develop - args: --release + target: aarch64 + args: --release --out dist - - run: | + - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} + run: | + ls dist + pip install dist/* cd .. python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' From 28396a14ed8a3ff0d260d42b8a0d211aa3ceb008 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:29:31 +0000 Subject: [PATCH 03/17] Hm... --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92b22b3a9d0d2..0753366642afc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -227,8 +227,7 @@ jobs: run: | cd ast_serialize - - name: Install development version of ast_serialize - іf: ${{ matrix.os == 'ubuntu-24.04-arm' }} + - іf: ${{ matrix.os == 'ubuntu-24.04-arm' }} uses: PyO3/maturin-action@v1 with: target: aarch64 From 55a22eb0f77e300905aee5dffa0ffe82802123cc Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:32:19 +0000 Subject: [PATCH 04/17] I have no idea how I did this --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0753366642afc..a857f264023dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -227,7 +227,7 @@ jobs: run: | cd ast_serialize - - іf: ${{ matrix.os == 'ubuntu-24.04-arm' }} + - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} uses: PyO3/maturin-action@v1 with: target: aarch64 From f415ee79dcbe064481fc69621106c4d29d71a7d3 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:36:47 +0000 Subject: [PATCH 05/17] Try doing it normally --- .github/workflows/test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a857f264023dc..3b8b2244917f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -223,21 +223,17 @@ jobs: ref: 038d30db8c3428310a5d69c151feeebf31160a08 path: ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} - run: | - cd ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} uses: PyO3/maturin-action@v1 with: target: aarch64 args: --release --out dist + working-directory: ast_serialize - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} run: | ls dist pip install dist/* - cd .. python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' - name: Setup tox environment From ab4dadb995f8351a2efd7d19bb66ea6f5065de75 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:41:23 +0000 Subject: [PATCH 06/17] Again --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b8b2244917f4..8d82cb32592b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -232,8 +232,7 @@ jobs: - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} run: | - ls dist - pip install dist/* + pip install ast_serialize/dist/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' - name: Setup tox environment From 25096574fd8151f3dfd260582c586e55e0baf61f Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:44:09 +0000 Subject: [PATCH 07/17] Too many dist --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d82cb32592b8..d7d25f7f0e198 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -232,7 +232,7 @@ jobs: - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} run: | - pip install ast_serialize/dist/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl + pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' - name: Setup tox environment From b9e7cd07e0b73931c99a2c43b0218272379389b6 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:48:15 +0000 Subject: [PATCH 08/17] Fingers crossed --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7d25f7f0e198..f72602becfdf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -233,7 +233,7 @@ jobs: - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} run: | pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl - python3 -c 'import ast_serialize; print(ast_serialize("no way")[1])' + python3 -c 'import ast_serialize; print(ast_serialize.parse("no way")[1])' - name: Setup tox environment run: | From 9957a43db8681cf97c63a494700d25a36f0de935 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 15:52:27 +0000 Subject: [PATCH 09/17] Oh, right --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f72602becfdf3..323a2b225a5c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -233,7 +233,9 @@ jobs: - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} run: | pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl - python3 -c 'import ast_serialize; print(ast_serialize.parse("no way")[1])' + echo 'no way' > test_ast_serialize.py + python3 -c 'import ast_serialize; print(ast_serialize.parse("test_ast_serialize.py")[1])' + rm test_ast_serialize.py - name: Setup tox environment run: | From a005fc9876decca27fd7fb67da03bb242fd97851 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Tue, 17 Feb 2026 16:22:54 +0000 Subject: [PATCH 10/17] Skip free-threaded build --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 323a2b225a5c3..c87a98de21ff7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -215,7 +215,7 @@ jobs: # To speed-up process until ast_serialize is on PyPI. - name: Checkout pinned ast_serialize - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} + if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} uses: actions/checkout@v4 with: persist-credentials: false @@ -223,14 +223,14 @@ jobs: ref: 038d30db8c3428310a5d69c151feeebf31160a08 path: ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} + - if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} uses: PyO3/maturin-action@v1 with: target: aarch64 args: --release --out dist working-directory: ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' }} + - if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} run: | pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl echo 'no way' > test_ast_serialize.py From f2c955046a1054269d46718a3ccd10a3d3e6ee4c Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 4 Mar 2026 23:47:00 +0000 Subject: [PATCH 11/17] Use native parser for parallel tests; skip some tests --- .github/workflows/test.yml | 10 ++++++---- mypy/message_registry.py | 2 +- mypy/test/testcheck.py | 4 ++++ test-data/unit/check-columns.test | 6 +++--- test-data/unit/check-errorcodes.test | 20 ++++++++++---------- test-data/unit/check-fastparse.test | 14 +++++++------- test-data/unit/check-literal.test | 8 ++++---- test-data/unit/check-statements.test | 14 +++++++------- 8 files changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c87a98de21ff7..ef02e899f6953 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,12 +106,14 @@ jobs: os: ubuntu-24.04-arm toxenv: py tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" + dev_ast_serialize: true - name: Parallel tests with py314-ubuntu, mypyc-compiled python: '3.14' os: ubuntu-24.04-arm toxenv: py tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" test_mypyc: true + dev_ast_serialize: true - name: Parallel tests with py314-windows-64, interpreted python: '3.14' os: windows-latest @@ -215,22 +217,22 @@ jobs: # To speed-up process until ast_serialize is on PyPI. - name: Checkout pinned ast_serialize - if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} + if: ${{ matrix.dev_ast_serialize }} uses: actions/checkout@v4 with: persist-credentials: false repository: mypyc/ast_serialize - ref: 038d30db8c3428310a5d69c151feeebf31160a08 + ref: da5a16cf268dbec63ed6b2e6b715470576e2d1a6 path: ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} + - if: ${{ matrix.dev_ast_serialize }} uses: PyO3/maturin-action@v1 with: target: aarch64 args: --release --out dist working-directory: ast_serialize - - if: ${{ matrix.os == 'ubuntu-24.04-arm' && matrix.python != '3.14t' }} + - if: ${{ dev_ast_serialize }} run: | pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl echo 'no way' > test_ast_serialize.py diff --git a/mypy/message_registry.py b/mypy/message_registry.py index 9de31514b6bd1..8140e28e16d7a 100644 --- a/mypy/message_registry.py +++ b/mypy/message_registry.py @@ -303,7 +303,7 @@ def with_additional_msg(self, info: str) -> ErrorMessage: "Condition can't be inferred, unable to merge overloads" ) TYPE_IGNORE_WITH_ERRCODE_ON_MODULE: Final = ErrorMessage( - "type ignore with error code is not supported for modules; " + "Type ignore with error code is not supported for modules; " 'use `# mypy: disable-error-code="{}"`', codes.SYNTAX, ) diff --git a/mypy/test/testcheck.py b/mypy/test/testcheck.py index 54cdb38596bfe..cbb9c0235feda 100644 --- a/mypy/test/testcheck.py +++ b/mypy/test/testcheck.py @@ -141,12 +141,16 @@ def run_case_once( if options.num_workers: options.fixed_format_cache = True + options.native_parser = True if testcase.output_files: raise pytest.skip("Reports are not supported in parallel mode") # Note: do not use this unless really needed! if testcase.name.endswith("_no_parallel"): raise pytest.skip("Test not supported in parallel mode yet") + if options.native_parser and testcase.name.endswith("_no_native_parse"): + raise pytest.skip("Test not supported by native parser yet") + # Enable some options automatically based on test file name. if "columns" in testcase.file: options.show_column_numbers = True diff --git a/test-data/unit/check-columns.test b/test-data/unit/check-columns.test index c38d69a9c3a89..6ce0571f546ec 100644 --- a/test-data/unit/check-columns.test +++ b/test-data/unit/check-columns.test @@ -1,6 +1,6 @@ # Test column numbers in messages. --show-column-numbers is enabled implicitly by test runner. -[case testColumnsSyntaxError] +[case testColumnsSyntaxError_no_native_parse] f() 1 + [out] @@ -146,7 +146,7 @@ if int(): def f(a: 'A') -> None: pass (f(b=object())) # E:6: Unexpected keyword argument "b" for "f" -[case testColumnInvalidType] +[case testColumnInvalidType_no_native_parse] from typing import Iterable @@ -342,7 +342,7 @@ if int(): main:2:11: error: Syntax error in type annotation main:2:11: note: Suggestion: Is there a spurious trailing comma? -[case testColumnSyntaxErrorInTypeAnnotation2] +[case testColumnSyntaxErrorInTypeAnnotation2_no_native_parse] if int(): # TODO: It would be better to point to the type comment xyz = 0 # type: blurbnard blarb diff --git a/test-data/unit/check-errorcodes.test b/test-data/unit/check-errorcodes.test index 26f43ebeadd4e..f02daea40fd12 100644 --- a/test-data/unit/check-errorcodes.test +++ b/test-data/unit/check-errorcodes.test @@ -30,21 +30,21 @@ class A: [case testErrorCodeNoteHasNoCode] reveal_type(1) # N: Revealed type is "Literal[1]?" -[case testErrorCodeSyntaxError] +[case testErrorCodeSyntaxError_no_native_parse] 1 '' [out] main:1: error: Invalid syntax [syntax] [out version==3.10.0] main:1: error: Invalid syntax. Perhaps you forgot a comma? [syntax] -[case testErrorCodeSyntaxError2] +[case testErrorCodeSyntaxError2_no_native_parse] def f(): # E: Type signature has too many parameters [syntax] # type: (int) -> None 1 x = 0 # type: x y # E: Syntax error in type comment "x y" [syntax] -[case testErrorCodeSyntaxError3] +[case testErrorCodeSyntaxError3_no_native_parse] # This is a bit inconsistent -- syntax error would be more logical? x: 'a b' # E: Invalid type comment or annotation [valid-type] for v in x: # type: int, int # E: Syntax error in type annotation [syntax] \ @@ -208,7 +208,7 @@ def h(x # type: xyz # type: ignore[foo] # E: Name "xyz" is not defined [name import nostub # type: ignore[import] from defusedxml import xyz # type: ignore[import] -[case testErrorCodeBadIgnore] +[case testErrorCodeBadIgnore_no_native_parse] import nostub # type: ignore xyz # E: Invalid "type: ignore" comment [syntax] \ # E: Cannot find implementation or library stub for module named "nostub" [import-not-found] \ # N: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports @@ -226,7 +226,7 @@ def f(x, # type: int # type: ignore[ # E: Invalid "type: ignore" comment [sy # type: (...) -> None pass -[case testErrorCodeBadIgnoreNoExtraComment] +[case testErrorCodeBadIgnoreNoExtraComment_no_native_parse] # Omit the E: ... comments, as they affect parsing import nostub # type: ignore xyz import nostub # type: ignore[xyz @@ -762,7 +762,7 @@ main:1: error: Name "y" is not defined [name-defined] main:2: error: Name "ignored" is not defined [name-defined] main:2: error: Name "y" is not defined [name-defined] -[case testErrorCodeTypeIgnoreMisspelled2] +[case testErrorCodeTypeIgnoreMisspelled2_no_native_parse] x = y # type: int # type: ignored[foo] x = y # type: int # type: ignored [foo] [out] @@ -1014,7 +1014,7 @@ def f(arg: int) -> int: def f(arg: str) -> str: ... -[case testSliceInDictBuiltin] +[case testSliceInDictBuiltin_no_native_parse] # flags: --show-column-numbers b: dict[int, x:y] c: dict[x:y] @@ -1027,7 +1027,7 @@ main:3:4: error: "dict" expects 2 type arguments, but 1 given [type-arg] main:3:9: error: Invalid type comment or annotation [valid-type] main:3:9: note: did you mean to use ',' instead of ':' ? -[case testSliceInDictTyping] +[case testSliceInDictTyping_no_native_parse] # flags: --show-column-numbers from typing import Dict b: Dict[int, x:y] @@ -1067,11 +1067,11 @@ def f(d: D, s: str) -> None: [typing fixtures/typing-typeddict.pyi] [case testRecommendErrorCode] -# type: ignore[whatever] # E: type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever"` [syntax] +# type: ignore[whatever] # E: Type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever"` [syntax] 1 + "asdf" [case testRecommendErrorCode2] -# type: ignore[whatever, other] # E: type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever, other"` [syntax] +# type: ignore[whatever, other] # E: Type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever, other"` [syntax] 1 + "asdf" [case testShowErrorCodesInConfig] diff --git a/test-data/unit/check-fastparse.test b/test-data/unit/check-fastparse.test index a0b619349d23f..7ee5a9c432169 100644 --- a/test-data/unit/check-fastparse.test +++ b/test-data/unit/check-fastparse.test @@ -1,8 +1,8 @@ -[case testFastParseSyntaxError] +[case testFastParseSyntaxError_no_native_parse] 1 + # E: Invalid syntax -[case testFastParseTypeCommentSyntaxError] +[case testFastParseTypeCommentSyntaxError_no_native_parse] x = None # type: a : b # E: Syntax error in type comment "a : b" @@ -12,13 +12,13 @@ x = None # type: a + b # E: Invalid type comment or annotation -- Function type comments are attributed to the function def line. -- This happens in both parsers. -[case testFastParseFunctionAnnotationSyntaxError] +[case testFastParseFunctionAnnotationSyntaxError_no_native_parse] def f(): # E: Syntax error in type comment "None -> None" # N: Suggestion: wrap argument types in parentheses # type: None -> None pass -[case testFastParseFunctionAnnotationSyntaxErrorSpaces] +[case testFastParseFunctionAnnotationSyntaxErrorSpaces_no_native_parse] def f(): # E: Syntax error in type comment "None -> None" # N: Suggestion: wrap argument types in parentheses # type: None -> None @@ -156,7 +156,7 @@ def f(a, # type: A [builtins fixtures/dict.pyi] [out] -[case testFastParsePerArgumentAnnotationsWithAnnotatedBareStar] +[case testFastParsePerArgumentAnnotationsWithAnnotatedBareStar_no_native_parse] def f(*, # type: int # E: Bare * has associated type comment x # type: str @@ -194,7 +194,7 @@ def f(x, y): # E: Type signature has too few parameters f(1, 2) f(1) # E: Missing positional argument "y" in call to "f" -[case testFasterParseTypeErrorCustom] +[case testFasterParseTypeErrorCustom_no_native_parse] from typing import TypeVar, Generic T = TypeVar('T') @@ -275,7 +275,7 @@ def f7(x: int): # E: Function has duplicate type signatures # type: (int) -> int pass -[case testFastParserDuplicateNames] +[case testFastParserDuplicateNames_no_native_parse] def f(x, y, z): pass diff --git a/test-data/unit/check-literal.test b/test-data/unit/check-literal.test index 0b779f57b6150..f795f1f5b354b 100644 --- a/test-data/unit/check-literal.test +++ b/test-data/unit/check-literal.test @@ -224,7 +224,7 @@ accepts_bytes(c_alias) [builtins fixtures/tuple.pyi] [out] -[case testLiteralMixingUnicodeAndBytesPython3ForwardStrings] +[case testLiteralMixingUnicodeAndBytesPython3ForwardStrings_no_native_parse] from typing import Literal, TypeVar, Generic a_unicode_wrapper: u"Literal[u'foo']" @@ -577,7 +577,7 @@ reveal_type(d) # N: Revealed type is "Any" [builtins fixtures/primitives.pyi] [out] -[case testLiteralDisallowFloatsAndComplex] +[case testLiteralDisallowFloatsAndComplex_no_native_parse] from typing import Literal a1: Literal[3.14] # E: Parameter 1 of Literal[...] cannot be of type "float" @@ -601,7 +601,7 @@ d2: d2t # E: Variable "__main__.d2t" is not valid as a type \ [builtins fixtures/complex_tuple.pyi] [out] -[case testLiteralDisallowComplexExpressions] +[case testLiteralDisallowComplexExpressions_no_native_parse] from typing import Literal def dummy() -> int: return 3 a: Literal[3 + 4] # E: Invalid type: Literal[...] cannot contain arbitrary expressions @@ -2460,7 +2460,7 @@ expect_2(final_set_2.pop()) # E: Argument 1 to "expect_2" has incompatible type -- Tests for Literals and enums -- -[case testLiteralWithEnumsBasic] +[case testLiteralWithEnumsBasic_no_native_parse] from typing import Literal from enum import Enum diff --git a/test-data/unit/check-statements.test b/test-data/unit/check-statements.test index 5b1a59e359c19..0b768908a4487 100644 --- a/test-data/unit/check-statements.test +++ b/test-data/unit/check-statements.test @@ -164,7 +164,7 @@ while None: [builtins fixtures/bool.pyi] [out] -[case testForStatementTypeComments] +[case testForStatementTypeComments_no_native_parse] from typing import List, Union x = [] # type: List[int] @@ -182,7 +182,7 @@ for v in x: # type: int, int # E: Syntax error in type annotation # N: Suggest pass [builtins fixtures/list.pyi] -[case testForStatementMultipleTypeComments] +[case testForStatementMultipleTypeComments_no_native_parse] from typing import List, Tuple x = [] # type: List[Tuple[int, int]] @@ -1360,7 +1360,7 @@ def f() -> Iterator[List[int]]: [builtins fixtures/for.pyi] [out] -[case testYieldFromNotAppliedToNothing] +[case testYieldFromNotAppliedToNothing_no_native_parse] def h(): yield from # E: Invalid syntax [out] @@ -1492,7 +1492,7 @@ with A() as (a, b): a = b # E: Incompatible types in assignment (expression has type "str", variable has type "int") [builtins fixtures/tuple.pyi] -[case testWithStmtTypeComment] +[case testWithStmtTypeComment_no_native_parse] from typing import Union class A: @@ -1514,7 +1514,7 @@ with A() as c: # type: int, int # E: Syntax error in type annotation # N: Sugg with A() as d: # type: Union[int, str] reveal_type(d) # N: Revealed type is "builtins.int | builtins.str" -[case testWithStmtTupleTypeComment] +[case testWithStmtTupleTypeComment_no_native_parse] from typing import Tuple class A: @@ -1546,7 +1546,7 @@ with A() as (k, l): # type: int, str # E: Incompatible types in assignment (ex pass [builtins fixtures/tuple.pyi] -[case testWithStmtComplexTypeComment] +[case testWithStmtComplexTypeComment_no_native_parse] from typing import Tuple class A: @@ -2244,7 +2244,7 @@ N = TypedDict('N', {'x': int}) [typing fixtures/typing-full.pyi] [out] -[case testForwardRefsInWithStatement] +[case testForwardRefsInWithStatement_no_native_parse] from typing import ContextManager, Any, TypedDict cm: ContextManager[Any] From 53b5e6c150f40fc2d87095e715282012c1010c10 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 4 Mar 2026 23:49:46 +0000 Subject: [PATCH 12/17] Fix yaml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef02e899f6953..5db9035e11406 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -232,7 +232,7 @@ jobs: args: --release --out dist working-directory: ast_serialize - - if: ${{ dev_ast_serialize }} + - if: ${{ matrix.dev_ast_serialize }} run: | pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl echo 'no way' > test_ast_serialize.py From 215b2e142098bc4ac9756301147d7331990dab74 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 4 Mar 2026 23:55:38 +0000 Subject: [PATCH 13/17] Check the problem --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5db9035e11406..1a68a00296642 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -105,13 +105,13 @@ jobs: python: '3.14' os: ubuntu-24.04-arm toxenv: py - tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" + tox_extra_args: "-x -n 4 --mypy-num-workers=4 mypy/test/testcheck.py" dev_ast_serialize: true - name: Parallel tests with py314-ubuntu, mypyc-compiled python: '3.14' os: ubuntu-24.04-arm toxenv: py - tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" + tox_extra_args: "-x -n 4 --mypy-num-workers=4 mypy/test/testcheck.py" test_mypyc: true dev_ast_serialize: true - name: Parallel tests with py314-windows-64, interpreted From d3131267d792a4c63336f5fa375dbf0ec2d8a004 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 5 Mar 2026 00:18:43 +0000 Subject: [PATCH 14/17] Try fixing tox --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a68a00296642..6b6d005d4de75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -141,6 +141,7 @@ jobs: timeout-minutes: 60 env: TOX_SKIP_MISSING_INTERPRETERS: False + VIRTUALENV_SYSTEM_SITE_PACKAGES: ${{ matrix.dev_ast_serialize && 1 || 0 }} # Rich (pip) -- Disable color for windows + pytest FORCE_COLOR: ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }} # Tox From 707c8dc770f0e0f884016d5588ceb7b87a05e911 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 5 Mar 2026 18:28:47 +0000 Subject: [PATCH 15/17] Skip remainig tests; skip Windows for now --- .github/workflows/test.yml | 11 ++++++----- test-data/unit/check-annotated.test | 2 +- test-data/unit/check-async-await.test | 4 ++-- test-data/unit/check-basic.test | 2 +- test-data/unit/check-expressions.test | 4 ++-- test-data/unit/check-functions.test | 8 ++++---- test-data/unit/check-ignore.test | 4 ++-- test-data/unit/check-incremental.test | 2 +- test-data/unit/check-namedtuple.test | 2 +- test-data/unit/check-newsemanal.test | 2 +- test-data/unit/check-newsyntax.test | 4 ++-- test-data/unit/check-python312.test | 6 +++--- test-data/unit/check-python39.test | 2 +- test-data/unit/check-type-aliases.test | 2 +- test-data/unit/check-typeddict.test | 2 +- test-data/unit/check-unreachable-code.test | 6 +++--- 16 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b6d005d4de75..4eca8a79083d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,11 +114,12 @@ jobs: tox_extra_args: "-x -n 4 --mypy-num-workers=4 mypy/test/testcheck.py" test_mypyc: true dev_ast_serialize: true - - name: Parallel tests with py314-windows-64, interpreted - python: '3.14' - os: windows-latest - toxenv: py - tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'" + # Skip Windows tests until we publish ast_serialize wheels on PyPI. + # - name: Parallel tests with py314-windows-64, interpreted + # python: '3.14' + # os: windows-latest + # toxenv: py + # tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'" - name: Type check our own code (py310-ubuntu) python: '3.10' diff --git a/test-data/unit/check-annotated.test b/test-data/unit/check-annotated.test index d4de3f7b5043f..7ef46e9417843 100644 --- a/test-data/unit/check-annotated.test +++ b/test-data/unit/check-annotated.test @@ -17,7 +17,7 @@ x: Annotated[int, THESE, ARE, IGNORED, FOR, NOW] reveal_type(x) # N: Revealed type is "builtins.int" [builtins fixtures/tuple.pyi] -[case testAnnotated3] +[case testAnnotated3_no_native_parse] from typing_extensions import Annotated x: Annotated[int, -+~12.3, "som"[e], more(anno+a+ions, that=[are]), (b"ignored",), 4, N.O.W, ...] reveal_type(x) # N: Revealed type is "builtins.int" diff --git a/test-data/unit/check-async-await.test b/test-data/unit/check-async-await.test index 242461af8a1cf..907bf6027f657 100644 --- a/test-data/unit/check-async-await.test +++ b/test-data/unit/check-async-await.test @@ -192,7 +192,7 @@ async def f() -> None: [builtins fixtures/async_await.pyi] [typing fixtures/typing-async.pyi] -[case testAsyncForTypeComments] +[case testAsyncForTypeComments_no_native_parse] from typing import AsyncIterator, Union class C(AsyncIterator[int]): @@ -342,7 +342,7 @@ async def f() -> None: [builtins fixtures/async_await.pyi] [typing fixtures/typing-async.pyi] -[case testAsyncWithTypeComments] +[case testAsyncWithTypeComments_no_native_parse] class C: async def __aenter__(self) -> int: pass diff --git a/test-data/unit/check-basic.test b/test-data/unit/check-basic.test index c2818b27b007d..b91a2343a0b25 100644 --- a/test-data/unit/check-basic.test +++ b/test-data/unit/check-basic.test @@ -286,7 +286,7 @@ x = 1 x in 1, # E: Unsupported right operand type for in ("int") [builtins fixtures/tuple.pyi] -[case testTrailingCommaInIfParsing] +[case testTrailingCommaInIfParsing_no_native_parse] if x in 1, : pass [out] main:1: error: Invalid syntax diff --git a/test-data/unit/check-expressions.test b/test-data/unit/check-expressions.test index 1acda7079cc85..17ce4cd596590 100644 --- a/test-data/unit/check-expressions.test +++ b/test-data/unit/check-expressions.test @@ -1456,7 +1456,7 @@ if int(): b = (x for x in a) # E: Generator has incompatible item type "Callable[[], str]"; expected "Callable[[], int]" [builtins fixtures/list.pyi] -[case testGeneratorNoSpuriousError] +[case testGeneratorNoSpuriousError_no_native_parse] from typing import Iterable, overload @overload @@ -1915,7 +1915,7 @@ None == None None < None # E: Unsupported left operand type for < ("None") [builtins fixtures/ops.pyi] -[case testDictWithStarExpr] +[case testDictWithStarExpr_no_native_parse] b = {'z': 26, *a} # E: Invalid syntax [builtins fixtures/dict.pyi] diff --git a/test-data/unit/check-functions.test b/test-data/unit/check-functions.test index 542cbb3fd22c9..6d5d472ca2b17 100644 --- a/test-data/unit/check-functions.test +++ b/test-data/unit/check-functions.test @@ -774,7 +774,7 @@ class A: main:6: error: Incompatible types in assignment (expression has type "int", variable has type "A") main:8: error: Argument 1 to "g" has incompatible type "A"; expected "int" -[case testNestedFunctionInMethodWithTooFewArgumentsInTypeComment] +[case testNestedFunctionInMethodWithTooFewArgumentsInTypeComment_no_native_parse] class A: def f(self): # type: () -> None @@ -795,7 +795,7 @@ class A: arg.B # E: "object" has no attribute "B" [file mod.py] -[case testDeepNestedFunctionWithTooFewArgumentsInTypeComment] +[case testDeepNestedFunctionWithTooFewArgumentsInTypeComment_no_native_parse] class A: def f(self): # type: () -> None @@ -2139,13 +2139,13 @@ class A: pass [builtins fixtures/staticmethod.pyi] -[case testEllipsisWithSomethingAfterItFails] +[case testEllipsisWithSomethingAfterItFails_no_native_parse] def f(x, y, z): # type: (..., int) -> None pass [out] main:1: error: Ellipses cannot accompany other parameter types in function type signature -[case testEllipsisWithSomethingBeforeItFails] +[case testEllipsisWithSomethingBeforeItFails_no_native_parse] def f(x, y, z): # type: (int, ...) -> None pass [out] diff --git a/test-data/unit/check-ignore.test b/test-data/unit/check-ignore.test index 0d44c1f966c97..2bcf6e0884966 100644 --- a/test-data/unit/check-ignore.test +++ b/test-data/unit/check-ignore.test @@ -32,7 +32,7 @@ from xyz_m import * # type: ignore x # E: Name "x" is not defined 1() # E: "int" not callable -[case testIgnoreImportBadModule] +[case testIgnoreImportBadModule_no_native_parse] import m # type: ignore from m import a # type: ignore [file m.py] @@ -54,7 +54,7 @@ foo = 3 [builtins fixtures/module_all.pyi] [out] -[case testIgnoreImportStarFromBadModule] +[case testIgnoreImportStarFromBadModule_no_native_parse] from m import * # type: ignore [file m.py] + diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test index 8b77c9be7f615..5b256b1731e01 100644 --- a/test-data/unit/check-incremental.test +++ b/test-data/unit/check-incremental.test @@ -7264,7 +7264,7 @@ bar: int = foo [out3] tmp/bar.py:2: error: Incompatible types in assignment (expression has type "str", variable has type "int") -[case testIncrementalBlockingErrorRepeatAndUndo] +[case testIncrementalBlockingErrorRepeatAndUndo_no_native_parse] import m [file m.py] import f diff --git a/test-data/unit/check-namedtuple.test b/test-data/unit/check-namedtuple.test index ccabda405563a..6eb1c322cee69 100644 --- a/test-data/unit/check-namedtuple.test +++ b/test-data/unit/check-namedtuple.test @@ -1374,7 +1374,7 @@ class Test: [builtins fixtures/tuple.pyi] [typing fixtures/typing-namedtuple.pyi] -[case testNoClassKeywordsForNamedTuple] +[case testNoClassKeywordsForNamedTuple_no_native_parse] from typing import NamedTuple class Test1(NamedTuple, x=1, y=2): # E: Unexpected keyword argument "x" for "__init_subclass__" of "NamedTuple" \ # E: Unexpected keyword argument "y" for "__init_subclass__" of "NamedTuple" diff --git a/test-data/unit/check-newsemanal.test b/test-data/unit/check-newsemanal.test index 856d7be0ebac6..ad3ea03110c0b 100644 --- a/test-data/unit/check-newsemanal.test +++ b/test-data/unit/check-newsemanal.test @@ -1657,7 +1657,7 @@ tmp/a.py: note: In member "g" of class "A": tmp/a.py:10: error: Type argument "str" of "C" must be a subtype of "int" tmp/a.py:11: error: Type argument "str" of "C" must be a subtype of "int" -[case testNewAnalyzerTypeArgBoundCheckDifferentNodes] +[case testNewAnalyzerTypeArgBoundCheckDifferentNodes_no_native_parse] from typing import TypeVar, TypedDict, Generic, NamedTuple, NewType, Union, Any, cast, overload T = TypeVar('T', bound=int) diff --git a/test-data/unit/check-newsyntax.test b/test-data/unit/check-newsyntax.test index df36a1ce4dd22..3df0d03c96e10 100644 --- a/test-data/unit/check-newsyntax.test +++ b/test-data/unit/check-newsyntax.test @@ -1,4 +1,4 @@ -[case testNewSyntaxSyntaxError] +[case testNewSyntaxSyntaxError_no_native_parse] x: int: int # E: Invalid syntax [out] @@ -122,7 +122,7 @@ reveal_type(f'{v}') # N: Revealed type is "builtins.str" reveal_type(f'{1}') # N: Revealed type is "builtins.str" [builtins fixtures/f_string.pyi] -[case testFeatureVersionSuggestion] +[case testFeatureVersionSuggestion_no_native_parse] # flags: --python-version 3.99 x *** x this is what future python looks like public static void main String[] args await goto exit [out] diff --git a/test-data/unit/check-python312.test b/test-data/unit/check-python312.test index 39b57d1bb6f04..122bf5df14e7c 100644 --- a/test-data/unit/check-python312.test +++ b/test-data/unit/check-python312.test @@ -1622,7 +1622,7 @@ reveal_type(a) # N: Revealed type is "builtins.list[builtins.int]" def f[T](x: foobar, y: T) -> T: ... # E: Name "foobar" is not defined reveal_type(f) # N: Revealed type is "def [T] (x: Any, y: T`-1) -> T`-1" -[case testPEP695WrongNumberOfConstrainedTypes] +[case testPEP695WrongNumberOfConstrainedTypes_no_native_parse] type A[T: ()] = list[T] # E: Type variable must have at least two constrained types a: A[int] reveal_type(a) # N: Revealed type is "builtins.list[builtins.int]" @@ -1771,7 +1771,7 @@ type Y[T] = {"item": T, **Y[T]} # E: Overwriting TypedDict field "item" while m [builtins fixtures/dict.pyi] [typing fixtures/typing-full.pyi] -[case testPEP695UsingIncorrectExpressionsInTypeVariableBound] +[case testPEP695UsingIncorrectExpressionsInTypeVariableBound_no_native_parse] type X[T: (yield 1)] = Any # E: Yield expression cannot be used as a type variable bound type Y[T: (yield from [])] = Any # E: Yield expression cannot be used as a type variable bound type Z[T: (a := 1)] = Any # E: Named expression cannot be used as a type variable bound @@ -1802,7 +1802,7 @@ def fooy_nested[T: (1 + (yield from []))](): pass # E: Yield expression cannot def fooz_nested[T: (1 + (a := 1))](): pass # E: Named expression cannot be used as a type variable bound def fook_nested[T: (1 +(await 1))](): pass # E: Await expression cannot be used as a type variable bound -[case testPEP695UsingIncorrectExpressionsInTypeAlias] +[case testPEP695UsingIncorrectExpressionsInTypeAlias_no_native_parse] type X = (yield 1) # E: Yield expression cannot be used within a type alias type Y = (yield from []) # E: Yield expression cannot be used within a type alias type Z = (a := 1) # E: Named expression cannot be used within a type alias diff --git a/test-data/unit/check-python39.test b/test-data/unit/check-python39.test index 86a9126ff483a..236482229a6ee 100644 --- a/test-data/unit/check-python39.test +++ b/test-data/unit/check-python39.test @@ -1,4 +1,4 @@ -[case testGivingSameKeywordArgumentTwice] +[case testGivingSameKeywordArgumentTwice_no_native_parse] # This test was originally in check-kwargs.test # Python 3.9's new parser started producing a different error message here. Since this isn't the # most important test, to deal with this we'll only run this test with Python 3.9 and later. diff --git a/test-data/unit/check-type-aliases.test b/test-data/unit/check-type-aliases.test index 61eda2bd77747..69474e2850055 100644 --- a/test-data/unit/check-type-aliases.test +++ b/test-data/unit/check-type-aliases.test @@ -1164,7 +1164,7 @@ reveal_type(xp) # N: Revealed type is "__main__.G[[builtins.int], builtins.str] [builtins fixtures/dict.pyi] [typing fixtures/typing-full.pyi] -[case testTypeAliasTypeInvalidGeneric] +[case testTypeAliasTypeInvalidGeneric_no_native_parse] from typing_extensions import TypeAliasType, TypeVarTuple, ParamSpec from typing import Callable, Dict, Generic, TypeVar, Tuple, Unpack diff --git a/test-data/unit/check-typeddict.test b/test-data/unit/check-typeddict.test index 3fcd9eda58f7d..eb6a4d08b978d 100644 --- a/test-data/unit/check-typeddict.test +++ b/test-data/unit/check-typeddict.test @@ -3749,7 +3749,7 @@ B = TypedDict("B", { # E: Type of a TypedDict key becomes "Any" due to an unfol [builtins fixtures/dict.pyi] [typing fixtures/typing-typeddict.pyi] -[case testTypedDictWithClassLevelKeywords] +[case testTypedDictWithClassLevelKeywords_no_native_parse] from typing import TypedDict, Generic, TypeVar T = TypeVar('T') diff --git a/test-data/unit/check-unreachable-code.test b/test-data/unit/check-unreachable-code.test index f02eb2bd55c47..1888a6595b61b 100644 --- a/test-data/unit/check-unreachable-code.test +++ b/test-data/unit/check-unreachable-code.test @@ -452,7 +452,7 @@ reveal_type(x) # N: Revealed type is "builtins.str" [builtins fixtures/ops.pyi] [out] -[case testCustomSysPlatform2] +[case testCustomSysPlatform2_no_native_parse] # flags: --platform win32 import sys if sys.platform == 'linux': @@ -463,7 +463,7 @@ reveal_type(x) # N: Revealed type is "builtins.int" [builtins fixtures/ops.pyi] [out] -[case testCustomSysPlatformStartsWith] +[case testCustomSysPlatformStartsWith_no_native_parse] # flags: --platform win32 import sys if sys.platform.startswith('win'): @@ -887,7 +887,7 @@ def baz(x: int) -> int: return x [builtins fixtures/exception.pyi] -[case testUnreachableFlagIgnoresSemanticAnalysisUnreachable] +[case testUnreachableFlagIgnoresSemanticAnalysisUnreachable_no_native_parse] # flags: --warn-unreachable --python-version 3.9 --platform win32 --always-false FOOBAR import sys from typing import TYPE_CHECKING From 6a3420f62dd89275b2e4eb2da84ff3a067dfe9fd Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 5 Mar 2026 18:32:25 +0000 Subject: [PATCH 16/17] Undo fail fast logic --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4eca8a79083d5..f227fc95e7aa1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -105,13 +105,13 @@ jobs: python: '3.14' os: ubuntu-24.04-arm toxenv: py - tox_extra_args: "-x -n 4 --mypy-num-workers=4 mypy/test/testcheck.py" + tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" dev_ast_serialize: true - name: Parallel tests with py314-ubuntu, mypyc-compiled python: '3.14' os: ubuntu-24.04-arm toxenv: py - tox_extra_args: "-x -n 4 --mypy-num-workers=4 mypy/test/testcheck.py" + tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py" test_mypyc: true dev_ast_serialize: true # Skip Windows tests until we publish ast_serialize wheels on PyPI. From 0226445601dbad804263612b4ea958ba49d94d72 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Thu, 5 Mar 2026 19:02:11 +0000 Subject: [PATCH 17/17] Skip t-strings tests for now --- test-data/unit/check-python314.test | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test-data/unit/check-python314.test b/test-data/unit/check-python314.test index c6944013c1d83..688541d7c39a0 100644 --- a/test-data/unit/check-python314.test +++ b/test-data/unit/check-python314.test @@ -1,4 +1,4 @@ -[case testTemplateStringBasics] +[case testTemplateStringBasics_no_native_parse] reveal_type(t"foobar") # N: Revealed type is "string.templatelib.Template" t"{'foobar'}" t"foo{'bar'}" @@ -14,32 +14,32 @@ a = t"foobar" a = t"{'foobar'}" [builtins fixtures/f_string.pyi] -[case testTemplateStringWithoutExplicitImport] +[case testTemplateStringWithoutExplicitImport_no_native_parse] reveal_type(t"implicit import works") # N: Revealed type is "string.templatelib.Template" [builtins fixtures/f_string.pyi] -[case testTemplateStringExpressionsOk] +[case testTemplateStringExpressionsOk_no_native_parse] t".{1 + 1}." t".{1 + 1}.{'foo' + 'bar'}" [builtins fixtures/f_string.pyi] -[case testTemplateStringExpressionsErrors] +[case testTemplateStringExpressionsErrors_no_native_parse] t"{1 + ''}" # E: Unsupported operand types for + ("int" and "str") t".{1 + ''}" # E: Unsupported operand types for + ("int" and "str") [builtins fixtures/f_string.pyi] -[case testTemplateStringParseFormatOptions] +[case testTemplateStringParseFormatOptions_no_native_parse] value = 10.5142 width = 10 precision = 4 t"result: {value:{width}.{precision}}" [builtins fixtures/f_string.pyi] -[case testTemplateStringNestedExpressionsTypeChecked] +[case testTemplateStringNestedExpressionsTypeChecked_no_native_parse] t"{2:{3 + ''}}" # E: Unsupported operand types for + ("int" and "str") [builtins fixtures/f_string.pyi] -[case testIncrementalTemplateStringImplicitDependency] +[case testIncrementalTemplateStringImplicitDependency_no_native_parse] import m reveal_type(m.x) [file m.py]