Skip to content

Commit

Permalink
Fix compatibility issues with latest version of mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
hunyadi committed Aug 5, 2024
1 parent de0bacd commit 9f98563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pysqlsync/dialect/mssql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def drop_schema(self, namespace: LocalId) -> None:
if constraints:
stmts: list[str] = []
for constraint in constraints:
table_name, constraint_name = typing.cast(tuple[str, str], constraint)
table_name, constraint_name = constraint
stmts.append(
f"ALTER TABLE {QualifiedId(namespace.id, table_name)} DROP CONSTRAINT {LocalId(constraint_name)};"
)
Expand Down
6 changes: 1 addition & 5 deletions pysqlsync/formation/discovery.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import typing
from dataclasses import dataclass
from typing import Optional

Expand Down Expand Up @@ -181,10 +180,7 @@ async def _get_columns_limited(self, table_id: SupportsQualifiedId) -> list[Colu

columns: list[Column] = []
for col in column_meta:
column_name, data_type, nullable = typing.cast(
tuple[str, str, bool],
col,
)
column_name, data_type, nullable = col
columns.append(
self.factory.column_class(
LocalId(column_name),
Expand Down

0 comments on commit 9f98563

Please sign in to comment.