Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow type checkers to determine that entering a PoolAcquireContext r…
…eturns a Connection.
  • Loading branch information
Rob Haswell committed May 26, 2021
commit 51bb92fcf0fd1cf3d6478d3b82cacb0231cd3951
2 changes: 1 addition & 1 deletion asyncpg/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def __init__(self, pool, timeout):
self.connection = None
self.done = False

async def __aenter__(self):
async def __aenter__(self) -> connection.Connection:
if self.connection is not None or self.done:
raise exceptions.InterfaceError('a connection is already acquired')
self.connection = await self.pool._acquire(self.timeout)
Expand Down