We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using SqlAlchemy 2.X and Alembic 1.11.1.
mypy is complaining about down_revision, branch_labels, and depends_on needing explicit type annotation.
I guess that for down_revision this is only an issue for the first migration because after that it will always be initialized and detected as str.
The fix seems trivial, but I'm not an Alembic expert at all so I might be missing something:
down_revision: Optional[str] = None branch_labels: Optional[str] = None depends_on: Optional[str] = None
Maybe this is intended and neccesary in order to keep backwards compatibility with Python 2.x ?
The text was updated successfully, but these errors were encountered:
Hi,
thanks for reporting. This can be fixed in the alembic templates, but existing install will need to edit the script.py.mako file
script.py.mako
Sorry, something went wrong.
Federico Caselli has proposed a fix for this issue in the main branch:
Added typing to the default script mako templates. https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4635
9705736
No branches or pull requests
Using SqlAlchemy 2.X and Alembic 1.11.1.
mypy is complaining about down_revision, branch_labels, and depends_on needing explicit type annotation.
I guess that for down_revision this is only an issue for the first migration because after that it will always be initialized and detected as str.
The fix seems trivial, but I'm not an Alembic expert at all so I might be missing something:
Maybe this is intended and neccesary in order to keep backwards compatibility with Python 2.x ?
The text was updated successfully, but these errors were encountered: