-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Consistent quote wrapping around MessageBuilder.format #3873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b4b7de9
466a832
dc7c243
df58633
ba55b1a
e134f8f
60231de
735778e
5922be3
b349b8e
6a45cad
048dae1
3bba4bd
e6e1701
d884e03
e0b5a30
04393b6
fc11a6f
f288a60
e10a803
b4f0b78
4bb8d3f
8a27e2c
6a7ec9b
a8fe400
daa6792
96961c0
5bc7251
a84b4bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ async def f() -> int: | |
return x | ||
[typing fixtures/typing-full.pyi] | ||
[out] | ||
main:7: error: Incompatible types in await (actual type Generator[int, None, str], expected type Awaitable[Any]) | ||
main:7: error: Incompatible types in await (actual type "Generator[int, None, str]", expected type "Awaitable[Any]") | ||
|
||
[case testAwaitIteratorError] | ||
|
||
|
@@ -105,7 +105,7 @@ async def f() -> int: | |
return x | ||
[typing fixtures/typing-full.pyi] | ||
[out] | ||
main:6: error: Incompatible types in await (actual type Iterator[Any], expected type Awaitable[Any]) | ||
main:6: error: Incompatible types in await (actual type "Iterator[Any]", expected type "Awaitable[Any]") | ||
|
||
[case testAwaitArgumentError] | ||
|
||
|
@@ -117,7 +117,7 @@ async def f() -> int: | |
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
[out] | ||
main:5: error: Incompatible types in await (actual type "int", expected type Awaitable[Any]) | ||
main:5: error: Incompatible types in await (actual type "int", expected type "Awaitable[Any]") | ||
|
||
[case testAwaitResultError] | ||
|
||
|
@@ -164,7 +164,7 @@ async def f() -> None: | |
[typing fixtures/typing-full.pyi] | ||
[out] | ||
main:4: error: AsyncIterable expected | ||
main:4: error: List[int] has no attribute "__aiter__" | ||
main:4: error: "List[int]" has no attribute "__aiter__" | ||
|
||
[case testAsyncForTypeComments] | ||
|
||
|
@@ -248,13 +248,13 @@ async def wrong_iterable(obj: Iterable[int]): | |
|
||
[out] | ||
main:18: error: AsyncIterable expected | ||
main:18: error: Iterable[int] has no attribute "__aiter__"; maybe "__iter__"? | ||
main:18: error: "Iterable[int]" has no attribute "__aiter__"; maybe "__iter__"? | ||
main:19: error: Iterable expected | ||
main:19: error: asyncify[int] has no attribute "__iter__"; maybe "__aiter__"? | ||
main:19: error: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? | ||
main:20: error: AsyncIterable expected | ||
main:20: error: Iterable[int] has no attribute "__aiter__"; maybe "__iter__"? | ||
main:20: error: "Iterable[int]" has no attribute "__aiter__"; maybe "__iter__"? | ||
main:21: error: Iterable expected | ||
main:21: error: asyncify[int] has no attribute "__iter__"; maybe "__aiter__"? | ||
main:21: error: "asyncify[int]" has no attribute "__iter__"; maybe "__aiter__"? | ||
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
|
||
|
@@ -290,7 +290,7 @@ class C: | |
def __aenter__(self) -> int: pass | ||
async def __aexit__(self, x, y, z) -> None: pass | ||
async def f() -> None: | ||
async with C() as x: # E: Incompatible types in "async with" for __aenter__ (actual type "int", expected type Awaitable[Any]) | ||
async with C() as x: # E: Incompatible types in "async with" for __aenter__ (actual type "int", expected type "Awaitable[Any]") | ||
pass | ||
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
|
@@ -301,7 +301,7 @@ class C: | |
def __aenter__(self) -> None: pass | ||
async def __aexit__(self, x, y, z) -> None: pass | ||
async def f() -> None: | ||
async with C() as x: # E: None has no attribute "__await__" | ||
async with C() as x: # E: "None" has no attribute "__await__" | ||
pass | ||
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
|
@@ -312,7 +312,7 @@ class C: | |
async def __aenter__(self) -> int: pass | ||
def __aexit__(self, x, y, z) -> int: pass | ||
async def f() -> None: | ||
async with C() as x: # E: Incompatible types in "async with" for __aexit__ (actual type "int", expected type Awaitable[Any]) | ||
async with C() as x: # E: Incompatible types in "async with" for __aexit__ (actual type "int", expected type "Awaitable[Any]") | ||
pass | ||
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
|
@@ -323,7 +323,7 @@ class C: | |
async def __aenter__(self) -> int: pass | ||
def __aexit__(self, x, y, z) -> None: pass | ||
async def f() -> None: | ||
async with C() as x: # E: None has no attribute "__await__" | ||
async with C() as x: # E: "None" has no attribute "__await__" | ||
pass | ||
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
|
@@ -383,7 +383,7 @@ def g() -> Generator[Any, None, str]: | |
[builtins fixtures/async_await.pyi] | ||
[typing fixtures/typing-full.pyi] | ||
[out] | ||
main:6: error: "yield from" can't be applied to Awaitable[str] | ||
main:6: error: "yield from" can't be applied to "Awaitable[str]" | ||
|
||
[case testAwaitableSubclass] | ||
|
||
|
@@ -550,7 +550,7 @@ def h() -> None: | |
|
||
[out] | ||
main:9: error: Iterable expected | ||
main:9: error: AsyncGenerator[int, None] has no attribute "__iter__"; maybe "__aiter__"? | ||
main:9: error: "AsyncGenerator[int, None]" has no attribute "__iter__"; maybe "__aiter__"? | ||
|
||
[case testAsyncGeneratorNoYieldFrom] | ||
# flags: --fast-parser --python-version 3.6 | ||
|
@@ -636,19 +636,19 @@ def plain_host_generator() -> Generator[str, None, None]: | |
yield 'a' | ||
x = 0 | ||
x = yield from plain_generator() | ||
x = yield from plain_coroutine() # E: "yield from" can't be applied to Awaitable[int] | ||
x = yield from plain_coroutine() # E: "yield from" can't be applied to "Awaitable[int]" | ||
x = yield from decorated_generator() | ||
x = yield from decorated_coroutine() # E: "yield from" can't be applied to AwaitableGenerator[Any, Any, int, Awaitable[int]] | ||
x = yield from decorated_coroutine() # E: "yield from" can't be applied to "AwaitableGenerator[Any, Any, int, Awaitable[int]]" | ||
x = yield from other_iterator() | ||
x = yield from other_coroutine() # E: "yield from" can't be applied to "Aw" | ||
|
||
async def plain_host_coroutine() -> None: | ||
x = 0 | ||
x = await plain_generator() # E: Incompatible types in await (actual type Generator[str, None, int], expected type Awaitable[Any]) | ||
x = await plain_generator() # E: Incompatible types in await (actual type "Generator[str, None, int]", expected type "Awaitable[Any]") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar situation here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But again, this is a story for a separate PR. |
||
x = await plain_coroutine() | ||
x = await decorated_generator() | ||
x = await decorated_coroutine() | ||
x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type Awaitable[Any]) | ||
x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type "Awaitable[Any]") | ||
x = await other_coroutine() | ||
|
||
@coroutine | ||
|
@@ -665,11 +665,11 @@ def decorated_host_generator() -> Generator[str, None, None]: | |
@coroutine | ||
async def decorated_host_coroutine() -> None: | ||
x = 0 | ||
x = await plain_generator() # E: Incompatible types in await (actual type Generator[str, None, int], expected type Awaitable[Any]) | ||
x = await plain_generator() # E: Incompatible types in await (actual type "Generator[str, None, int]", expected type "Awaitable[Any]") | ||
x = await plain_coroutine() | ||
x = await decorated_generator() | ||
x = await decorated_coroutine() | ||
x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type Awaitable[Any]) | ||
x = await other_iterator() # E: Incompatible types in await (actual type "It", expected type "Awaitable[Any]") | ||
x = await other_coroutine() | ||
|
||
[builtins fixtures/async_await.pyi] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still some inconsistency in formatting attribute names here
__aexit__
and few lines above"__await__"
. Would you like to fix this in a separate PR?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I suspect these will be more about specific message cleanup than anything else; I'll file an issue with the list of things you've spotted, so I don't lose track of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened #3887 for this.