Skip to content

Commit

Permalink
Fix mypy linting issues
Browse files Browse the repository at this point in the history
### 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: sqlalchemy/alembic#1564
Pull-request-sha: a79d47d3acf7ae628ead7ca829bfe1c6f864c3c9

Change-Id: I3be88b6328dc07c46e6b1ddf8c85480dc88cfe95
  • Loading branch information
maver1ck authored and sqla-tester committed Oct 31, 2024
1 parent bd50ba3 commit 431fd07
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions alembic/ddl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -185,23 +185,23 @@ 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),
add_column(compiler, element.column, **kw),
)


@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),
drop_column(compiler, element.column.name, **kw),
)


@compiles(ColumnNullable) # type: ignore[misc]
@compiles(ColumnNullable)
def visit_column_nullable(
element: ColumnNullable, compiler: DDLCompiler, **kw
) -> str:
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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:
Expand All @@ -245,7 +245,7 @@ def visit_column_default(
)


@compiles(ComputedColumnDefault) # type: ignore[misc]
@compiles(ComputedColumnDefault)
def visit_computed_column(
element: ComputedColumnDefault, compiler: DDLCompiler, **kw
):
Expand All @@ -255,7 +255,7 @@ def visit_computed_column(
)


@compiles(IdentityColumnDefault) # type: ignore[misc]
@compiles(IdentityColumnDefault)
def visit_identity_column(
element: IdentityColumnDefault, compiler: DDLCompiler, **kw
):
Expand Down

0 comments on commit 431fd07

Please sign in to comment.