diff options
author | eykamp <chris@eykamp.com> | 2022-09-08 16:50:30 -0400 |
---|---|---|
committer | CaselIT <cfederico87@gmail.com> | 2022-09-11 22:36:24 +0200 |
commit | 747ec301529cf2a08d56d3596aedbf54a93b8742 (patch) | |
tree | aca4cb58c162f4296ee4f2d1fbf1b7c30187c5ee /alembic/operations | |
parent | 5b081ce74a3af15ab9a4b36760bcaa6500918f0e (diff) | |
download | alembic-747ec301529cf2a08d56d3596aedbf54a93b8742.tar.gz |
Add missing types to **kw
Simple change to fix (some) type checking with Pyright and friends.
Add missing types to **kw
Simple update to types, consistent with other similar instances already in place.
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-->
This pull request is: somewhere between the first and second options. I don't think it merits an issue or test coverage.
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
**Have a nice day!**
Closes: #1073
Pull-request: https://github.com/sqlalchemy/alembic/pull/1073
Pull-request-sha: 34f0e38e7193a65b659e8af7fff553427048f536
Change-Id: I5f84478e59a74d3d841ff32a0c536e5b32cc9b21
Diffstat (limited to 'alembic/operations')
-rw-r--r-- | alembic/operations/ops.py | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py index 176c6ba..997274d 100644 --- a/alembic/operations/ops.py +++ b/alembic/operations/ops.py @@ -260,7 +260,7 @@ class CreatePrimaryKeyOp(AddConstraintOp): table_name: str, columns: Sequence[str], schema: Optional[str] = None, - **kw, + **kw: Any, ) -> None: self.constraint_name = constraint_name self.table_name = table_name @@ -385,7 +385,7 @@ class CreateUniqueConstraintOp(AddConstraintOp): table_name: str, columns: Sequence[str], schema: Optional[str] = None, - **kw, + **kw: Any, ) -> None: self.constraint_name = constraint_name self.table_name = table_name @@ -436,7 +436,7 @@ class CreateUniqueConstraintOp(AddConstraintOp): 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. @@ -485,7 +485,7 @@ class CreateUniqueConstraintOp(AddConstraintOp): operations: "BatchOperations", constraint_name: str, columns: Sequence[str], - **kw, + **kw: Any, ) -> Any: """Issue a "create unique constraint" instruction using the current batch migration context. @@ -520,7 +520,7 @@ class CreateForeignKeyOp(AddConstraintOp): referent_table: str, local_cols: List[str], remote_cols: List[str], - **kw, + **kw: Any, ) -> None: self.constraint_name = constraint_name self.source_table = source_table @@ -602,7 +602,7 @@ class CreateForeignKeyOp(AddConstraintOp): 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. @@ -680,7 +680,7 @@ class CreateForeignKeyOp(AddConstraintOp): deferrable: None = None, initially: None = None, match: None = None, - **dialect_kw, + **dialect_kw: Any, ) -> None: """Issue a "create foreign key" instruction using the current batch migration context. @@ -736,7 +736,7 @@ class CreateCheckConstraintOp(AddConstraintOp): table_name: str, condition: Union[str, "TextClause", "ColumnElement[Any]"], schema: Optional[str] = None, - **kw, + **kw: Any, ) -> None: self.constraint_name = constraint_name self.table_name = table_name @@ -780,7 +780,7 @@ class CreateCheckConstraintOp(AddConstraintOp): 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. @@ -831,7 +831,7 @@ class CreateCheckConstraintOp(AddConstraintOp): operations: "BatchOperations", constraint_name: str, condition: "TextClause", - **kw, + **kw: Any, ) -> Optional["Table"]: """Issue a "create check constraint" instruction using the current batch migration context. @@ -866,7 +866,7 @@ class CreateIndexOp(MigrateOperation): columns: Sequence[Union[str, "TextClause", "ColumnElement[Any]"]], schema: Optional[str] = None, unique: bool = False, - **kw, + **kw: Any, ) -> None: self.index_name = index_name self.table_name = table_name @@ -917,7 +917,7 @@ class CreateIndexOp(MigrateOperation): columns: Sequence[Union[str, "TextClause", "Function"]], schema: Optional[str] = None, unique: bool = False, - **kw, + **kw: Any, ) -> Optional["Table"]: r"""Issue a "create index" instruction using the current migration context. @@ -971,7 +971,7 @@ class CreateIndexOp(MigrateOperation): operations: "BatchOperations", index_name: str, columns: List[str], - **kw, + **kw: Any, ) -> Optional["Table"]: """Issue a "create index" instruction using the current batch migration context. @@ -1003,7 +1003,7 @@ class DropIndexOp(MigrateOperation): table_name: Optional[str] = None, schema: Optional[str] = None, _reverse: Optional["CreateIndexOp"] = None, - **kw, + **kw: Any, ) -> None: self.index_name = index_name self.table_name = table_name @@ -1050,7 +1050,7 @@ class DropIndexOp(MigrateOperation): index_name: str, table_name: Optional[str] = None, schema: Optional[str] = None, - **kw, + **kw: Any, ) -> Optional["Table"]: r"""Issue a "drop index" instruction using the current migration context. @@ -1078,7 +1078,7 @@ class DropIndexOp(MigrateOperation): @classmethod def batch_drop_index( - cls, operations: BatchOperations, index_name: str, **kw + cls, operations: BatchOperations, index_name: str, **kw: Any ) -> Optional["Table"]: """Issue a "drop index" instruction using the current batch migration context. @@ -1109,7 +1109,7 @@ class CreateTableOp(MigrateOperation): schema: Optional[str] = None, _namespace_metadata: Optional["MetaData"] = None, _constraints_included: bool = False, - **kw, + **kw: Any, ) -> None: self.table_name = table_name self.columns = columns @@ -1172,7 +1172,7 @@ class CreateTableOp(MigrateOperation): @classmethod def create_table( - cls, operations: "Operations", table_name: str, *columns, **kw + cls, operations: "Operations", table_name: str, *columns, **kw: Any ) -> Optional["Table"]: r"""Issue a "create table" instruction using the current migration context. @@ -1607,7 +1607,7 @@ class AlterColumnOp(AlterTableOp): modify_server_default: Any = False, modify_name: Optional[str] = None, modify_type: Optional[Any] = None, - **kw, + **kw: Any, ) -> None: super(AlterColumnOp, self).__init__(table_name, schema=schema) self.column_name = column_name @@ -1770,7 +1770,7 @@ class AlterColumnOp(AlterTableOp): existing_nullable: Optional[bool] = None, existing_comment: Optional[str] = None, schema: Optional[str] = None, - **kw, + **kw: Any, ) -> Optional["Table"]: r"""Issue an "alter column" instruction using the current migration context. @@ -1897,7 +1897,7 @@ class AlterColumnOp(AlterTableOp): existing_comment: None = None, insert_before: None = None, insert_after: None = None, - **kw, + **kw: Any, ) -> Optional["Table"]: """Issue an "alter column" instruction using the current batch migration context. @@ -1954,7 +1954,7 @@ class AddColumnOp(AlterTableOp): table_name: str, column: "Column", schema: Optional[str] = None, - **kw, + **kw: Any, ) -> None: super(AddColumnOp, self).__init__(table_name, schema=schema) self.column = column @@ -2089,7 +2089,7 @@ class DropColumnOp(AlterTableOp): column_name: str, schema: Optional[str] = None, _reverse: Optional["AddColumnOp"] = None, - **kw, + **kw: Any, ) -> None: super(DropColumnOp, self).__init__(table_name, schema=schema) self.column_name = column_name @@ -2146,7 +2146,7 @@ class DropColumnOp(AlterTableOp): table_name: str, column_name: str, schema: Optional[str] = None, - **kw, + **kw: Any, ) -> Optional["Table"]: """Issue a "drop column" instruction using the current migration context. @@ -2190,7 +2190,7 @@ class DropColumnOp(AlterTableOp): @classmethod def batch_drop_column( - cls, operations: "BatchOperations", column_name: str, **kw + cls, operations: "BatchOperations", column_name: str, **kw: Any ) -> Optional["Table"]: """Issue a "drop column" instruction using the current batch migration context. |