mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-30 17:15:21 +08:00
Adds support for "async with" via #1818
This commit is contained in:
@@ -105,3 +105,22 @@ async def f():
|
||||
f = await C().async_for_classmethod()
|
||||
#? C()
|
||||
f
|
||||
|
||||
|
||||
class AsyncCtxMgr:
|
||||
def some_method():
|
||||
pass
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
async def __aexit__(self, *args):
|
||||
pass
|
||||
|
||||
|
||||
async def asyncctxmgr():
|
||||
async with AsyncCtxMgr() as acm:
|
||||
#? AsyncCtxMgr()
|
||||
acm
|
||||
#? ['some_method']
|
||||
acm.som
|
||||
|
||||
Reference in New Issue
Block a user