@@ -183,7 +183,6 @@ async def f() -> None:
183183[typing fixtures/typing-async.pyi]
184184
185185[case testAsyncForComprehension]
186- # flags: --python-version 3.6
187186from typing import Generic, Iterable, TypeVar, AsyncIterator, Tuple
188187
189188T = TypeVar('T')
@@ -223,7 +222,6 @@ async def generatorexp(obj: Iterable[int]):
223222[typing fixtures/typing-async.pyi]
224223
225224[case testAsyncForComprehensionErrors]
226- # flags: --python-version 3.6
227225from typing import Generic, Iterable, TypeVar, AsyncIterator, Tuple
228226
229227T = TypeVar('T')
@@ -240,16 +238,10 @@ class asyncify(Generic[T], AsyncIterator[T]):
240238 raise StopAsyncIteration
241239
242240async def wrong_iterable(obj: Iterable[int]):
243- [i async for i in obj]
244- [i for i in asyncify(obj)]
245- {i: i async for i in obj}
246- {i: i for i in asyncify(obj)}
247-
248- [out]
249- main:18: error: "Iterable[int]" has no attribute "__aiter__" (not async iterable)
250- main:19: error: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
251- main:20: error: "Iterable[int]" has no attribute "__aiter__" (not async iterable)
252- main:21: error: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
241+ [i async for i in obj] # E: "Iterable[int]" has no attribute "__aiter__" (not async iterable)
242+ [i for i in asyncify(obj)] # E: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
243+ {i: i async for i in obj} # E: "Iterable[int]" has no attribute "__aiter__" (not async iterable)
244+ {i: i for i in asyncify(obj)} # E: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
253245[builtins fixtures/async_await.pyi]
254246[typing fixtures/typing-async.pyi]
255247
@@ -340,17 +332,6 @@ async def f() -> None:
340332[builtins fixtures/async_await.pyi]
341333[typing fixtures/typing-async.pyi]
342334
343- [case testNoYieldInAsyncDef]
344- # flags: --python-version 3.5
345-
346- async def f():
347- yield None # E: "yield" in async function
348- async def g():
349- yield # E: "yield" in async function
350- async def h():
351- x = yield # E: "yield" in async function
352- [builtins fixtures/async_await.pyi]
353-
354335[case testNoYieldFromInAsyncDef]
355336
356337async def f():
@@ -422,7 +403,6 @@ def f() -> Generator[int, str, int]:
422403-- ---------------------------------------------------------------------
423404
424405[case testAsyncGenerator]
425- # flags: --python-version 3.6
426406from typing import AsyncGenerator, Generator
427407
428408async def f() -> int:
@@ -450,7 +430,6 @@ async def wrong_return() -> Generator[int, None, None]: # E: The return type of
450430[typing fixtures/typing-async.pyi]
451431
452432[case testAsyncGeneratorReturnIterator]
453- # flags: --python-version 3.6
454433from typing import AsyncIterator
455434
456435async def gen() -> AsyncIterator[int]:
@@ -466,7 +445,6 @@ async def use_gen() -> None:
466445[typing fixtures/typing-async.pyi]
467446
468447[case testAsyncGeneratorManualIter]
469- # flags: --python-version 3.6
470448from typing import AsyncGenerator
471449
472450async def genfunc() -> AsyncGenerator[int, None]:
@@ -484,7 +462,6 @@ async def user() -> None:
484462[typing fixtures/typing-async.pyi]
485463
486464[case testAsyncGeneratorAsend]
487- # flags: --python-version 3.6
488465from typing import AsyncGenerator
489466
490467async def f() -> None:
@@ -505,7 +482,6 @@ async def h() -> None:
505482[typing fixtures/typing-async.pyi]
506483
507484[case testAsyncGeneratorAthrow]
508- # flags: --python-version 3.6
509485from typing import AsyncGenerator
510486
511487async def gen() -> AsyncGenerator[str, int]:
@@ -524,25 +500,20 @@ async def h() -> None:
524500[typing fixtures/typing-async.pyi]
525501
526502[case testAsyncGeneratorNoSyncIteration]
527- # flags: --python-version 3.6
528503from typing import AsyncGenerator
529504
530505async def gen() -> AsyncGenerator[int, None]:
531506 for i in [1, 2, 3]:
532507 yield i
533508
534509def h() -> None:
535- for i in gen():
510+ for i in gen(): # E: "AsyncGenerator[int, None]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
536511 pass
537512
538513[builtins fixtures/dict.pyi]
539514[typing fixtures/typing-async.pyi]
540515
541- [out]
542- main:9: error: "AsyncGenerator[int, None]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable)
543-
544516[case testAsyncGeneratorNoYieldFrom]
545- # flags: --python-version 3.6
546517from typing import AsyncGenerator
547518
548519async def f() -> AsyncGenerator[int, None]:
@@ -555,7 +526,6 @@ async def gen() -> AsyncGenerator[int, None]:
555526[typing fixtures/typing-async.pyi]
556527
557528[case testAsyncGeneratorNoReturnWithValue]
558- # flags: --python-version 3.6
559529from typing import AsyncGenerator
560530
561531async def return_int() -> AsyncGenerator[int, None]:
0 commit comments