]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Fix mypy linting issues
authorMaciek Bryński <maciek@brynski.pl>
Thu, 31 Oct 2024 16:47:35 +0000 (12:47 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Thu, 31 Oct 2024 16:47:35 +0000 (12:47 -0400)
### 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: #<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: #1564
Pull-request: https://github.com/sqlalchemy/alembic/pull/1564
Pull-request-sha: a79d47d3acf7ae628ead7ca829bfe1c6f864c3c9

Change-Id: I3be88b6328dc07c46e6b1ddf8c85480dc88cfe95

alembic/ddl/base.py

index 690c153763944521e310a33e0e4e3c14117ef9f9..6fbe95245ccf497d6ae7defbc4caa78940c5940c 100644 (file)
@@ -175,7 +175,7 @@ class ColumnComment(AlterColumn):
         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
 ):