-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace public usages of
functools.wraps
(#2796)
* Replace public usages of `functools.wraps` * Fix a couple CI errors * Don't blank out on how `wraps` actually works.... * Don't try to pretend wrapped functions are what they wrap * Fix pyright type completeness * Finish off TODO * Basic type test framework * Small cleanup * Also make sure to pass type checking on the type tests! * Remove some unnecessary imports; oops * Fix a pytest skipif mistake * PR review changes * Forgot to check against pyright too * Mark wraps as a re-export from `_util` (hopefully flake8 likes this) * Fix CI errors :( * Possibly last fixes * Fix weird mypy errors * Remove redundent mypy run --------- Co-authored-by: CoolCat467 <[email protected]>
- Loading branch information
1 parent
c30c76f
commit 170642e
Showing
8 changed files
with
40 additions
and
7 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# https://github.com/python-trio/trio/issues/2775#issuecomment-1702267589 | ||
# (except platform independent...) | ||
import typing_extensions | ||
|
||
import trio | ||
|
||
|
||
async def fn(s: trio.SocketStream) -> None: | ||
result = await s.socket.sendto(b"a", "h") | ||
typing_extensions.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