asyncpg icon indicating copy to clipboard operation
asyncpg copied to clipboard

Add type hint to entering PoolAcquireContext.

Open robhaswell opened this issue 4 years ago • 1 comments

This branch allows type checking editors like VScode to determine that async with pg.acquire() as conn results in conn having a type of asyncpg.connection.Connection.

robhaswell avatar May 26 '21 12:05 robhaswell

i face the same issue today in 2022. and for whatever reason "-> connection.Connection:" doesn't seem to be working. But if i actually "from .connection import Connection" and make it "-> Connection:", everything works great. I don't feel like a very experienced pullrequester, can someone please check what's wrong 😂

MarsBatya avatar Apr 06 '22 11:04 MarsBatya