-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
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
Pyright in "strict" mode complains about "begin_transaction" #1201
Comments
thanks for reporting cc @CaselIT |
Thanks for reporting. |
Please note that both alembic and sqlalchemy are currently "best effort" type checking with pyright/pylance. A lot of similar issues will came up running them, especially in strict mode |
CaselIT has proposed a fix for this issue in the main branch: Correctly account for generic in Function https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4492 |
Thanks for the note, that's fine. sqlalchemy and alembic are doing the great job of implementing proper type hinting! |
BTW I did not want to discourage future issues on this, just stating the current status of alembic and sqlalchemy |
When
env.py
is generated, this line is usually added:VSCode (pylance/pyright) compains about it saying:
Type of "begin_transaction" is partially unknown
Most likely because of:
where the type of
ContextManager
generic is not specifiedExpected behavior
No warnings
Versions.
Have a nice day!
The text was updated successfully, but these errors were encountered: