From 431fd0783e2e414cac5b0d0f002d7adc71df3f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciek=20Bry=C5=84ski?= Date: Thu, 31 Oct 2024 12:47:35 -0400 Subject: [PATCH] Fix mypy linting issues ### Description Fixing mypy linting issues for new mypy version. ### Checklist This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] 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: #` 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: #` in the commit message - please include tests. **Have a nice day!** Closes: #1564 Pull-request: https://github.com/sqlalchemy/alembic/pull/1564 Pull-request-sha: a79d47d3acf7ae628ead7ca829bfe1c6f864c3c9 Change-Id: I3be88b6328dc07c46e6b1ddf8c85480dc88cfe95 --- alembic/ddl/base.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/alembic/ddl/base.py b/alembic/ddl/base.py index 690c1537..6fbe9524 100644 --- a/alembic/ddl/base.py +++ b/alembic/ddl/base.py @@ -175,7 +175,7 @@ def __init__( self.comment = comment -@compiles(RenameTable) # type: ignore[misc] +@compiles(RenameTable) def visit_rename_table( element: RenameTable, compiler: DDLCompiler, **kw ) -> str: @@ -185,7 +185,7 @@ def visit_rename_table( ) -@compiles(AddColumn) # type: ignore[misc] +@compiles(AddColumn) def visit_add_column(element: AddColumn, compiler: DDLCompiler, **kw) -> str: return "%s %s" % ( alter_table(compiler, element.table_name, element.schema), @@ -193,7 +193,7 @@ def visit_add_column(element: AddColumn, compiler: DDLCompiler, **kw) -> str: ) -@compiles(DropColumn) # type: ignore[misc] +@compiles(DropColumn) def visit_drop_column(element: DropColumn, compiler: DDLCompiler, **kw) -> str: return "%s %s" % ( alter_table(compiler, element.table_name, element.schema), @@ -201,7 +201,7 @@ def visit_drop_column(element: DropColumn, compiler: DDLCompiler, **kw) -> str: ) -@compiles(ColumnNullable) # type: ignore[misc] +@compiles(ColumnNullable) def visit_column_nullable( element: ColumnNullable, compiler: DDLCompiler, **kw ) -> str: @@ -212,7 +212,7 @@ def visit_column_nullable( ) -@compiles(ColumnType) # type: ignore[misc] +@compiles(ColumnType) def visit_column_type(element: ColumnType, compiler: DDLCompiler, **kw) -> str: return "%s %s %s" % ( alter_table(compiler, element.table_name, element.schema), @@ -221,7 +221,7 @@ def visit_column_type(element: ColumnType, compiler: DDLCompiler, **kw) -> str: ) -@compiles(ColumnName) # type: ignore[misc] +@compiles(ColumnName) def visit_column_name(element: ColumnName, compiler: DDLCompiler, **kw) -> str: return "%s RENAME %s TO %s" % ( alter_table(compiler, element.table_name, element.schema), @@ -230,7 +230,7 @@ def visit_column_name(element: ColumnName, compiler: DDLCompiler, **kw) -> str: ) -@compiles(ColumnDefault) # type: ignore[misc] +@compiles(ColumnDefault) def visit_column_default( element: ColumnDefault, compiler: DDLCompiler, **kw ) -> str: @@ -245,7 +245,7 @@ def visit_column_default( ) -@compiles(ComputedColumnDefault) # type: ignore[misc] +@compiles(ComputedColumnDefault) def visit_computed_column( element: ComputedColumnDefault, compiler: DDLCompiler, **kw ): @@ -255,7 +255,7 @@ def visit_computed_column( ) -@compiles(IdentityColumnDefault) # type: ignore[misc] +@compiles(IdentityColumnDefault) def visit_identity_column( element: IdentityColumnDefault, compiler: DDLCompiler, **kw ):