]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Update session.py
authorSam Bull <aa6bs0@sambull.org>
Sat, 19 Nov 2022 15:36:10 +0000 (15:36 +0000)
committerGitHub <noreply@github.com>
Sat, 19 Nov 2022 15:36:10 +0000 (15:36 +0000)
lib/sqlalchemy/ext/asyncio/session.py

index 56e54867404cdd7b8da59add882c422dea1dcdf9..5c0b4ee9c18517df9a91620e776c53b7b108d5c5 100644 (file)
@@ -1438,9 +1438,9 @@ class async_sessionmaker(Generic[_AS]):
 
     @overload
     def __init__(
-        self: "async_sessionmaker[AsyncSession]",
-        bind: Optional[_AsyncSessionBind] = ...,
-        *,
+        self,
+        bind: Optional[_AsyncSessionBind],
+        class_: Type[_AS],
         autoflush: bool = ...,
         expire_on_commit: bool = ...,
         info: Optional[_InfoType] = ...,
@@ -1450,7 +1450,8 @@ class async_sessionmaker(Generic[_AS]):
     @overload
     def __init__(
         self,
-        bind: Optional[_AsyncSessionBind],
+        bind: Optional[_AsyncSessionBind] = ...,
+        *,
         class_: Type[_AS],
         autoflush: bool = ...,
         expire_on_commit: bool = ...,
@@ -1460,10 +1461,9 @@ class async_sessionmaker(Generic[_AS]):
         ...
     @overload
     def __init__(
-        self,
+        self: "async_sessionmaker[AsyncSession]",
         bind: Optional[_AsyncSessionBind] = ...,
         *,
-        class_: Type[_AS],
         autoflush: bool = ...,
         expire_on_commit: bool = ...,
         info: Optional[_InfoType] = ...,