Skip to content

Commit

Permalink
Correct pool aexit types. (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
jettify committed Apr 8, 2023
1 parent eea5dfb commit 5f81278
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aioodbc/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import asyncio
import collections
import warnings
from typing import Any, Deque, Dict, Optional, Set
from types import TracebackType
from typing import Any, Deque, Dict, Optional, Set, Type

from pyodbc import ProgrammingError

Expand Down Expand Up @@ -195,7 +196,10 @@ async def __aenter__(self) -> "Pool":
return self

async def __aexit__(
self, exc_type: None, exc_val: None, exc_tb: None
self,
exc_type: Optional[Type[BaseException]],
exc: Optional[BaseException],
tb: Optional[TracebackType],
) -> None:
self.close()
await self.wait_closed()
Expand Down

0 comments on commit 5f81278

Please sign in to comment.