@@ -23,6 +23,12 @@ a.py:1: error: invalid syntax
23
23
==
24
24
main:2: error: Missing positional argument "x" in call to "f"
25
25
==
26
+ [out version>=3.10]
27
+ ==
28
+ a.py:1: error: expected ':'
29
+ ==
30
+ main:2: error: Missing positional argument "x" in call to "f"
31
+ ==
26
32
27
33
[case testParseErrorShowSource]
28
34
# flags: --pretty --show-error-codes
@@ -46,6 +52,16 @@ main:3: error: Missing positional argument "x" in call to "f" [call-arg]
46
52
a.f()
47
53
^
48
54
==
55
+ [out version>=3.10]
56
+ ==
57
+ a.py:1: error: expected ':' [syntax]
58
+ def f(x: int) ->
59
+ ^
60
+ ==
61
+ main:3: error: Missing positional argument "x" in call to "f" [call-arg]
62
+ a.f()
63
+ ^
64
+ ==
49
65
50
66
[case testParseErrorMultipleTimes]
51
67
import a
@@ -66,6 +82,13 @@ a.py:1: error: invalid syntax
66
82
a.py:2: error: invalid syntax
67
83
==
68
84
main:2: error: Missing positional argument "x" in call to "f"
85
+ [out version>=3.10]
86
+ ==
87
+ a.py:1: error: expected ':'
88
+ ==
89
+ a.py:2: error: expected ':'
90
+ ==
91
+ main:2: error: Missing positional argument "x" in call to "f"
69
92
70
93
[case testSemanticAnalysisBlockingError]
71
94
import a
@@ -105,6 +128,14 @@ a.py:1: error: invalid syntax
105
128
==
106
129
main:3: error: Too many arguments for "f"
107
130
main:5: error: Too many arguments for "f"
131
+ [out version>=3.10]
132
+ main:3: error: Too many arguments for "f"
133
+ main:5: error: Too many arguments for "f"
134
+ ==
135
+ a.py:1: error: expected ':'
136
+ ==
137
+ main:3: error: Too many arguments for "f"
138
+ main:5: error: Too many arguments for "f"
108
139
109
140
[case testUpdateClassReferenceAcrossBlockingError]
110
141
import a
@@ -125,6 +156,11 @@ class C:
125
156
a.py:1: error: invalid syntax
126
157
==
127
158
main:5: error: Missing positional argument "x" in call to "f" of "C"
159
+ [out version>=3.10]
160
+ ==
161
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
162
+ ==
163
+ main:5: error: Missing positional argument "x" in call to "f" of "C"
128
164
129
165
[case testAddFileWithBlockingError]
130
166
import a
@@ -140,6 +176,13 @@ main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missin
140
176
a.py:1: error: invalid syntax
141
177
==
142
178
main:2: error: Too many arguments for "f"
179
+ [out version>=3.10]
180
+ main:1: error: Cannot find implementation or library stub for module named "a"
181
+ main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
182
+ ==
183
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
184
+ ==
185
+ main:2: error: Too many arguments for "f"
143
186
144
187
[case testModifyTwoFilesOneWithBlockingError1]
145
188
import a
@@ -216,6 +259,13 @@ a.py:1: error: invalid syntax
216
259
a.py:1: error: invalid syntax
217
260
==
218
261
a.py:2: error: Missing positional argument "x" in call to "f"
262
+ [out version>=3.10]
263
+ ==
264
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
265
+ ==
266
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
267
+ ==
268
+ a.py:2: error: Missing positional argument "x" in call to "f"
219
269
220
270
[case testModifyTwoFilesIntroduceTwoBlockingErrors]
221
271
import a
@@ -280,6 +330,13 @@ a.py:1: error: invalid syntax
280
330
main:1: error: Cannot find implementation or library stub for module named "a"
281
331
main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
282
332
b.py:1: error: Cannot find implementation or library stub for module named "a"
333
+ [out version>=3.10]
334
+ ==
335
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
336
+ ==
337
+ main:1: error: Cannot find implementation or library stub for module named "a"
338
+ main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
339
+ b.py:1: error: Cannot find implementation or library stub for module named "a"
283
340
284
341
[case testDeleteFileWithBlockingError-only_when_cache]
285
342
-- Different cache/no-cache tests because:
@@ -301,6 +358,13 @@ a.py:1: error: invalid syntax
301
358
b.py:1: error: Cannot find implementation or library stub for module named "a"
302
359
b.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
303
360
main:1: error: Cannot find implementation or library stub for module named "a"
361
+ [out version>=3.10]
362
+ ==
363
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
364
+ ==
365
+ b.py:1: error: Cannot find implementation or library stub for module named "a"
366
+ b.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
367
+ main:1: error: Cannot find implementation or library stub for module named "a"
304
368
305
369
[case testModifyFileWhileBlockingErrorElsewhere]
306
370
import a
@@ -324,6 +388,14 @@ a.py:1: error: invalid syntax
324
388
==
325
389
b.py:2: error: Module has no attribute "f"
326
390
b.py:3: error: "int" not callable
391
+ [out version>=3.10]
392
+ ==
393
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
394
+ ==
395
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
396
+ ==
397
+ b.py:2: error: Module has no attribute "f"
398
+ b.py:3: error: "int" not callable
327
399
328
400
[case testImportBringsAnotherFileWithBlockingError1]
329
401
import a
@@ -339,6 +411,11 @@ def f() -> None: pass
339
411
<ROOT>/test-data/unit/lib-stub/blocker.pyi:2: error: invalid syntax
340
412
==
341
413
a.py:1: error: "int" not callable
414
+ [out version>=3.10]
415
+ ==
416
+ <ROOT>/test-data/unit/lib-stub/blocker.pyi:2: error: invalid syntax. Perhaps you forgot a comma?
417
+ ==
418
+ a.py:1: error: "int" not callable
342
419
343
420
[case testImportBringsAnotherFileWithSemanticAnalysisBlockingError]
344
421
import a
@@ -413,6 +490,13 @@ a.py:1: error: invalid syntax
413
490
<ROOT>/test-data/unit/lib-stub/blocker.pyi:2: error: invalid syntax
414
491
==
415
492
a.py:2: error: "int" not callable
493
+ [out version>=3.10]
494
+ ==
495
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
496
+ ==
497
+ <ROOT>/test-data/unit/lib-stub/blocker.pyi:2: error: invalid syntax. Perhaps you forgot a comma?
498
+ ==
499
+ a.py:2: error: "int" not callable
416
500
417
501
[case testInitialBlocker]
418
502
# cmd: mypy a.py b.py
@@ -431,6 +515,11 @@ a.py:1: error: invalid syntax
431
515
==
432
516
b.py:2: error: Incompatible return value type (got "str", expected "int")
433
517
==
518
+ [out version>=3.10]
519
+ a.py:1: error: invalid syntax. Perhaps you forgot a comma?
520
+ ==
521
+ b.py:2: error: Incompatible return value type (got "str", expected "int")
522
+ ==
434
523
435
524
[case testDecodeErrorBlocker-posix]
436
525
import a
0 commit comments