@@ -93,7 +93,7 @@ async def f() -> int:
9393 return x
9494[typing fixtures/typing-full.pyi]
9595[out]
96- main:7: error: Incompatible types in await (actual type "Generator[int, None, str]", expected type "Awaitable[Any]")
96+ main:7: error: Incompatible types in " await" (actual type "Generator[int, None, str]", expected type "Awaitable[Any]")
9797
9898[case testAwaitIteratorError]
9999
@@ -105,7 +105,7 @@ async def f() -> int:
105105 return x
106106[typing fixtures/typing-full.pyi]
107107[out]
108- main:6: error: Incompatible types in await (actual type "Iterator[Any]", expected type "Awaitable[Any]")
108+ main:6: error: Incompatible types in " await" (actual type "Iterator[Any]", expected type "Awaitable[Any]")
109109
110110[case testAwaitArgumentError]
111111
@@ -117,7 +117,7 @@ async def f() -> int:
117117[builtins fixtures/async_await.pyi]
118118[typing fixtures/typing-full.pyi]
119119[out]
120- main:5: error: Incompatible types in await (actual type "int", expected type "Awaitable[Any]")
120+ main:5: error: Incompatible types in " await" (actual type "int", expected type "Awaitable[Any]")
121121
122122[case testAwaitResultError]
123123
@@ -290,7 +290,7 @@ class C:
290290 def __aenter__(self) -> int: pass
291291 async def __aexit__(self, x, y, z) -> None: pass
292292async def f() -> None:
293- async with C() as x: # E: Incompatible types in "async with" for __aenter__ (actual type "int", expected type "Awaitable[Any]")
293+ async with C() as x: # E: Incompatible types in "async with" for " __aenter__" (actual type "int", expected type "Awaitable[Any]")
294294 pass
295295[builtins fixtures/async_await.pyi]
296296[typing fixtures/typing-full.pyi]
@@ -312,7 +312,7 @@ class C:
312312 async def __aenter__(self) -> int: pass
313313 def __aexit__(self, x, y, z) -> int: pass
314314async def f() -> None:
315- async with C() as x: # E: Incompatible types in "async with" for __aexit__ (actual type "int", expected type "Awaitable[Any]")
315+ async with C() as x: # E: Incompatible types in "async with" for " __aexit__" (actual type "int", expected type "Awaitable[Any]")
316316 pass
317317[builtins fixtures/async_await.pyi]
318318[typing fixtures/typing-full.pyi]
@@ -419,7 +419,7 @@ from types import coroutine
419419@coroutine
420420def f() -> Generator[int, str, int]:
421421 x = yield 0
422- x = yield '' # E: Incompatible types in yield (actual type "str", expected type "int")
422+ x = yield '' # E: Incompatible types in " yield" (actual type "str", expected type "int")
423423 reveal_type(x) # E: Revealed type is 'builtins.str'
424424 if x:
425425 return 0
@@ -443,7 +443,7 @@ async def g() -> AsyncGenerator[int, None]:
443443 reveal_type(value) # E: Revealed type is 'builtins.int*'
444444 yield value
445445
446- yield 'not an int' # E: Incompatible types in yield (actual type "str", expected type "int")
446+ yield 'not an int' # E: Incompatible types in " yield" (actual type "str", expected type "int")
447447 # return without a value is fine
448448 return
449449reveal_type(g) # E: Revealed type is 'def () -> typing.AsyncGenerator[builtins.int, builtins.None]'
@@ -466,7 +466,7 @@ from typing import AsyncIterator
466466async def gen() -> AsyncIterator[int]:
467467 yield 3
468468
469- yield 'not an int' # E: Incompatible types in yield (actual type "str", expected type "int")
469+ yield 'not an int' # E: Incompatible types in " yield" (actual type "str", expected type "int")
470470
471471async def use_gen() -> None:
472472 async for item in gen():
@@ -644,11 +644,11 @@ def plain_host_generator() -> Generator[str, None, None]:
644644
645645async def plain_host_coroutine() -> None:
646646 x = 0
647- x = await plain_generator() # E: Incompatible types in await (actual type "Generator[str, None, int]", expected type "Awaitable[Any]")
647+ x = await plain_generator() # E: Incompatible types in " await" (actual type "Generator[str, None, int]", expected type "Awaitable[Any]")
648648 x = await plain_coroutine()
649649 x = await decorated_generator()
650650 x = await decorated_coroutine()
651- x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type "Awaitable[Any]")
651+ x = await other_iterator() # E: Incompatible types in " await" (actual type "It", expected type "Awaitable[Any]")
652652 x = await other_coroutine()
653653
654654@coroutine
@@ -665,11 +665,11 @@ def decorated_host_generator() -> Generator[str, None, None]:
665665@coroutine
666666async def decorated_host_coroutine() -> None:
667667 x = 0
668- x = await plain_generator() # E: Incompatible types in await (actual type "Generator[str, None, int]", expected type "Awaitable[Any]")
668+ x = await plain_generator() # E: Incompatible types in " await" (actual type "Generator[str, None, int]", expected type "Awaitable[Any]")
669669 x = await plain_coroutine()
670670 x = await decorated_generator()
671671 x = await decorated_coroutine()
672- x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type "Awaitable[Any]")
672+ x = await other_iterator() # E: Incompatible types in " await" (actual type "It", expected type "Awaitable[Any]")
673673 x = await other_coroutine()
674674
675675[builtins fixtures/async_await.pyi]
0 commit comments