diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi index 824499d311c3..80dfff42e69c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi @@ -172,7 +172,7 @@ class Engine(Connectable, Identified): def name(self) -> str: ... @property def driver(self): ... - def dispose(self) -> None: ... + def dispose(self, close: bool = ...) -> None: ... class _trans_ctx: conn: Connection diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi index 964a52d303af..23a5624b6fc7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi @@ -126,10 +126,11 @@ def with_polymorphic( flat: bool = ..., polymorphic_on: Any | None = ..., aliased: bool = ..., + adapt_on_names: bool = ..., innerjoin: bool = ..., _use_mapper_path: bool = ..., _existing_alias: Any | None = ..., -): ... +) -> AliasedClass: ... class Bundle(ORMColumnsClauseRole, SupportsCloneAnnotations, sql_base.MemoizedHasCacheKey, InspectionAttr): single_entity: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi index 873b414b49c4..76058ff32451 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi @@ -3,7 +3,7 @@ from typing import Any from ..util import HasMemoized from .base import Executable, Generative from .elements import BinaryExpression, ColumnElement, NamedColumn -from .selectable import FromClause +from .selectable import FromClause, TableValuedAlias from .visitors import TraversibleType def register_function(identifier, fn, package: str = ...) -> None: ... @@ -28,7 +28,7 @@ class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative): def filter(self, *criterion): ... def as_comparison(self, left_index, right_index): ... def within_group_type(self, within_group) -> None: ... - def alias(self, name: Any | None = ...): ... # type: ignore[override] + def alias(self, name: str | None = ..., joins_implicitly: bool = ...) -> TableValuedAlias: ... # type: ignore[override] def select(self): ... def scalar(self): ... def execute(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi index 400503ba8462..2e87a4e23fad 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi @@ -43,6 +43,7 @@ def testing_engine( future: Any | None = ..., asyncio: bool = ..., transfer_staticpool: bool = ..., + _sqlite_savepoint: bool = ..., ): ... def mock_engine(dialect_name: Any | None = ...): ...