Skip to content

Commit 9cce378

Browse files
committed
Remove --fast-parser flag from test files
1 parent a84a514 commit 9cce378

19 files changed

+131
-131
lines changed

test-data/unit/check-async-await.test

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
-- ---------------------------------------
33

44
[case testAsyncDefPass]
5-
# flags: --fast-parser
5+
66
async def f() -> int:
77
pass
88
[builtins fixtures/async_await.pyi]
99

1010
[case testAsyncDefReturn]
11-
# flags: --fast-parser
11+
1212
async def f() -> int:
1313
return 0
1414
reveal_type(f()) # E: Revealed type is 'typing.Awaitable[builtins.int]'
1515
[builtins fixtures/async_await.pyi]
1616

1717
[case testAsyncDefMissingReturn]
18-
# flags: --fast-parser --warn-no-return
18+
# flags: --warn-no-return
1919
async def f() -> int:
2020
make_this_not_trivial = 1
2121
[builtins fixtures/async_await.pyi]
2222
[out]
2323
main:2: error: Missing return statement
2424

2525
[case testAsyncDefReturnWithoutValue]
26-
# flags: --fast-parser
26+
2727
async def f() -> int:
2828
make_this_not_trivial = 1
2929
return
@@ -32,7 +32,7 @@ async def f() -> int:
3232
main:4: error: Return value expected
3333

3434
[case testAwaitCoroutine]
35-
# flags: --fast-parser
35+
3636
async def f() -> int:
3737
x = await f()
3838
reveal_type(x) # E: Revealed type is 'builtins.int*'
@@ -41,7 +41,7 @@ async def f() -> int:
4141
[out]
4242

4343
[case testAwaitDefaultContext]
44-
# flags: --fast-parser
44+
4545
from typing import TypeVar
4646
T = TypeVar('T')
4747
async def f(x: T) -> T:
@@ -52,7 +52,7 @@ async def f(x: T) -> T:
5252
main:6: error: Revealed type is 'T`-1'
5353

5454
[case testAwaitAnyContext]
55-
# flags: --fast-parser
55+
5656
from typing import Any, TypeVar
5757
T = TypeVar('T')
5858
async def f(x: T) -> T:
@@ -63,7 +63,7 @@ async def f(x: T) -> T:
6363
main:6: error: Revealed type is 'Any'
6464

6565
[case testAwaitExplicitContext]
66-
# flags: --fast-parser
66+
6767
from typing import TypeVar
6868
T = TypeVar('T')
6969
async def f(x: T) -> T:
@@ -75,7 +75,7 @@ main:5: error: Argument 1 to "f" has incompatible type "T"; expected "int"
7575
main:6: error: Revealed type is 'builtins.int'
7676

7777
[case testAwaitGeneratorError]
78-
# flags: --fast-parser
78+
7979
from typing import Any, Generator
8080
def g() -> Generator[int, None, str]:
8181
yield 0
@@ -87,7 +87,7 @@ async def f() -> int:
8787
main:7: error: Incompatible types in await (actual type Generator[int, None, str], expected type "Awaitable")
8888

8989
[case testAwaitIteratorError]
90-
# flags: --fast-parser
90+
9191
from typing import Any, Iterator
9292
def g() -> Iterator[Any]:
9393
yield
@@ -98,7 +98,7 @@ async def f() -> int:
9898
main:6: error: Incompatible types in await (actual type Iterator[Any], expected type "Awaitable")
9999

100100
[case testAwaitArgumentError]
101-
# flags: --fast-parser
101+
102102
def g() -> int:
103103
return 0
104104
async def f() -> int:
@@ -109,7 +109,7 @@ async def f() -> int:
109109
main:5: error: Incompatible types in await (actual type "int", expected type "Awaitable")
110110

111111
[case testAwaitResultError]
112-
# flags: --fast-parser
112+
113113
async def g() -> int:
114114
return 0
115115
async def f() -> str:
@@ -120,7 +120,7 @@ async def f() -> str:
120120
main:5: error: Incompatible types in assignment (expression has type "int", variable has type "str")
121121

122122
[case testAwaitReturnError]
123-
# flags: --fast-parser
123+
124124
async def g() -> int:
125125
return 0
126126
async def f() -> str:
@@ -131,7 +131,7 @@ async def f() -> str:
131131
main:6: error: Incompatible return value type (got "int", expected "str")
132132

133133
[case testAsyncFor]
134-
# flags: --fast-parser
134+
135135
from typing import AsyncIterator
136136
class C(AsyncIterator[int]):
137137
async def __anext__(self) -> int: return 0
@@ -142,7 +142,7 @@ async def f() -> None:
142142
[out]
143143

144144
[case testAsyncForError]
145-
# flags: --fast-parser
145+
146146
from typing import AsyncIterator
147147
async def f() -> None:
148148
async for x in [1]:
@@ -153,7 +153,7 @@ main:4: error: AsyncIterable expected
153153
main:4: error: List[int] has no attribute "__aiter__"
154154

