Skip to content

Commit 578a48a

Browse files
committed
Fix sqlalchemy.ddl.DDL.execute_if dialect type (dropbox#181)
dialect should be a string a list/tuple/set of strings. Not a Dialect object. https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4_18/lib/sqlalchemy/sql/ddl.py#L158 Closes dropbox#181
1 parent 810adf2 commit 578a48a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sqlalchemy-stubs/sql/ddl.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DDLElement(Executable, _DDLCompiles):
3333
def execute_at(self, event_name: str, target: SchemaItem) -> None: ...
3434
def against(self: _DDLE, target: SchemaItem) -> _DDLE: ...
3535
state: Any = ...
36-
def execute_if(self: _DDLE, dialect: Optional[Dialect] = ..., callable_: Optional[_DDLCallable] = ...,
36+
def execute_if(self: _DDLE, dialect: Optional[Union[str, Sequence[str]]] = ..., callable_: Optional[_DDLCallable] = ...,
3737
state: Optional[Any] = ...) -> _DDLE: ...
3838
def __call__(self, target: Optional[Union[Table, MetaData]], bind: Connection, **kw: Any) -> Optional[ResultProxy]: ...
3939

0 commit comments

Comments
 (0)