Skip to content

Commit

Permalink
Fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
maver1ck committed Oct 31, 2024
1 parent 14539e4 commit 0934362
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 7 additions & 4 deletions alembic/runtime/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ def __init__(
)

self._version = self.impl.version_table_impl(
version_table, version_table_schema,
opts.get("version_table_pk", True)
version_table,
version_table_schema,
opts.get("version_table_pk", True),
)

log.info("Context impl %s.", self.impl.__class__.__name__)
Expand Down Expand Up @@ -531,8 +532,10 @@ def get_current_heads(self) -> Tuple[str, ...]:
return ()
assert self.connection is not None
return tuple(
row[0] for row in self.connection.execute(
_select(self._version.c.version_num))
row[0]
for row in self.connection.execute(
_select(self._version.c.version_num)
)
)

def _ensure_version_table(self, purge: bool = False) -> None:
Expand Down
4 changes: 1 addition & 3 deletions tests/test_version_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,7 @@ def version_table_impl(
)
if version_table_pk:
vt.append_constraint(
PrimaryKeyConstraint(
"id", name=f"{version_table}_pkc"
)
PrimaryKeyConstraint("id", name=f"{version_table}_pkc")
)
return vt

Expand Down

0 comments on commit 0934362

Please sign in to comment.