155155
[case testAsyncForTypeComments]
156-
# flags: --fast-parser
156+
157157
from typing import AsyncIterator, Union
158158
class C(AsyncIterator[int]):
159159
async def __anext__(self) -> int: return 0
@@ -169,7 +169,7 @@ async def f() -> None:
169169
[builtins fixtures/async_await.pyi]
170170

171171
[case testAsyncWith]
172-
# flags: --fast-parser
172+
173173
class C:
174174
async def __aenter__(self) -> int: pass
175175
async def __aexit__(self, x, y, z) -> None: pass
@@ -180,7 +180,7 @@ async def f() -> None:
180180

181181

182182
[case testAsyncWithError]
183-
# flags: --fast-parser
183+
184184
class C:
185185
def __enter__(self) -> int: pass
186186
def __exit__(self, x, y, z) -> None: pass
@@ -193,7 +193,7 @@ main:6: error: "C" has no attribute "__aenter__"; maybe "__enter__"?
193193
main:6: error: "C" has no attribute "__aexit__"; maybe "__exit__"?
194194

195195
[case testAsyncWithErrorBadAenter]
196-
# flags: --fast-parser
196+
197197
class C:
198198
def __aenter__(self) -> int: pass
199199
async def __aexit__(self, x, y, z) -> None: pass
@@ -204,7 +204,7 @@ async def f() -> None:
204204
[out]
205205

206206
[case testAsyncWithErrorBadAenter2]
207-
# flags: --fast-parser
207+
208208
class C:
209209
def __aenter__(self) -> None: pass
210210
async def __aexit__(self, x, y, z) -> None: pass
@@ -215,7 +215,7 @@ async def f() -> None:
215215
[out]
216216

217217
[case testAsyncWithErrorBadAexit]
218-
# flags: --fast-parser
218+
219219
class C:
220220
async def __aenter__(self) -> int: pass
221221
def __aexit__(self, x, y, z) -> int: pass
@@ -226,7 +226,7 @@ async def f() -> None:
226226
[out]
227227

228228
[case testAsyncWithErrorBadAexit2]
229-
# flags: --fast-parser
229+
230230
class C:
231231
async def __aenter__(self) -> int: pass
232232
def __aexit__(self, x, y, z) -> None: pass
@@ -237,7 +237,7 @@ async def f() -> None:
237237
[out]
238238

239239
[case testAsyncWithTypeComments]
240-
# flags: --fast-parser
240+
241241
class C:
242242
async def __aenter__(self) -> int: pass
243243
async def __aexit__(self, x, y, z) -> None: pass
@@ -253,7 +253,7 @@ async def f() -> None:
253253
[builtins fixtures/async_await.pyi]
254254

255255
[case testNoYieldInAsyncDef]
256-
# flags: --fast-parser
256+
257257
async def f():
258258
yield None
259259
async def g():
@@ -267,7 +267,7 @@ main:5: error: 'yield' in async function
267267
main:7: error: 'yield' in async function
268268

269269
[case testNoYieldFromInAsyncDef]
270-
# flags: --fast-parser
270+
271271
async def f():
272272
yield from []
273273
async def g():
@@ -278,12 +278,12 @@ main:3: error: 'yield from' in async function
278278
main:5: error: 'yield from' in async function
279279

280280
[case testNoAsyncDefInPY2_python2]
281-
# flags: --fast-parser
281+
282282
async def f(): # E: invalid syntax
283283
pass
284284

285285
[case testYieldFromNoAwaitable]
286-
# flags: --fast-parser
286+
287287
from typing import Any, Generator
288288
async def f() -> str:
289289
return ''
@@ -295,7 +295,7 @@ def g() -> Generator[Any, None, str]:
295295
main:6: error: "yield from" can't be applied to Awaitable[str]
296296

297297
[case testAwaitableSubclass]
298-
# flags: --fast-parser
298+
299299
from typing import Any, AsyncIterator, Awaitable, Generator
300300
class A(Awaitable[int]):
301301
def __await__(self) -> Generator[Any, None, int]:
@@ -322,7 +322,7 @@ async def main() -> None:
322322
[out]
323323

324324
[case testYieldTypeCheckInDecoratedCoroutine]
325-
# flags: --fast-parser
325+
326326
from typing import Generator
327327
from types import coroutine
328328
@coroutine
@@ -342,7 +342,7 @@ def f() -> Generator[int, str, int]:
342342
-- ------------------------------------------
343343

344344
[case testFullCoroutineMatrix]
345-
# flags: --fast-parser
345+
346346
from typing import Any, AsyncIterator, Awaitable, Generator, Iterator
347347
from types import coroutine
348348

0 commit comments

Comments
 (0)