Add AsyncContextManager generic class by ilevkivskyi · Pull Request #438 · python/typing
-
Notifications
You must be signed in to change notification settings - Fork 299
Conversation
Ivan Levkivskyi added 3 commits
| yield 42 | ||
|
|
||
| cm = manager() | ||
| self.assertNotIsInstance(cm, typing.AsyncContextManager) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a test that also serves as an example of how to use AsyncContextManager (presumably in async with ...?
I was planning to do this after AbstractAsyncContextManager is merged into CPython (python/cpython#1412), but there's really no need to wait. The code looks good to me. It would be nice if this can make it into 3.6.2.
JelleZijlstra added a commit to JelleZijlstra/typeshed that referenced this pull request
This file contains hidden or 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