From: eykamp Date: Thu, 4 Aug 2022 17:41:17 +0000 (-0700) Subject: Add missing types to **kw X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34f0e38e7193a65b659e8af7fff553427048f536;p=thirdparty%2Fsqlalchemy%2Falembic.git Add missing types to **kw Simple change to fix (some) type checking with Pyright and friends. --- diff --git a/alembic/op.pyi b/alembic/op.pyi index 3745684f..efb56137 100644 --- a/alembic/op.pyi +++ b/alembic/op.pyi @@ -105,7 +105,7 @@ def alter_column( existing_nullable: Optional[bool] = None, existing_comment: Optional[str] = None, schema: Optional[str] = None, - **kw + **kw: Any, ) -> Optional[Table]: """Issue an "alter column" instruction using the current migration context. @@ -431,7 +431,7 @@ def create_check_constraint( table_name: str, condition: Union[str, BinaryExpression], schema: Optional[str] = None, - **kw + **kw: Any, ) -> Optional[Table]: """Issue a "create check constraint" instruction using the current migration context. @@ -527,7 +527,7 @@ def create_foreign_key( match: Optional[str] = None, source_schema: Optional[str] = None, referent_schema: Optional[str] = None, - **dialect_kw + **dialect_kw: Any, ) -> Optional[Table]: """Issue a "create foreign key" instruction using the current migration context. @@ -580,7 +580,7 @@ def create_index( columns: Sequence[Union[str, TextClause, Function]], schema: Optional[str] = None, unique: bool = False, - **kw + **kw: Any, ) -> Optional[Table]: """Issue a "create index" instruction using the current migration context. @@ -667,7 +667,7 @@ def create_primary_key( """ -def create_table(table_name: str, *columns, **kw) -> Optional[Table]: +def create_table(table_name: str, *columns, **kw: Any) -> Optional[Table]: """Issue a "create table" instruction using the current migration context. @@ -776,7 +776,7 @@ def create_unique_constraint( table_name: str, columns: Sequence[str], schema: Optional[str] = None, - **kw + **kw: Any, ) -> Any: """Issue a "create unique constraint" instruction using the current migration context. @@ -817,7 +817,7 @@ def create_unique_constraint( """ def drop_column( - table_name: str, column_name: str, schema: Optional[str] = None, **kw + table_name: str, column_name: str, schema: Optional[str] = None, **kw: Any ) -> Optional[Table]: """Issue a "drop column" instruction using the current migration context. @@ -879,7 +879,7 @@ def drop_index( index_name: str, table_name: Optional[str] = None, schema: Optional[str] = None, - **kw + **kw: Any, ) -> Optional[Table]: """Issue a "drop index" instruction using the current migration context.