forked from python-trio/trio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change all instances of 'import typing as ...' to 'from typing import…
… ...' (python-trio#2935) * replace 'import typing as t' to 'from typing import ...' in src/trio/_util.py as used in all other files * change typing_extensions import in src/trio/_tests/type_tests/check_wraps.py * clarify import-related comments in src/trio/socket.py and src/trio/lowlevel.py
- Loading branch information
Showing
4 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# https://github.com/python-trio/trio/issues/2775#issuecomment-1702267589 | ||
# (except platform independent...) | ||
import trio | ||
import typing_extensions | ||
from typing_extensions import assert_type | ||
|
||
|
||
async def fn(s: trio.SocketStream) -> None: | ||
result = await s.socket.sendto(b"a", "h") | ||
typing_extensions.assert_type(result, int) | ||
assert_type(result, int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters