Skip to content

Commit 2940390

Browse files
authored
fix: add missing Any import to alembic migration templates (#697)
## Description The try/except ImportError fallback for optional password hashers (Argon2Hasher, PasslibHasher, PwdlibHasher) used `Any` as a type placeholder, but `Any` was never imported. This caused a NameError when running migrations without optional dependencies installed. ## Closes #691
1 parent 95aacf7 commit 2940390

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

advanced_alchemy/alembic/templates/asyncio/script.py.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Create Date: ${create_date}
77
"""
88

99
import warnings
10-
from typing import TYPE_CHECKING
10+
from typing import TYPE_CHECKING, Any
1111

1212
import sqlalchemy as sa
1313
from alembic import op

advanced_alchemy/alembic/templates/sync/script.py.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Create Date: ${create_date}
77
"""
88

99
import warnings
10-
from typing import TYPE_CHECKING
10+
from typing import TYPE_CHECKING, Any
1111

1212
import sqlalchemy as sa
1313
from alembic import op

0 commit comments

Comments
 (0)