@@ -33,7 +33,7 @@ def __init__(self, url: str, **kwargs):
3333 self ._session = scoped_session (sessionmaker (bind = self ._engine , expire_on_commit = False ))
3434
3535 @contextmanager
36- def create_session (self ) -> Generator [Session , None , None ]:
36+ def create_session (self ) -> Generator [Session ]:
3737 """Create a new session for the current thread."""
3838 session = self ._session ()
3939 try :
@@ -137,7 +137,7 @@ def __init__(self, url: str, **kwargs):
137137 self ._session = async_sessionmaker (bind = self ._engine , expire_on_commit = False )
138138
139139 @asynccontextmanager
140- async def acreate_session (self ) -> AsyncGenerator [AsyncSession , None ]:
140+ async def acreate_session (self ) -> AsyncGenerator [AsyncSession ]:
141141 """Create a new session for the current thread."""
142142 session = self ._session ()
143143 try :
@@ -191,7 +191,7 @@ async def afetch_one(self, query: str, *, params: Mapping | None = None) -> dict
191191 return row ._asdict () if row else {}
192192
193193 async def afetch_many (
194- self , query : str , * , params : Mapping | None = None , n : int = 1
194+ self , query : str , * , params : Mapping | None = None , n : int = 1 ,
195195 ) -> list [dict ]:
196196 """Fetch the first `n` results of the given SQL query with optional parameters.
197197
0 commit comments