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

index 849d37ab227375e73627396bd48c108f932f2b17..9010afcdecfaedbda7d9bd6363cba97fd5a7aa3a 100644 (file)
@@ -4621,9 +4621,35 @@ class sessionmaker(_SessionClassMethods, Generic[_S]):
 
     class_: Type[_S]
 
+    @overload
+    def __init__(
+        self,
+        bind: Optional[_SessionBind] = ...,
+        *,
+        class_: Type[_S],
+        autoflush: bool = ...,
+        expire_on_commit: bool = ...,
+        info: Optional[_InfoType] = ...,
+        **kw: Any,
+    ):
+        ...
+
+    @overload
+    def __init__(
+        self: "sessionmaker[Session]",
+        bind: Optional[_SessionBind] = ...,
+        *,
+        autoflush: bool = ...,
+        expire_on_commit: bool = ...,
+        info: Optional[_InfoType] = ...,
+        **kw: Any,
+    ):
+        ...
+
     def __init__(
         self,
         bind: Optional[_SessionBind] = None,
+        *,
         class_: Type[_S] = Session,  # type: ignore
         autoflush: bool = True,
         expire_on_commit: bool = True,